Re: problem with org-map-entries and the doc for export hooks

2023-06-09 Thread Victor A. Stoichita


Le 08 Jun 2023, Ihor Radchenko  a écrit :

> "Victor A. Stoichita"  writes:
>
>> I still see the problem with org version 9.6.6 and your latest example
>> code. 
>>
>> I also checked with emacs -Q which has org version 9.6.1.
>>
>> I’m testing this on the attached file.
>
> Thanks for providing an example!
> You encountered a bug.
> Fixed, on bugfix.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=84e5a4da5

Great! Thank you!



Re: Where does headline data end for the purpose of `org-adapt-indentation´ == ´headline-data

2023-06-09 Thread Ihor Radchenko
Farblos  writes:

>> Note that we had some bugs in this area in older Org versions.
>
> I happen to have master from git://git.savannah.gnu.org/emacs.git
> checked out here.  How recent is that w.r.t. "bleeding edge Org" from
> git://git.savannah.gnu.org/emacs/org-mode.git?  I haven't found anything
> on that in the Org FAQ https://orgmode.org/worg/org-faq.html.

Emacs master tracks the latest stable Org release.

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



Re: Is this proper time format?

2023-06-09 Thread Ihor Radchenko
David Masterson  writes:

>> "Timestamp" is the general term we use. We make it explicit in the
>> parent section that timestamps may or may not have time specification:
>>
>> 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>=
>
> Maybe I'm not explicit enough.  In section 8.1 of the Org 9.6 manual is
> a subsection "Time/Date Range" that *implies* times are supported in
> ranges by the use of words "time" and "timestamp" when, above, you're
> saying they are undefined (unsupported?) for now.  I'm merely saying
> adjust the manual to remove the implication.

Please check the manual from main branch of Org. It has more text:

- Time/Date range ::

  #+cindex: timerange
  #+cindex: date range
  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

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



Re: mailto link issue in 9.5.5 and 9.6.6

2023-06-09 Thread Ihor Radchenko
Max Nikulin  writes:

>> May you elaborate? (Or, better, send a patch)
>
> The typo in https://orgmode.org/worg/org-faq.html#mailto-links
>
> browse-url~browser-function
> --^

Fixed.
https://git.sr.ht/~bzg/worg/commit/60bed811

> Looking at 
> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c4adfbae24d9
> Allow for custom URL handlers in browse-url.
> (included into Emacs-28)
>
>> +(defun browse-url--mailto (url &rest args)
>> +  "Calls `browse-url-mailto-function' with URL and ARGS."
>> +  (funcall browse-url-mailto-function url args))
>
> I decided that it is consistent with
>
>>nil("mailto:sran...@gmail.com"; (nil))
>>browse-url--mailto("mailto:sran...@gmail.com"; nil)
>
> when `browse-url-mailto-function' is set to nil. However docstring to 
> this variable allows nil (perhaps there is really an Emacs bug). Now I 
> am puzzled why setting `browse-url-mailto-function' to 
> `browse-url-default-browser' does not help. I have no idea what should 
> be suggested to users instead of nil.

This is Emacs bug that should be reported.
I do not think that we need to document every workaround for Emacs bugs.
Especially given that Emacs 29 is just around the corner.

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



Re: [BUG] org-fold-core--fix-folded-region slows down typing [9.6.6 (release_9.6.6 @ /home/viz/lib/ports/emacs/lisp/org/)]

2023-06-09 Thread Ihor Radchenko
Visuwesh  writes:

> In a largeish buffer, org-fold-core--fix-folded-region significantly
> slows down typing to a point where I have to wait a few milliseconds to
> see the characters typed.  With emacs -Q, the slow down isn't as bad as
> with my full configuration but it is still noticeable.  Setting
> `org-fold-core--ignore-modifications' to t makes the lag go away.

Well. This can happen when you have a huge number of text properties in
your buffer. It is caused by details of how Emacs stores and searches
text properties.

