Re: Unicode problem with export of literal contents

2023-02-16 Thread Jens Lechtenboerger
Hi Bruno,

On 2023-02-17, Bruno Barbier wrote:

> Hi Jens,
>
> Jens Lechtenboerger  writes:
>
>> ...
>> Note that I insert contents literally because I do not want
>> ‘find-file-hook’, automatic uncompression, etc. (which are avoided
>> according to the doc string of insert-file-contents-literally).
>>
>> Could the old behavior be restored?
>
> By using `insert-file-contents-literally' (as opposed to
> `insert-file-contents'), you're also forbidding Emacs to decode the
> binary content of your file into text.
>
> My guess is that it was working by chance in previous versions.

in any case, this will introduce failures elsewhere.

> In case somebody might help you, here is a simple way to trigger the
> encoding question with a recent version of org (mine is Org mode version 
> 9.6.1).
>
>(with-temp-buffer
>   (insert "Lechtenb\303\266rger")
>   (org-mode))

Thank you for the simpler recipe.  This indeed fails now.

So, maybe my question is: Must text be decoded for Org mode from now on?

Best wishes
Jens


smime.p7s
Description: S/MIME cryptographic signature


Re: [PATCH] Allow customizing commands affected by `org-fold-catch-invisible-edits' (was: Should we extend org-catch-invisible-edits to more interactive commands? (was: Catching invisible edits: probl

2023-02-16 Thread Alain . Cochard
Ihor Radchenko writes on Thu 16 Feb 2023 15:06:

 > As the docstring states, the check is performed at point.  Checking
 > the actual modifications would be rather tricky. It might be done,
 > but there are so many caveats that the code will be fragile.

OK, too bad.  Thanks for trying.  

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France | [ slot available for rent ]




Re: New Org (from main) and slow clocking

2023-02-16 Thread Marcin Borkowski


On 2023-02-17, at 07:51, Marcin Borkowski  wrote:

> Hi all,
>
> I have just updated my Org (from the main branch, Org mode version
> 9.6.1, release_9.6.1-253-g74eb0f), and I noticed an issue with clocking.
> I have an "ongoing" task which already accumulated 7000+ clock entries,
> and clocking in takes close to 90 seconds.  It was instantaneous before
> (version 9.6-pre, release_9.5.5-853-g7b9d8e).  What can I do now?
>
> And how can I downgrade?  (I tried the "logical" thing, i.e., I checked
> out a "tmp" branch at tag release_9.6.1 and ran "make update", but it
> didn't work because it (obviously) couldn't pull the "tmp" branch.

Ok, so I think I managed to downgrade (make cleanall, make, sudo make
install - is that correct?), but the problem persists in 9.6.1...

> Alternatively, since Org mode is much more mature now than a few years
> ago, how can I get rid of my Git-based installation in favor of the Elpa
> package (which, I assume, should be much more stable/bug-free)?  (I
> understand that by using bleeding edge Org mode I risk a bit, and maybe
> it's time to trade new/shiny for safe...)

Best,

-- 
Marcin Borkowski
http://mbork.pl



New Org (from main) and slow clocking

2023-02-16 Thread Marcin Borkowski
Hi all,

I have just updated my Org (from the main branch, Org mode version
9.6.1, release_9.6.1-253-g74eb0f), and I noticed an issue with clocking.
I have an "ongoing" task which already accumulated 7000+ clock entries,
and clocking in takes close to 90 seconds.  It was instantaneous before
(version 9.6-pre, release_9.5.5-853-g7b9d8e).  What can I do now?

And how can I downgrade?  (I tried the "logical" thing, i.e., I checked
out a "tmp" branch at tag release_9.6.1 and ran "make update", but it
didn't work because it (obviously) couldn't pull the "tmp" branch.

Alternatively, since Org mode is much more mature now than a few years
ago, how can I get rid of my Git-based installation in favor of the Elpa
package (which, I assume, should be much more stable/bug-free)?  (I
understand that by using bleeding edge Org mode I risk a bit, and maybe
it's time to trade new/shiny for safe...)

TIA,

-- 
Marcin Borkowski
http://mbork.pl



Re: Not all reftex commands within latex block generate appropriate message

2023-02-16 Thread Alain . Cochard
Ihor Radchenko writes on Thu 16 Feb 2023 13:00:

 > I'd say that it is reftex bug. It is generally expected that major
 > modes do work in non-file buffers in Emacs.

Thanks.  I have sent a message to bug-auc...@gnu.org.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France | [ slot available for rent ]




Re: Unicode problem with export of literal contents

2023-02-16 Thread Bruno Barbier


Hi Jens,

Jens Lechtenboerger  writes:

> ...
> Note that I insert contents literally because I do not want
> ‘find-file-hook’, automatic uncompression, etc. (which are avoided
> according to the doc string of insert-file-contents-literally).
>
> Could the old behavior be restored?

By using `insert-file-contents-literally' (as opposed to
`insert-file-contents'), you're also forbidding Emacs to decode the
binary content of your file into text.

My guess is that it was working by chance in previous versions.

In case somebody might help you, here is a simple way to trigger the
encoding question with a recent version of org (mine is Org mode version 9.6.1).

   (with-temp-buffer
  (insert "Lechtenb\303\266rger")
  (org-mode))



Bruno




Re: Link type in org-mode, but with org-roam ?

2023-02-16 Thread Jean Louis
* Clément Payard  [2023-02-16 13:16]:
>  First of all, thank you for your answer.
> 
> Sorry, I am not a researcher :(. I'm just a modest student with a passion
> for emacs, org-mode and PKM environment. So I'm not a big thing ^^. But I
> think I have a working brain and good ideas... so here I am.
> The perfect system as I described it does not exist. I've been "looking"
> for... 6 or 7 months ? Whatever, I think I'll get to the end of this
> search.

I was referring to researcher in the definition of what you do,
investigating, researching about note taking. Now I realize that the
word is used almost exclusively for scientists.

> But, before talking about anything, I would like to know several
> things:

> - I've heard of Hyperscope before your previous message. I mean, I've looked
> at some of your posts and (I think) videos... but I still don't understand
> where to find it. Can't use it / test it. I think this is on purpose, you
> didn't finish it.

Yes, I have that problem that database tables are really very dynamic
and not well polished to just give them to people. And software is
also not polished, it has some hard coding that I have to modify.

Yes, I am very slow in providing public package for RCD Notes &
Hyperscope for GNU Emacs.

But I am very willing to help you install it and try it all out and
make it workable on your computer, in one on one chat or by e-mail,
that will work well.

I strongly suggest reading and understanding this system:

GeDaFe - PostgreSQL Generic Database Interface:
http://gedafe.github.io/doc/gedafe-sql.en.html 

As the database is based on that design. Design of program basically
says:

- design the database table by GeDaFe schema

- let system provide functions like add, modify, delete, duplicate
  automatically

> I only found this:
> https://hyperscope.link/3/7/1/5/5/RCD-Notes-for-Emacs-37155.html ,
> which gives a link to get "rcd-cf", which works at my place (after
> installing the "emacs-libpq" dependency). I just don't know how to
> use it... Is there a tutorial I can do somewhere? Explanations
> somewhere?

Ehm. I am not Drew Adams to have it all ready since decades.

I am working from time to time on documentation and want to make it
exteremely easy to install it.

One part of it I almost ported to SQLite for people management, but
have to polish functions. It just starts working with the Emacs SQLite
built-in.

So I need to set it up that for user it "just works" for PostgreSQL.

> - Second thing, your system seems extremely flexible and adaptable

Which is good. It is based on GeDaFe, which means, user is able to add
any table, and continue managing information by using same system.

> but it also seems terribly rigid.

That may be opinion. 

What is rigid are only relationships, I can say what is rigid:

- column timestamp are rigid, they will accept only specific time
  stamps, and will be automatically generated mostly

- referenced columns are rigid, I can relate note only to person which
  exist in the database. I cannot relate it to person that does not
  have an entry in the database. If I wish to do so, than I would
  write it in the text of the entry. But cannot relate it in the
  database.

- column types are rigid, for example ID is integer, I cannot write it
  as text, UUID must be UUID and must conform to the format, I cannot
  write integer for UUID.

Apart from those rigid principles, nothing else is rigid that I know,
at least by feeling, without knowing exactly what you mean.

> I don't know what your goal is exactly, but my goal is to make a
> system that is easy to use, where the information doesn't have to be
> arranged perfectly.

Goals are defined in features:

RCD Notes & Hyperscope for GNU Emacs, The Dynamic Knowledge Repository:
https://gnu.support/gnu-emacs/rcd-notes-for-gnu-emacs/index.html

Some of main goals are sales, or helping people, or moving people from
one stage to other stage. 

Imagine some sales flow like:

10, Client has received the offer online

20, Client engages in conversation and resolves all questions and doubts

30, Client arranges the meeting
40, The agreement proposal is sent to client

50, Client may propose modifications to the agreement   

60, Client signs up the agreement and pays 
70, Service delivered

Then person is moved from one stage to other by using communication
and documents.

Similar "flows" can be applied with patients in a hospital, or orphan
child in Tanzania, or development of a school in Uganda.

This system overall is used for planning in order to reach goals and
purposes. We manage resources, inventory, their locations, geographic
locations of resources, maps, people, their locations, their
expenditure, reports, plans, programs, projects, tasks, all with
purposes of delivering valuable final product.

However, system can be used to play 

Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]

2023-02-16 Thread Jean Louis
* Ihor Radchenko  [2023-02-15 23:38]:
> Bruno BEAUFILS  writes:
> 
> > When using the org-latex-export-to-pdf on any foo.org file I get the
> > foo.pdf file produced the right way but I also get the foo.tex file.
> >
> > I think that the whole point of exporting to pdf is only to get the pdf
> > file, avoiding the need to keep the latex one.
> >
> > I guess that one of org-latex-compile or org-latex-export-to-pdf
> > function should remove the source LaTeX file if the compile went well.
> 
> The problem with LaTeX export is that it is not always possible to know
> if the process truly finished without errors or not.

It is possible to know it always.

System commands `latex' or `pdflatex' will emit error status, you may
inspect it in shell with: 