You can try to set `org-fold-core-style' to overlays. Or you can try to
disable flyspell. Or you can try to disable org-num that adds up to text
properties.

Canceled.
Not much can be done on Org side.

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



[BUG] org-fold-core--fix-folded-region slows down typing [9.6.6 (release_9.6.6 @ /home/viz/lib/ports/emacs/lisp/org/)]

2023-06-09 Thread Visuwesh
In a largeish buffer, org-fold-core--fix-folded-region significantly
slows down typing to a point where I have to wait a few milliseconds to
see the characters typed.  With emacs -Q, the slow down isn't as bad as
with my full configuration but it is still noticeable.  Setting
`org-fold-core--ignore-modifications' to t makes the lag go away.

The large buffer that I type in has a PROPERTIES drawer for every
heading there is and I have 481 such headings.  There is one heading
with a couple of drawers that are hundred of lines long and might even
have long lines.  I can send this heading if you would like privately.
The buffer has the following STARTUP options set:

#+STARTUP: fold num

I have attached three files:

· org-fold-core-slow-profile: profiler report in the said large
  buffer with my Emacs configuration.
· org-fold-core-fast-profile: profiler report in a fresh new org
  buffer with only two lines, also recorded with my Emacs
  configuration.
· org-fold-core-emacs-Q-still-kinda-slow: profiler report in the
  said large buffer recorded in `emacs -Q'.

If this is not enough info, please tell me how to help.  Thank you.



org-fold-core-slow-profile
Description: Binary data


org-fold-core-fast-profile
Description: Binary data


org-fold-core-emacs-Q-still-kinda-slow
Description: Binary data


Emacs  : GNU Emacs 29.0.91 (build 2, x86_64-pc-linux-gnu, X toolkit, Xaw scroll 
bars)
 of 2023-06-01
Package: Org mode version 9.6.6 (release_9.6.6 @ 
/home/viz/lib/ports/emacs/lisp/org/)

current state:
==
(setq
 org-agenda-prefix-format '((agenda . " %12:c %12t %s") (todo . " %i %-12:c") 
(tags . " %i %-12:c")
(search . " %i %-12:c"))
 org-attach-preferred-new-method 'dir
 org-link-elisp-confirm-function 'yes-or-no-p
 org-directory "/home/viz/doc/org"
 org-bibtex-headline-format-function #[257 "\300%1\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]
 org-pdftools-get-desc-function 'vz/org-pdftools-link-description
 org-agenda-todo-keyword-format "%s"
 org-agenda-scheduled-leaders '("Scheduled " "Sched. %2d ")
 org-startup-folded t
 org-agenda-skip-scheduled-if-done t
 org-agenda-files '("/home/viz/doc/org/calendar.org" 
"/home/viz/doc/org/habits.org"
"/home/viz/doc/uni/schedule.org" 
"/home/viz/doc/uni/epac.org")
 org-capture-templates '(("u" "University Schedule")
 ("ua" "Assignment" entry
  (file+headline "/home/viz/doc/uni/schedule.org" 
"Changes/Quizzes/Assignments")
  #'doct--fill-template :empty-lines-after 1 :prepend t 
:doct
  (:doct-name "Assignment" :keys "a" :headline 
"Changes/Quizzes/Assignments" :tag
   ":assignment:" :stat "DEADLINE: " :inherited-keys 
"ua" :after-finalize
   vz/update-calendar-markers-after-capture :file 
"/home/viz/doc/uni/schedule.org"
   :prepend t :empty-lines-after 1 :template
   "* TODO %?  %{tag}\n%{stat}%(call-interactively 
#'org-time-stamp)" :doct-custom
   (:tag ":assignment:" :stat "DEADLINE: "))
  )
 ("uq" "Quiz" entry
  (file+headline "/home/viz/doc/uni/schedule.org" 
"Changes/Quizzes/Assignments")
  #'doct--fill-template :empty-lines-after 1 :prepend t 
:doct
  (:doct-name "Quiz" :keys "q" :tag ":quiz:" :headline 
"Changes/Quizzes/Assignments" :stat
   "SCHEDULED: " :inherited-keys "uq" :after-finalize
   vz/update-calendar-markers-after-capture :file 
"/home/viz/doc/uni/schedule.org"
   :prepend t :empty-lines-after 1 :template
   "* TODO %?  %{tag}\n%{stat}%(call-interactively 
#'org-time-stamp)" :doct-custom
   (:tag ":quiz:" :stat "SCHEDULED: "))
  )
 ("uo" "Other" entry
  (file+headline "/home/viz/doc/uni/schedule.org" 
"Changes/Quizzes/Assignments")
  #'doct--fill-template :empty-lines-after 1 :prepend t 
:doct
  (:doct-name "Other" :keys "o" :headline 
"Changes/Quizzes/Assignments" :tag "" :stat
   "SCHEDULED: " :inherited-keys "uo" :after-finalize
   vz/update-calendar-markers-after-capture :file 
"/home/viz/doc/uni/schedule.org"
   :prepend t :empty-lines-after 1 :template
   "* TODO %?  %{tag}\n%{stat}%(call-interactively 
#'org-time-stamp)" :doct-custom
   (:tag "" :stat "SCHEDULED: "))
  )
 ("uh" "Homework" entry
  (file+headline "/home/viz/doc/uni/schedule.org" 
"Changes/Quizzes/Assignments")
  

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-09 Thread Max Nikulin

On 06/06/2023 23:08, gerard.vermeu...@posteo.net wrote:

Is it also possible to do
#+EXCLUDE_TAGS: not "no" "skip"
or something similar in an Org file?


It is a feature of `org-export-with-drawers'. Variants of its value:
- t,
- nil,
- ("drawer1" "drawer2"),
- (not "drawer1" "drawer2")