$ echo $?

The function `org-latex-compile' does not check for error status, but
it could. In general, external processes shall always be checked for
exit statuses.

It is matter of programming design if you wish or miss to get error
statuses and check for them.




-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]

2023-02-16 Thread Jean Louis
* Bruno BEAUFILS  [2023-02-15 21:52]:
> When using the org-latex-export-to-pdf on any foo.org file I get the
> foo.pdf file produced the right way but I also get the foo.tex file.
> 
> I think that the whole point of exporting to pdf is only to get the pdf
> file, avoiding the need to keep the latex one.
> 
> I guess that one of org-latex-compile or org-latex-export-to-pdf
> function should remove the source LaTeX file if the compile went well.

Good idea!

That will avoid clutter.

I can see that problem solved with simple function. One can use
different and temporary directory for that file, generate PDF, and
once there is no error message by `latex' command, and PDF is there,
that PDF can be moved to original directory.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/


signature.asc
Description: PGP signature


Re: [Bug] 'org-font-lock-extra-keywords' appear next to the parent heading when its subtree is folded.

2023-02-16 Thread Philipp Kiefer

Hi Ihor,

Sorry for the delay, but I had to weed out my init.el to make sure none 
of the settings were interfering with the problem I was describing.


Please find attached a sample Org file with the bug description and 
steps to reproduce the issue at the bottom of the file. (Also pasting it 
in here: Collapse all trees, then start at the bottommost heading, and 
use ^c^p repeatedly to go up through the headings to the top. Point will 
jump right over Trees 2 and 3 to 1.)


I can reproduce with this minimal init.el using Emacs GNU Emacs 27.2 
(build 1, x86_64-w64-mingw32)

 of 2021-03-26 and Org mode version 9.6.1:

-

(desktop-save-mode 1)
(setq org-hide-emphasis-markers t)
(with-current-buffer " *load*"
  (goto-char (point-max)))

--

I use the last command ("with...") to skip all the rest of my init.el. 
The problem goes away when I set org-hide-emphasis-markers to nil.


A further and likely related issue is that point often jumps to the 
beginning of the next line when I click the mouse to position point at 
the end of a heading. This can not be reproduced in the sample file, I 
think, but I could send you a screencast showing the problem. This issue 
also goes away when setting org-hide-emphasis-markers to nil.


Thanks for looking into this and please let me know if you can reproduce 
or have any further questions.


Best regards,

Philipp

On 26.01.2023 10:15, Ihor Radchenko wrote:

Philipp Kiefer  writes:


...
If any of the conditions listed above are untrue, e. g. I set
'org-hide-emphasis-markers' to nil, or remove the markers from heading A
the problem goes away.

I hope you can reproduce it based on this description.

I would help if you provided an example of the described heading.
* 1
** 1.1
*** 1.1.1
 1.1.1.1
 1.1.1.2
*** 1.2.1
** 1.2
* *2*
** 2.1
*** 2.1.1
*** 2.1.2
** 2.2
* *3*
** 3.1
*** 3.1.1
*** 3.1.2
*** 3.1.3
** 3.2
* 
* Collapse all trees, then start down here, and use ^c^p repeatedly to go up 
through the headings to the top. Point will jump right over Trees 2 and 3 to 1.


Re: Template for ob- packages?

2023-02-16 Thread Thomas S. Dye

Aloha Lawrence,

Galaxy Being  writes:

Is there a generic starter template for writing an ob- package, 
some sort of example code?


⨽
Lawrence Bottorff
Grand Marais, MN, USA
borg...@gmail.com


Yes, see org-contrib/babel/ob-template.el on Worg.

All the best,
Tom

--
Thomas S. Dye
https://tsdye.online/tsdye



Re: Template for ob- packages?

2023-02-16 Thread Matt


  On Thu, 16 Feb 2023 16:10:51 -0500  Galaxy Being  wrote --- 
 > Is there a generic starter template for writing an ob- package, some sort of 
 > example code?

Yes: 
https://git.sr.ht/~bzg/worg/tree/master/item/org-contrib/babel/ob-template.el

When I started learned Babel, I took notes with the hope of expanding it into a 
Worg article.  Here are the notes: 
https://excalamus.com/2021-11-03-org_babel.html

If you're interested in fleshing out the notes into proper documentation, I'd 
be happy to help.



Template for ob- packages?

2023-02-16 Thread Galaxy Being
Is there a generic starter template for writing an ob- package, some sort
of example code?

⨽
Lawrence Bottorff
Grand Marais, MN, USA
borg...@gmail.com


Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]

2023-02-16 Thread Bruno BEAUFILS
On Thu, Feb 16, 2023 at 07:47:19PM +0100, Hanno Perrey wrote:
> This is just an (semi-)educated guess as I do not have Emacs in
> front of me right now, but I would expect the org-latex-compile
> would only be called when actually compiling the LaTeX code that is
> to say producing the PDF. As long as you only export to a TeX file,
> no log files are being generated and thus no clean up is necessary.

Of course you must be right.

I may be dumb or tired ;-)

-- 
Bruno BEAUFILS


signature.asc
Description: PGP signature


Re: Timestamp and timestamp range definitions

2023-02-16 Thread Ilya Chernyshov


Ihor Radchenko  writes:

Updating the manual will make more sense. Would you mind writing 
a patch?


Of course.

>From da84673301de7e9453cb359536235d8ce56399f1 Mon Sep 17 00:00:00 2001
From: Ilya Chernyshov 
Date: Fri, 17 Feb 2023 01:23:27 +0700
Subject: [PATCH] org-manual.org: Update timestamp and timerange definitions

* doc/org-manual.org (Timestamps): Document that time specification of the
form <2023-02-17 Fri 10:00-12:00> is not a timestamp, but a timerange.
---
 doc/org-manual.org | 27 +--
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 2d38cf76c..5b6633417 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -5915,12 +5915,12 @@ ** Timestamps
 #+cindex: deadlines
 #+cindex: scheduling
 