As to tags, separate lists are used: `org-export-select-tags' and 
`org-export-exclude-tags'.




Re: mailto link issue in 9.5.5 and 9.6.6

2023-06-09 Thread Max Nikulin

On 06/06/2023 21:49, Scott Randby wrote:

On 6/6/23 10:30, Max Nikulin wrote:


Try to set `browse-url-mailto-function' to `browse-url-default-browser'.


I tried that yesterday and it didn't work.


It is strange taking into account `browse-url-default-handlers'. I am 
curious what happens in response to


(browse-url-default-browser "mailto:sran...@gmail.com";)




Re: [BUG] org-fold-core--fix-folded-region slows down typing [9.6.6 (release_9.6.6 @ /home/viz/lib/ports/emacs/lisp/org/)]

2023-06-09 Thread Visuwesh
[வெள்ளி ஜூன் 09, 2023] Ihor Radchenko wrote:

> Visuwesh  writes:
>
>> In a largeish buffer, org-fold-core--fix-folded-region significantly
>> slows down typing to a point where I have to wait a few milliseconds to
>> see the characters typed.  With emacs -Q, the slow down isn't as bad as
>> with my full configuration but it is still noticeable.  Setting
>> `org-fold-core--ignore-modifications' to t makes the lag go away.
>
> Well. This can happen when you have a huge number of text properties in
> your buffer. It is caused by details of how Emacs stores and searches
> text properties.
>
> You can try to set `org-fold-core-style' to overlays. Or you can try to
> disable flyspell. Or you can try to disable org-num that adds up to text
> properties.

What kind of disasters will I invite if I permanently set
`org-fold-core--ignore-modifications' to t?

> Canceled.
> Not much can be done on Org side.



Re: mailto link issue in 9.5.5 and 9.6.6

2023-06-09 Thread Max Nikulin

On 09/06/2023 16:19, Ihor Radchenko wrote:

Max Nikulin writes:

browse-url~browser-function


Fixed. https://git.sr.ht/~bzg/worg/commit/60bed811


Thanks


nil("mailto:sran...@gmail.com"; (nil))


when `browse-url-mailto-function' is set to nil. However docstring to
this variable allows nil (perhaps there is really an Emacs bug). Now I
am puzzled why setting `browse-url-mailto-function' to
`browse-url-default-browser' does not help. I have no idea what should
be suggested to users instead of nil.


This is Emacs bug that should be reported.
I do not think that we need to document every workaround for Emacs bugs.
Especially given that Emacs 29 is just around the corner.


Debian bookworm (that is about to be released) has Emacs-28.

It is preferable to have a link clearly describing a workaround, at 
least to a specific comment at debbugs. However I believe, it is better 
to describe a recipe in Org FAQ and to retain users from customizing 
`org-link-parameters' if no web page may be suggested instead.