-A timestamp is a specification of a date (possibly with a time or
-a range of times) in a special format, either =<2003-09-16 Tue>= or
-=<2003-09-16 Tue 09:39>= or =<2003-09-16 Tue 12:00-12:30>=[fn:19].
-A timestamp can appear anywhere in the headline or body of an Org tree
-entry.  Its presence causes entries to be shown on specific dates in
-the agenda (see [[*Weekly/daily agenda]]).  We distinguish:
+A timestamp is a specification of a date (possibly with a time) in a
+special format, either =<2003-09-16 Tue>= or
+=<2003-09-16 Tue 09:39>=[fn:19].  A timestamp can appear anywhere in
+the headline or body of an Org tree entry.  Its presence causes
+entries to be shown on specific dates in the agenda (see [[*Weekly/daily
+agenda]]).  We distinguish:
 
 - Plain timestamp; Event; Appointment ::
 
@@ -5935,7 +5935,7 @@ ** Timestamps
   ,* Meet Peter at the movies
 <2006-11-01 Wed 19:15>
   ,* Discussion on climate change
-<2006-11-02 Thu 20:00-22:00>
+<2006-11-02 Thu>
   #+end_example
 
 - Timestamp with repeater interval ::
@@ -5974,15 +5974,22 @@ ** Timestamps
 
   #+cindex: timerange
   #+cindex: date range
-  Two timestamps connected by =--= denote a range.  The headline is
-  shown on the first and last day of the range, and on any dates that
-  are displayed and fall in the range.  Here is an example:
+  Two timestamps connected by =--= denote a range.  In the agenda, the
+  headline is shown on the first and last day of the range, and on any
+  dates that are displayed and fall in the range.  Here is an example:
 
   #+begin_example
   ,** Meeting in Amsterdam
  <2004-08-23 Mon>--<2004-08-26 Thu>
   #+end_example
 
+  Timerange is a timestamp consisting of two time units connected by =-=
+
+  #+begin_example
+  ,* Discussion on climate change
+ <2006-11-02 Thu 10:00-12:00>
+  #+end_example
+
 - Inactive timestamp ::
 
   #+cindex: timestamp, inactive
-- 
2.39.0



--
Best,
Ilya


Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]

2023-02-16 Thread Hanno Perrey
Bruno BEAUFILS  skrev: (16 februari 2023 15:24:37 CET)
>I thought that when creating latex file it should also remove the
>produced latex which could be a majour problem.
>
>In fact it does not, which I do not understand why when looking at the
>code of org-latex-compile. I am surely missing something.
>

This is just an (semi-)educated guess as I do not have Emacs in front of me 
right now, but I would expect the org-latex-compile would only be called when 
actually compiling the LaTeX code that is to say producing the PDF. As long as 
you only export to a TeX file, no log files are being generated and thus no 
clean up is necessary.

Best wishes,
Hanno



Re: [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda)

2023-02-16 Thread Jean Louis
* Ihor Radchenko  [2023-02-15 18:17]:
> Jean Louis  writes:
> 
> > That is not same case as Ihor, when he designated it as 
> >
> > 2030-02-09 12:00 -0800 @UTC
> > because there are no offsets @UTC time zone.
> 
> I do not recall providing such example. May you point me to the message
> where you saw me writing -0800 @UTC?

Discussion on "@UTC" stated with this message by Christian:
https://lists.gnu.org/archive/html/emacs-orgmode/2023-02/msg00016.html

Theses were examples shown:

>Examples:
>2022-11-12 12:00+02 # 12:00 UTC+2
>2022-11-12 14:00+0230 # 14:00 UTC+2:30
>2022-11-12 14:00-0230 # 14:00 UTC-2:30
>2022-11-12 14:00Z # 14:00 UTC

Those examples are correct but there is comment "#" which was talking
about prefixes, only for understanding.

Examples without comments are:

>2022-11-12 12:00+02
>2022-11-12 14:00+0230 
>2022-11-12 14:00-0230 
>2022-11-12 14:00Z 

As you can see there is "Z" as designation for UTC time. When there is
designation for UTC time, no prefix is mentined.

You may observe that UTC prefixes in those examples are mentioned with
positive or negative prefixes, but there is no designation for "UTC",
as that would become confusing.

Which is what I was speaking about.

Where you Ihor responded with this message:
https://lists.gnu.org/archive/html/emacs-orgmode/2023-02/msg00018.html

> [2022-11-12 14:00 @UTC+2]
> [2022-11-12 14:00 @UTC-2:30]

> are also fine within the proposed format.

I am not sure what did you intend to show, did you intend to tell
that:

- 2022-11-12 14:00 @UTC+2 means 2022-11-12 12:00 @UTC ?

In my understanding "@UTC" means "UTC time zone". From above first
examples it is very confusing to use "UTC" as designation plus
positive or negative prefix.

It is not common to represent it that way. As if there is any
designation for UTC, like "UTC" or "@UTC" or "Z", then there is no
prefix shown, or if any, there will be zero.

And I said, representing time that way by mixing word "UTC" with
prefix would be confusing, as that practically creates new type of
time representation that is not ordinarily used.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda)

2023-02-16 Thread Jean Louis
* Thomas S. Dye  [2023-02-14 19:50]:
> > What Ihor proposed is time stamp like:
> > 
> >  2023-02-14 Tue 12:00:00 +0800 @UTC
> > 
> > Though I just say when we put "UTC" that means normally "UTC time
> > zone" and such has no prefix that is positive or negative, can be
> > zero.
> 
> Sigh.  UTC is not a time zone.

I cannot know what you mean and in which context.

I can tell you to look here:
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

which is the context for computer time, or TZ database time zones,
where you may find Etc/UTC as time zone.

I can tell that in the context of the PostgreSQL database, "UTC" is
time zone, as following works well:

SELECT current_timestamp AT TIME ZONE 'UTC';

  timezone  

 2023-02-16 14:13:37.837977