Anyway we do not have a workaround yet.





Re: Is this proper time format?

2023-06-09 Thread David Masterson
Ihor Radchenko  writes:

> David Masterson  writes:
>
>>> "Timestamp" is the general term we use. We make it explicit in the
>>> parent section that timestamps may or may not have time specification:
>>>
>>> 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>=
>>
>> Maybe I'm not explicit enough.  In section 8.1 of the Org 9.6 manual is
>> a subsection "Time/Date Range" that *implies* times are supported in
>> ranges by the use of words "time" and "timestamp" when, above, you're
>> saying they are undefined (unsupported?) for now.  I'm merely saying
>> adjust the manual to remove the implication.
>
> Please check the manual from main branch of Org. It has more text:

I disagree. I cloned Org from Savannah and made the attached patch
file from the main branch.  First time for me attaching a file to a
message.   Does it work for you?

diff --git a/doc/org-guide.org b/doc/org-guide.org
index 95828e4c0..167f62e49 100644
--- a/doc/org-guide.org
+++ b/doc/org-guide.org
@@ -1088,12 +1088,12 @@ time information is called a /timestamp/ in Org mode.
 :DESCRIPTION: Assigning a time to a tree entry.
 :END:
 
-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>=.
-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 [[*The Weekly/Daily Agenda]]).  We distinguish:
+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>=.  One or
+more timestamps 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 [[*The Weekly/Daily Agenda]]).  We distinguish:
 
 - Plain timestamp; Event; Appointment ::
 
@@ -1132,15 +1132,25 @@ the agenda (see [[*The Weekly/Daily Agenda]]).  We 
distinguish:
 <%%(diary-float t 4 2)>
   #+end_example
 
-- Time/Date range ::
+- Date range ::
 
-  Two timestamps connected by =--= denote a range.
+  Two timestamps connected by =--= denote a date range.  NOTE: time is
+  not specified in these timestamps -- just dates,
 
   #+begin_example
   ,** Meeting in Amsterdam
  <2004-08-23 Mon>--<2004-08-26 Thu>
   #+end_example
 
+- Time range ::
+
+  Two times in a timestamp connected by =-= denote a time range.
+
+  #+begin_example
+  ,** Planning meeting
+ <2004-08-23 Mon 9:00-10:00>
+  #+end_example
+
 - Inactive timestamp ::
 
   Just like a plain timestamp, but with square brackets instead of
diff --git a/doc/org-manual.org b/doc/org-manual.org
index c11694849..824a46eaf 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -5991,42 +5991,32 @@ is used in a much wider sense.
 :PROPERTIES:
 :DESCRIPTION: Assigning a time to a tree entry.
 :END:
-#+cindex: timestamps
-#+cindex: ranges, time
-#+cindex: date stamps
-#+cindex: deadlines
-#+cindex: scheduling
-
-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:
+
+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>=.  One or
+more timestamps 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 [[*The Weekly/Daily Agenda]]).  We distinguish:
 
 - Plain timestamp; Event; Appointment ::
 
-  #+cindex: timestamp
-  #+cindex: appointment
   A simple timestamp just assigns a date/time to an item.  This is
   just like writing down an appointment or event in a paper agenda.
-  In the agenda display, the headline of an entry associated with
-  a plain timestamp is shown exactly on that date.
 
   #+begin_example
   ,* Meet Peter at the movies
 <2006-11-01 Wed 19:15>
   ,* Discussion on climate change
-<2006-11-02 Thu>
+<2006-11-02 Thu 20:00-22:00>
   #+end_example
 
 - Timestamp with repeater interval ::
 
-  #+cindex: timestamp, with repeater interval
   A timestamp may contain a /repeater interval/, indicating that it
   applies not only on the given date, but again and again after
-  a certain interval of N hours (h), days (d), weeks (w), months (m),
-  or years (y).  The following shows up in the agenda every Wednesday:
+  a certain interval of N days (d), weeks (w), months (m), or years
+  (y).  The following shows up in the agend

Re: Is this proper time format?

2023-06-09 Thread David Masterson
Ihor Radchenko  writes:

> David Masterson  writes:
>
>>> "Timestamp" is the general term we use. We make it explicit in the
>>> parent section that timestamps may or may not have time specification:
>>>
>>> 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>=
>>
>> Maybe I'm not explicit enough.  In section 8.1 of the Org 9.6 manual is
>> a subsection "Time/Date Range" that *implies* times are supported in
>> ranges by the use of words "time" and "timestamp" when, above, you're
>> saying they are undefined (unsupported?) for now.  I'm merely saying
>> adjust the manual to remove the implication.
>
> Please check the manual from main branch of Org. It has more text:

Shouldn't have inlined the attachment -- here it is as an attachment.

Again, this is a patch to the main branch of Org on Savannah.

diff --git a/doc/org-guide.org b/doc/org-guide.org
index 95828e4c0..167f62e49 100644
--- a/doc/org-guide.org
+++ b/doc/org-guide.org
@@ -1088,12 +1088,12 @@ time information is called a /timestamp/ in Org mode.
 :DESCRIPTION: Assigning a time to a tree entry.
 :END:
 
-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>=.
-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 [[*The Weekly/Daily Agenda]]).  We distinguish:
+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>=.  One or
+more timestamps 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 [[*The Weekly/Daily Agenda]]).  We distinguish:
 
 - Plain timestamp; Event; Appointment ::
 
@@ -1132,15 +1132,25 @@ the agenda (see [[*The Weekly/Daily Agenda]]).  We 
distinguish:
 <%%(diary-float t 4 2)>
   #+end_example
 
-- Time/Date range ::
+- Date range ::
 
-  Two timestamps connected by =--= denote a range.
+  Two timestamps connected by =--= denote a date range.  NOTE: time is
+  not specified in these timestamps -- just dates,
 
   #+begin_example
   ,** Meeting in Amsterdam
  <2004-08-23 Mon>--<2004-08-26 Thu>
   #+end_example
 
+- Time range ::
+
+  Two times in a timestamp connected by =-= denote a time range.
+
+  #+begin_example
+  ,** Planning meeting
+ <2004-08-23 Mon 9:00-10:00>
+  #+end_example
+
 - Inactive timestamp ::
 
   Just like a plain timestamp, but with square brackets instead of
diff --git a/doc/org-manual.org b/doc/org-manual.org
index c11694849..824a46eaf 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -5991,42 +5991,32 @@ is used in a much wider sense.
 :PROPERTIES:
 :DESCRIPTION: Assigning a time to a tree entry.
 :END:
-#+cindex: timestamps
-#+cindex: ranges, time
-#+cindex: date stamps
-#+cindex: deadlines
-#+cindex: scheduling
-
-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:
+
+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>=.  One or
+more timestamps 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 [[*The Weekly/Daily Agenda]]).  We distinguish:
 
 - Plain timestamp; Event; Appointment ::
 
-  #+cindex: timestamp
-  #+cindex: appointment
   A simple timestamp just assigns a date/time to an item.  This is
   just like writing down an appointment or event in a paper agenda.
-  In the agenda display, the headline of an entry associated with
-  a plain timestamp is shown exactly on that date.
 
   #+begin_example
   ,* Meet Peter at the movies
 <2006-11-01 Wed 19:15>
   ,* Discussion on climate change
-<2006-11-02 Thu>
+<2006-11-02 Thu 20:00-22:00>
   #+end_example
 
 - Timestamp with repeater interval ::
 
-  #+cindex: timestamp, with repeater interval
   A timestamp may contain a /repeater interval/, indicating that it
   applies not only on the given date, but again and again after
-  a certain interval of N hours (h), days (d), weeks (w), months (m),
-  or years (y).  The following shows up in the agenda every Wednesday:
+  a certain interval of N days (d), weeks (w), months (m), or years
+  (y).  The following shows up in the agenda every Wednesday:
 
   #+begin_exa