(1 row)

SELECT CURRENT_TIMESTAMP;

   CURRENT_timestamp   
---
 2023-02-16 17:13:42.709239+03

There are differen time zones' categories:
https://en.wikipedia.org/wiki/Lists_of_time_zones

In military context:
https://en.wikipedia.org/wiki/List_of_military_time_zones

It is called "Zulu Time Zone" or "Z"

Then in this context:
https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations

There is abbreviation "UTC" if you look there.

So, yes I do agree that UTC is "not time zone", but I do not know in
which context you mean. As in many common contexts the UTC is the time
zone.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: [PATCH] Allow customizing commands affected by `org-fold-catch-invisible-edits' (was: Should we extend org-catch-invisible-edits to more interactive commands? (was: Catching invisible edits: probl

2023-02-16 Thread Ihor Radchenko
alain.coch...@unistra.fr writes:

> However, I could not have it work for my case so far.  I tried to add
> "(undo . insert)", "(undo . delete-backward)" and "(undo . delete)" to
> 'org-fold-catch-invisible-edits-commands', one by one and together,
> and all values of 'org-fold-catch-invisible-edits'.  Any clue of what
> I am doing wrong?  Thanks.

As the docstring states, the check is performed at point.
Checking the actual modifications would be rather tricky. It might be
done, but there are so many caveats that the code will be fragile.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[BUG] Recurrent error about timer running Pomodoro extension. [9.6 (9.6-??-bed47b4 @ /home/bill/.emacs.d/.local/straight/build-28.1/org/)]

2023-02-16 Thread Bill McKelvie
I was running a Pomodoro timer from my professional development log and 
kept getting an error. Emacs would slow down so that there would be a 
delay between pressing a key and the character appearing on screen. 
Shutting down and restarting helps for a while but the error then 
recurs. The error message suggested submitting a bug report if it 
recurred. Hence this post. I run emacs 28.1 with Doom on MXLinux 21.3, 
KDE edition.


I hope this is helpful to the development team.

Bill


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See

https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.




Emacs : GNU Emacs 28.1 (build 4, x86_64-pc-linux-gnu, X toolkit, cairo 
version 1.16.0, Xaw3d scroll bars)

of 2022-09-03
Package: Org mode version 9.6 (9.6-??-bed47b4 @ 
/home/bill/.emacs.d/.local/straight/build-28.1/org/)


current state:
==
(setq
org-link-elisp-confirm-function nil
org-directory "~/Documents/org/"
org-cite-insert-processor 'citar
org-after-refile-insert-hook '(save-buffer)
org-indirect-buffer-display 'current-window
org-crypt-key nil
org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]
org-pomodoro-long-break-sound 
"/home/bill/.emacs.d/.local/straight/build-28.1/org-pomodoro/resources/bell_multiple.wav"
org-load-hook '(+org-init-org-directory-h +org-init-appearance-h 
+org-init-agenda-h

+org-init-attachments-h +org-init-babel-h +org-init-babel-lazy-loader-h
+org-init-capture-defaults-h +org-init-capture-frame-h 
+org-init-custom-links-h

+org-init-export-h +org-init-habit-h +org-init-hacks-h +org-init-keybinds-h
+org-init-popup-rules-h +org-init-smartparens-h)
org-startup-folded nil
org-babel-after-execute-hook 
'(+org-redisplay-inline-images-in-babel-result-h)
org-link-abbrev-alist '(("doomdir" . "/home/bill/.doom.d/%s") 
("emacsdir" . "/home/bill/.emacs.d/%s")

("doom-repo" . "https://github.com/doomemacs/doomemacs/%s;)
("wolfram" . "https://wolframalpha.com/input/?i=%s;)
("wikipedia" . "https://en.wikipedia.org/wiki/%s;)
("duckduckgo" . "https://duckduckgo.com/?q=%s;)
("gmap" . "https://maps.google.com/maps?q=%s;)
("gimages" . "https://google.com/images?q=%s;)
("google" . "https://google.com/search?q=;)
("youtube" . "https://youtube.com/watch?v=%s;)
("github" . "https://github.com/%s;))
org-agenda-files '("~/Documents/org/")
org-capture-templates '(("t" "Personal todo" entry (file+headline 
+org-capture-todo-file "Inbox")

"* [ ] %?\n%i\n%a" :prepend t)
("n" "Personal notes" entry (file+headline +org-capture-notes-file "Inbox")
"* %u %?\n%i\n%a" :prepend t)
("j" "Journal" entry (file+olp+datetree +org-capture-journal-file)
"* %U %?\n%i\n%a" :prepend t)
("p" "Templates for projects")
("pt" "Project-local todo" entry
(file+headline +org-capture-project-todo-file "Inbox") "* TODO %?\n%i\n%a"
:prepend t)
("pn" "Project-local notes" entry
(file+headline +org-capture-project-notes-file "Inbox") "* %U %?\n%i\n%a"
:prepend t)
("pc" "Project-local changelog" entry
(file+headline +org-capture-project-changelog-file "Unreleased")
"* %U %?\n%i\n%a" :prepend t)
("o" "Centralized templates for projects")
("ot" "Project todo" entry #'+org-capture-central-project-todo-file
"* TODO %?\n %i\n %a" :heading "Tasks" :prepend nil)
("on" "Project notes" entry #'+org-capture-central-project-notes-file
"* %U %?\n %i\n %a" :heading "Notes" :prepend t)
("oc" "Project changelog" entry 
#'+org-capture-central-project-changelog-file

"* %U %?\n %i\n %a" :heading "Changelog" :prepend t)
)
org-persist-after-read-hook '(org-element--cache-persist-after-read)
org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel . 3))
org-export-before-parsing-hook '(org-attach-expand-links)
org-cycle-tab-first-hook '(+org-yas-expand-maybe-h +org-indent-maybe-h
org-babel-hide-result-toggle-maybe org-babel-header-arg-expand
+org-clear-babel-results-h +org-cycle-only-current-subtree-h)
org-default-notes-file "/home/bill/Documents/org/notes.org"
org-refile-use-outline-path 'file
org-pomodoro-short-break-sound 
"/home/bill/.emacs.d/.local/straight/build-28.1/org-pomodoro/resources/bell.wav"

org-archive-hook '(org-attach-archive-delete-maybe)
org-cite-follow-processor 'citar
org-file-apps '((remote . emacs) (auto-mode . emacs) (directory . emacs) 
("\\.mm\\'" . default)

("\\.x?html?\\'" . default) ("\\.pdf\\'" . default))
org-cycle-hook '(org-cycle-hide-archived-subtrees 
org-cycle-show-empty-lines

org-cycle-optimize-window-after-visibility-change)
org-persist-before-read-hook '(org-element--cache-persist-before-read)
org-font-lock-set-keywords-hook '(doom-themes-enable-org-fontification)
org-modules '(ol-bibtex)
org-image-actual-width nil
org-attach-use-inheritance t
org-mode-local-vars-hook '(+org-init-gifs-h)
org-mode-hook '(er/add-org-mode-expansions
#[0 

[BUG] org-indent and display text property not preserving column when moving

2023-02-16 Thread Darius Foo
Hi, I've encountered what seems like a bug with org-indent. When I move the
cursor using the arrow keys on lines with the display text property set,
its column isn't preserved, jumping ahead or back by a fixed amount.

This issue actually came up with org-modern, but I'm minimized it to the
following.

(use-package org
  :mode (("\\.org$" . org-mode))
  :custom
  (org-startup-indented t)
  :config
  (font-lock-add-keywords 'org-mode '(("^\\(-\\)\\( \\)" 1 '(face nil
display "•")

Here is an org file to try it on. With the cursor on x, pressing up moves
it to y instead of a, and pressing down moves it back to x. It seems like
the amount moved depends on the indentation added by org-indent: with point
on z, pressing up moves it to w.

* h1
** h2
- a...y...
- x...
*** h3
 h4
- w...
- z...

Thanks.
Darius

Emacs  : GNU Emacs 28.2 (build 2, x86_64-apple-darwin21.6.0, NS
appkit-2113.60 Version 12.5.1 (Build 21G83))
 of 2023-01-06
Package: Org mode version 9.6.1 (9.6.1-g74eb0f @
/Users/darius/.emacs.d/straight/build/org/)


[BUG] [9.6 (9.6-??-971eb6885 @ /home/abucz/.emacs.d/.local/straight/build-28.2/org/)]

2023-02-16 Thread Matthew Czuba
To: emacs-orgmode@gnu.org
Subject: [BUG]  [9.6 (9.6-??-971eb6885 @
/home/abucz/.emacs.d/.local/straight/build-28.2/org/)]
From: Matthew Czuba 
--text follows this line--

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Hello,

I attempted a find and replace on the latest doom emacs (highlighted a
large block of text, then SPC: replace-string, then entered the string
’s as input for replacement and single apostrophe ' as the
desired output). The following error was thrown:

Warning (org-element-cache): org-element--cache: Org parser error in
yael-sharvit.org::86520. Resetting.
 The error was: (wrong-type-argument integer-or-marker-p nil)
 Backtrace:
"  backtrace-to-string(nil)
  org-element-at-point()
  org-element-context()
  (and t (org-element-context))
  (let* ((context (and t (org-element-context))) (path (and context
(org-element-property :path context (if path (let* ((val
(org-element-property :type context))) (cond ((equal val '\"kbd\")
(let nil (format \"%s %s\" (propertize \"Key sequence:\" ... ...)
(propertize ... ... ... ((equal val '\"doom-module\") (let nil
(format \"%s %s\" (propertize \"Doom module:\" ... ...) (propertize
... ... ... ((equal val '\"doom-package\") (let nil (format \"%s
%s\" (propertize \"Doom package:\" ... ...) (propertize ... ...
... (t (let ((type val)) (format \"Link: %s\"
(org-element-property :raw-link context
  +org-display-link-in-eldoc-a(#f(compiled-function (string 
plist) #))
  apply(+org-display-link-in-eldoc-a #f(compiled-function (string
 plist) #))
  org-eldoc-documentation-function(#f(compiled-function (string 
plist) #))
  run-hook-with-args-until-success(org-eldoc-documentation-function
#f(compiled-function (string  plist) #))
  eldoc-documentation-default()
  eldoc--invoke-strategy(nil)
  eldoc-print-current-symbol-info()
  #f(compiled-function () #)()
  apply(#f(compiled-function () #) nil)
  timer-event-handler([t 0 0 50 nil #f(compiled-function ()
#) nil idle 0 nil])
"
 Please report this to Org mode mailing list (M-x
org-submit-bug-report). Disable showing Disable logging

Reporting as directed.

Thanks,
Matthew

Emacs  : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.36, cairo version 1.17.6)
 of 2023-01-02
Package: Org mode version 9.6 (9.6-??-971eb6885 @
/home/abucz/.emacs.d/.local/straight/build-28.2/org/)

current state:
==
(setq
 org-link-elisp-confirm-function nil
 org-directory "~/Dropbox/org/"
 org-after-refile-insert-hook '(save-buffer)
 org-indirect-buffer-display 'current-window
 org-crypt-key nil
 org-hide-emphasis-markers t
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-load-hook '(+org-init-org-directory-h +org-init-appearance-h
+org-init-agenda-h +org-init-attachments-h
 +org-init-babel-h +org-init-babel-lazy-loader-h
+org-init-capture-defaults-h
 +org-init-capture-frame-h +org-init-custom-links-h
+org-init-export-h +org-init-habit-h
 +org-init-hacks-h +org-init-keybinds-h
+org-init-popup-rules-h +org-init-protocol-h
 +org-init-protocol-lazy-loader-h +org-init-smartparens-h)
 org-startup-folded nil
 org-babel-after-execute-hook '(+org-redisplay-inline-images-in-babel-result-h)
 org-link-abbrev-alist '(("doom-repo" .
"https://github.com/hlissner/doom-emacs/%s;)
 ("wolfram" . "https://wolframalpha.com/input/?i=%s;)
 ("wikipedia" . "https://en.wikipedia.org/wiki/%s;)
 ("duckduckgo" . "https://duckduckgo.com/?q=%s;)
 ("gmap" . "https://maps.google.com/maps?q=%s;)
 ("gimages" . "https://google.com/images?q=%s;)
 ("google" . "https://google.com/search?q=;)
 ("youtube" .
"https://youtube.com/watch?v=%s;) ("github" .
"https://github.com/%s;))
 org-agenda-files
'("~/Dropbox/org/academic/class-notes/4-5-22-inclass-elicitation-notes-czuba.org"

"~/Dropbox/org/academic/class-notes/bumford-f23-english-as-a-programming-language.org"
"~/Dropbox/org/academic/class-notes/harris-207-prag.org"
"~/Dropbox/org/academic/class-notes/jeong-minicourse.org"
"~/Dropbox/org/academic/class-notes/jess-sem3.org"
"~/Dropbox/org/academic/class-notes/kiche-czuba-4-13-22.org"
"~/Dropbox/org/academic/class-notes/kiche-s22.org"
"~/Dropbox/org/academic/meetings/!/meetings.org"
"~/Dropbox/org/academic/meetings/.#jessica-rett.org"
"~/Dropbox/org/academic/meetings/chris-hsieh.org"

Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]

2023-02-16 Thread Bruno BEAUFILS
On Thu, Feb 16, 2023 at 01:20:36PM +0100, Hanno wrote:
> which likely change after the export. It might be just my ingrained
> routines speaking

All replies I received let me discover that this is clearly a question
of habits and routines for some of us :-)

> Fair enough. Just out of curiosity: Have you tried setting
> org-latex-logfiles-extensions adding "tex" to it as suggested
> earlier and does that work for you?

Yes I tried it and it work perfectly when creating PDF.

I thought that when creating latex file it should also remove the
produced latex which could be a majour problem.

In fact it does not, which I do not understand why when looking at the
code of org-latex-compile. I am surely missing something.

-- 
Bruno BEAUFILS


signature.asc
Description: PGP signature


Re: Not all reftex commands within latex block generate appropriate message

2023-02-16 Thread Ihor Radchenko
alain.coch...@unistra.fr writes:

> Fraga, Eric writes on Wed 15 Feb 2023 12:30:
>
>  > I think this is indeed likely to be the reason.
>
> Thanks for the confirmation.  I was hoping that someone can arrange so
> that the self explanatory message is shown each time, not the cryptic
> one :-)

I'd say that it is reftex bug. It is generally expected that major modes
do work in non-file buffers in Emacs.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Link type in org-mode, but with org-roam ?

2023-02-16 Thread Ihor Radchenko
Cletip Cletip  writes:

> As you know, external links can be of the form "X:path", where X equals id,
> file, gnus etc. Note: Org-roam stores all types of links.
> So we can make the following type of links:
> [[A:B][description]]
> where
> - A is the id of a note known by org-roam
> - B is the id of a note, or string, or numeric value, etc
> - description is a description (what a precision)

Instead of hacking into Org source, you can define a new link type as
[[rel:A:B][description]] and set :follow and other parameters are needed.

> - is there another solution to my main problem: making my notes queryable ?

Try https://github.com/alphapapa/org-ql It provides much more flexible
query syntax where you can match against metadata values.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Emphasis issues with special blocks and latex

2023-02-16 Thread Ihor Radchenko
User Name  writes:

> I am having several issues with the fontification of emphasis markers in
> org-special-blocks and inside latex equations in my org-files.
>
> I have changed `org-emphasis-regexp-components` to be the following...

I advice against playing with this variable. It only affects
fontification and not the parser. And current Org's fontification is
fragile. It will be more reliable to write a custom font-lock keyword if
you want Emacs to highlight things differently.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]

2023-02-16 Thread Hanno
Bruno BEAUFILS  skrev: (16 februari 2023 11:15:31 CET)
>You just still can export the original source file and convert it to
>latex if needed.

That is true of course, but it is an extra step. I would need to remember it 
when creating the PDF as I export often from my notes which likely change after 
the export. It might be just my ingrained routines speaking, but I sort of 
expect the LaTeX file to be there as that is what I am exporting to in the 
first place.


>I would opt for letting that choice to the user (through the settings
>of a buffer settings).

Fair enough. Just out of curiosity: Have you tried setting 
org-latex-logfiles-extensions adding "tex" to it as suggested earlier and does 
that work for you?

Best wishes,
Hanno





Re: bug#59882: Multiple versions of Org in load-path problem

2023-02-16 Thread Max Nikulin

On 15/02/2023 05:53, Gregor Zattler wrote:

* Tim Cross [2023-02-04; 07:01 +11]:


I don't run Debian or Ubuntu anymore. However, I do recall that debian
does use a modified Emacs startup which is not part of the standard
Emacs distribution. They do this to enable the ability to have multiple
versions of Emacs installed at the same time.


that would be /usr/share/emacs/site-lisp/debian-startup.el


This file should be ignored when Emacs is started with --quick (-Q) 
option, see

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59882#86

I have not checked patches that may be applied to Emacs core files.



[FR] Fontifying src-blocks with no language specified

2023-02-16 Thread carsten
Fontifying src-blocks with a missing language would allow being able to 
theme src-blocks without having the unthemed text of languages fallback 
to whatever color the src-blocks are set to.
I envision this could be done with an empty string in 
org-src-block-faces.


See the below example where printf has the org-block face, in this case 
it would allow using a more normal color by default for org-blocks where 
the blocks without a language could use a more pronounced color.


#+BEGIN_SRC C
int main() {
printf("Hello World\\n");
}
#+END_SRC

#+BEGIN_SRC
this is just a block of text
#+END_SRC




Unicode problem with export of literal contents

2023-02-16 Thread Jens Lechtenboerger
Hi there,

consider this piece code, where unicode-file.org contains umlauts
(say, just the word “Lechtenbörger”):

(org-export-string-as
 (with-temp-buffer
   (insert-file-contents-literally "unicode-file.org")
   (buffer-string))
 'html t)

With Org 9.6.1 from Emacs master, I get the following warning, and I
am asked to select a coding system:

> These default coding systems were tried to encode the following
> problematic characters in the buffer ‘ *temp*’:
> ...

With previous Org versions, this did not happen, export would just
work.  Note that I insert contents literally because I do not want
‘find-file-hook’, automatic uncompression, etc. (which are avoided
according to the doc string of insert-file-contents-literally).

Could the old behavior be restored?

Best wishes
Jens



Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]

2023-02-16 Thread Alain . Cochard
Bruno BEAUFILS writes on Thu 16 Feb 2023 11:03:

 > OK but you still can do this by just export the file to LaTeX
 > (buffer or file) when needed.

In general, I want to see the final result, if only to check that it
is correct latex (as far as I can see, any crap is happily transformed
into a .tex by 'C-c C-e l l').  So in practice, if I understand
correctly what you say, once the appropriate result (pdf) is obtained,
I would have to use an extra command (C-c C-e l l or C-c C-e l l) to
generate the .tex.

But I can understand your point, especially if you seldom use the
.tex, and I hope the developers can create a user option, as Ihor
proposed.  I think most users will prefer the current situation to be
the default, though...



-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France | [ slot available for rent ]




Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]

2023-02-16 Thread Bruno BEAUFILS
On Wed, Feb 15, 2023 at 08:37:51PM +, Ihor Radchenko wrote:
> The problem with LaTeX export is that it is not always possible to know
> if the process truly finished without errors or not.

How so?

> I guess we might make this a user options, if more people are
> interested.

I personnaly think that this should be a nice option.

> Meanwhile, you can tweak org-latex-logfiles-extensions adding "tex".

I tried that but I do not want it to be a global value : in some case
I still want the latex file to be the output (I do specific latex
export in that case) for instance when things goes wrong.

Maybe I should try to find a way to set this variable only when I
export to PDF.

I will look at hooks but if you know the one I should use that could
be nice.

-- 
Bruno BEAUFILS


signature.asc
Description: PGP signature


Re: bug#61546: [PATCH] Fix some org functionality breaking upon changing `calendar-buffer'

2023-02-16 Thread Ihor Radchenko
Thuna  writes:

>> If not, you will need to add TINYCHANGE cookie to the commit
>> message. See https://orgmode.org/worg/org-contribute.html#first-patch
> That is a bit of an issue.  Do org contributions and emacs contributions
> count towards the same 15 LoC limit?  If so, I have already exhausted
> mine, so TINYCHANGE won't work.

AFAIK, we count separately. Org mode is a separate project, despite
being distributed together with Emacs. At least, we usually only
consider LOCs contributed to Org.

Let me CC Bastien (the Org maintainer) to clarify.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]

2023-02-16 Thread Bruno BEAUFILS
On Thu, Feb 16, 2023 at 06:54:16AM +0100, Hanno Perrey wrote:
> I see the export to PDF as a shortcut only and appreciate having the
> .tex file besides it. As the TeX file is the most reliable way to
> regenerate the exact PDF again later again (even on other peoples'
> machines without Emacs installed) I like to keep it in many cases
> "for the record".

You just still can export the original source file and convert it to
latex if needed.

> I would personally opt for keeping the current default, that is keeping the 
> TeX file.

I would opt for letting that choice to the user (through the settings
of a buffer settings).

-- 
Bruno BEAUFILS


signature.asc
Description: PGP signature


Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]

2023-02-16 Thread Bruno BEAUFILS
On Wed, Feb 15, 2023 at 09:52:52PM +0100, alain.coch...@unistra.fr wrote:
> Sometimes I select a part of the .tex and send it to someone who does
> not use Org mode, for inclusion into his own tex file.  One can also
> think about doing things that are not (yet) possible with Org mode (or
> that one does not know how to do).

OK but you still can do this by just export the file to LaTeX (buffer
or file) when needed.

-- 
Bruno BEAUFILS


signature.asc
Description: PGP signature