[no subject]

2023-12-11 Thread Kenny Ballou


Forgive for the noise, I just double checked the patch and noticed the 
`current-prefix-arg' was still being used.  Fixed.




[PATCH] lisp/org-capture.el: use `org-store-link' for %K values

2023-12-11 Thread Kenny Ballou
* org-capture.el (org-capture-fill-template): fill %K values using link
value from `org-store-link', which respects `org-id-link-to-use-id'.
* doc/ORG-NEWS: (Template variable expansion %K) Document new behavior.

Reported-by: Nathaniel W Griswold 
Signed-off-by: Kenny Ballou 
Link: 
https://list.orgmode.org/EF459D47-FCA4-4A18-AFC7-3E62159F186C@manicmind.earth/

TINYCHANGE
---
 etc/ORG-NEWS| 5 +
 lisp/org-capture.el | 7 ++-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 9328f333c..9858df045 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -539,6 +539,11 @@ Currently implemented options are:
   tasks this technically violates the iCalendar spec, but some
   iCalendar programs support this usage.
 
+*** Capture template expansion now supports ID links
+
+The capture template expansion element =%K= creates links using
+~org-store-link~, which respects the values of ~org-id-link-to-use-id~.
+
 ** New features
 *** =ob-plantuml.el=: Support tikz file format output
 
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index e482f667f..4bbe2c43a 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1675,11 +1675,8 @@ Expansion occurs in a temporary Org mode buffer."
  (org-no-properties org-clock-heading)
""))
 (v-K (if (marker-buffer org-clock-marker)
- (org-link-make-string
-  (format "%s::*%s"
-  (buffer-file-name (marker-buffer org-clock-marker))
-  v-k)
-  v-k)
+  (org-with-point-at org-clock-marker
+(org-store-link nil nil))
""))
 (v-f (or (org-capture-get :original-file-nondirectory) ""))
 (v-F (or (org-capture-get :original-file) ""))

base-commit: 420ed4e0338d12e26c62d3666ca39e7cff323d05
-- 
2.41.0




[PATCH] lisp/org-capture.el: use `org-store-link' for %K values

2023-12-11 Thread Kenny Ballou
* org-capture.el (org-capture-fill-template): fill %K values using link
value from `org-store-link', which respects `org-id-link-to-use-id'.
* doc/ORG-NEWS: (Template variable expansion %K) Document new behavior.

Reported-by: Nathaniel W Griswold 
Signed-off-by: Kenny Ballou 
Link: 
https://list.orgmode.org/EF459D47-FCA4-4A18-AFC7-3E62159F186C@manicmind.earth/

TINYCHANGE
---
 etc/ORG-NEWS| 5 +
 lisp/org-capture.el | 7 ++-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 9328f333c..9858df045 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -539,6 +539,11 @@ Currently implemented options are:
   tasks this technically violates the iCalendar spec, but some
   iCalendar programs support this usage.
 
+*** Capture template expansion now supports ID links
+
+The capture template expansion element =%K= creates links using
+~org-store-link~, which respects the values of ~org-id-link-to-use-id~.
+
 ** New features
 *** =ob-plantuml.el=: Support tikz file format output
 
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index e482f667f..73ea9d1df 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1675,11 +1675,8 @@ Expansion occurs in a temporary Org mode buffer."
  (org-no-properties org-clock-heading)
""))
 (v-K (if (marker-buffer org-clock-marker)
- (org-link-make-string
-  (format "%s::*%s"
-  (buffer-file-name (marker-buffer org-clock-marker))
-  v-k)
-  v-k)
+  (org-with-point-at org-clock-marker
+(org-store-link current-prefix-arg nil))
""))
 (v-f (or (org-capture-get :original-file-nondirectory) ""))
 (v-F (or (org-capture-get :original-file) ""))

base-commit: 420ed4e0338d12e26c62d3666ca39e7cff323d05
-- 
2.41.0




Re: [FR] Allow flattened imenu index

2023-12-11 Thread João Távora
On Mon, Dec 11, 2023 at 11:54 PM Dmitry Gutov  wrote:
>
> On 12/12/2023 01:48, João Távora wrote:
> > On Mon, Dec 11, 2023 at 11:41 PM Dmitry Gutov  wrote:
> >> On 12/12/2023 01:35, João Távora wrote:
> >>> Or maybe say what the ruby-mode imenu backend
> >>> does?
> >> Juri just posted a long example of what ruby-mode does (and ruby-ts-mode
> >> too) in his last message in this thread.
> > OK, and doesn't it answer_your_  question?  With Eglot
> >
> > Method > ModuleExample::ClassExample > instance_method
> > Method > ClassExample > class_method
> >
> > If both methods were named "foo" no problem, right?
>
> But this doesn't look right: if 'class_method' is in a class called
> ModuleExample::ClassExample, shouldn't its entry look like
>
>Method > ModuleExample::ClassExample > class_method
>
> as well?

Take it up with the LS.  I didn't write it.

> And then, if both 'instance_method' and 'class_method' actually are
> called 'foo', then we'd have a problem.

Bizarrely, you wouldn't have a tree to start with, which probably
explains why the devs of the LS Juri is using opted for that
layout.

> This entry from his message also looks odd:
>
>Module >  > ModuleExample

If you can reproduce it, show the repro.

João



Re: [FR] Allow flattened imenu index

2023-12-11 Thread João Távora
On Mon, Dec 11, 2023 at 11:41 PM Dmitry Gutov  wrote:
>
> On 12/12/2023 01:35, João Távora wrote:
> > Or maybe say what the ruby-mode imenu backend
> > does?
>
> Juri just posted a long example of what ruby-mode does (and ruby-ts-mode
> too) in his last message in this thread.

OK, and doesn't it answer _your_ question?  With Eglot

Method > ModuleExample::ClassExample > instance_method
Method > ClassExample > class_method

If both methods were named "foo" no problem, right?
When run without Eglot, also no problem, no duplicate strings,
right?

??



Re: [FR] Allow flattened imenu index

2023-12-11 Thread João Távora
On Mon, Dec 11, 2023 at 11:23 PM Dmitry Gutov  wrote:

> >> But if the LS will produce distinct strings, good.
> > All imenu backends, at least all the ones I've seen, produce
> > trees, not strings.
>
> There are exceptions, like the previously mentioned one.

What is the imenu backend that produces strings?  A list of
strings is still a tree, albeit very flat.  Some LS's produce
such things.  Are there imenu backends that produce lists of
strings with duplicates?   Where, when, how is that not a
problem with the existing imenu UI already, and have we heard
of it all these years?

> > If you collect all the paths from the root to
> > all the nodes into lists and make strings thereof, the resulting
> > set will always be a distinct strings.  So I don't understand the
> > problem you were surfacing: any particular imenu backend in mind?
>
> Do you have an example of such tree produced by Eglot when a class
> contains an instance and a singleton method with the same name?

No.  I thought you did, else why would you bring it up?  Grab a
Ruby LS and try it.  Or maybe say what the ruby-mode imenu backend
does? No rush, but as usual I think there's no point discussing
odd conjectures without something palpable in front.

Thanks,
João



Re: [FR] Allow flattened imenu index

2023-12-11 Thread João Távora
On Mon, Dec 11, 2023 at 7:24 PM Dmitry Gutov  wrote:
>
> It's no invention, it's docstring syntax for reference to a method.

In Ruby right?

> But if the LS will produce distinct strings, good.

All imenu backends, at least all the ones I've seen, produce
trees, not strings.  If you collect all the paths from the root to
all the nodes into lists and make strings thereof, the resulting
set will always be a distinct strings.  So I don't understand the
problem you were surfacing: any particular imenu backend in mind?

João



Re: [FR] Allow flattened imenu index

2023-12-11 Thread João Távora
On Mon, Dec 11, 2023 at 7:27 PM Ihor Radchenko  wrote:

> > Indeed, it's unfortunate that imenu--make-index-alist and imenu--index-alist
> > are named as internal.
>
> Should they be renamed to `imenu-make-index-alist' and `imenu-index-alist' 
> then?

Maybe, but it's much more urgent IMO to review the representation
they describe, since it's all over the place.  Ideally do this
before any rename.

Incidentally, I just remembered why breadcrumb-jump uses the
'breadcrumb-region' text property cookie: it's because without it
the current imenu tree structure has no way to for backends to
store locations to non-leaf nodes, which are often among the places
you want to jump to.

text-properties + standard cons trees + "special elements" is a
bit of a ugly mess, but OTOH it works and is backwards compatible
to existing frontends and backends.

So one of the possibilities that whoever conducts this review
may consider is an 'imenu-region' text property similar to
'breadcrumb-region', describe it imenu--index-alist, and
make M-x imenu take advantage of it.

João



Re: [PATCH] lisp/org-capture.el: use link ID's for %K

2023-12-11 Thread Kenny Ballou


On 2023-12-11 19:16 GMT, Ihor Radchenko wrote:
>
>> +*** Capture template expansion now supports ID links
>> +
>> +The capture template expansion element `%K' creates links using
>> +`org-store-link', which respects the values of
>> +`org-id-link-to-use-id'.
>
> Here, we simply use Org markup. So, =%K=, ~org-store-link~, and 
> ~org-id-link-to-use-id~.
> See doc/Documentation_Standards.org for details.

I'll update for the new patch version.

>
>> +  (save-excursion
>
> `save-excursion' should be unnecessary here. `org-with-point-at' already
> takes care about restoring window configuration and point.
>

Correct, I'll remove it.  The patch is now much simpler :)

>> +(org-with-point-at org-clock-marker
>> +  (substring-no-properties (org-store-link 
>> current-prefix-arg nil
>>  ""))
>
> Using `current-prefix-arg' is incorrect here.
> `org-capture-fill-template' is called from `org-capture' that assigns a
> completely different meaning to the prefix argument (see the
> docstring).
>

Okay, I'll pass `nil' instead.  I'm not sure any other value makes
sense.

> Also, why `substring-no-properties'?

I figured the link should not come with the face properties inherited
from `org-store-link'.  If that's incorrect, I'll drop it.  It seems to
work either way.

-- 
-Kenny



Re: [BUG] Hard-coded and inconsistent todo states in org-agenda.el [9.7-pre (release_9.6.12-934-g4d72f3 @ /home/rst/Devel/org-mode/lisp/)]

2023-12-11 Thread Raffael Stocker


Ihor Radchenko  writes:

> May you try the attached patch?

I tried it with a selection of different states (final and not) and it
worked in every case.  Thanks!

Regards,

Raffael



Re: [FR] Allow flattened imenu index

2023-12-11 Thread Ihor Radchenko
Juri Linkov  writes:

>> It shouldn't be needed here at all, but in case anyone's thinking
>> about it, please avoid messing with imenu's internal representation of
>> hierarchies as that structure is relied upon by many extensions (not just
>> mine, but several others).  Even certain things supported by certain
>> imenu-presenting frontends (like "special elements") are not supported by
>> other frontends.  It's a bit of a mess.  The symbols holding/describing
>> this representation (imenu--index-alist, maybe others) are incorrectly
>> named '--' but they are most definitely externally visible and used
>> customization points.
>
> Indeed, it's unfortunate that imenu--make-index-alist and imenu--index-alist
> are named as internal.

Should they be renamed to `imenu-make-index-alist' and `imenu-index-alist' then?

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



Re: [FR] Allow flattened imenu index

2023-12-11 Thread João Távora
On Mon, Dec 11, 2023 at 5:43 PM Dmitry Gutov  wrote:

> > is still usable even without special characters like "#".
>
> Until a class contains both an instance and a class method with the same
> name, I suppose.

If that happens, the LS will have to provide to distinct paths
to these two distinct items and breadcrumb will have two distinct
strings, so no need to invent #-things.



Re: [FR] Allow flattened imenu index

2023-12-11 Thread João Távora
On Mon, Dec 11, 2023 at 5:21 PM Juri Linkov  wrote:

> > By the way, this seems to be exactly what the breadcrumb-jump command
> > in my breadcrumb.el package does.  Goes reasonably well with a flex/fuzzy
> > completion style.
>
> It would be great to have some form of breadcrumb-jump in imenu.el
> since it's useful on its own even for someone who doesn't use breadcrumbs.

You can copy it over, it  doesn't really need breadcrumbs, though,
it just needs imenu.

The only things I'm seeing in its implementation in a penchant
for a particular text property `breadcrumb-region`, which
has information that imenu's structure didn't have a good
place to place.  But it's not required, as you noticed, I  suppose
it just gives it increased accuracy.

> When eglot is enabled then imenu-create-index-function returns a tree.
>
> What is interesting is that breadcrumb-jump already correctly handles both
> a flat list and a tree:

Yes, that's the point.  Though when using Eglot, the exact tree
structure -- of any -- depends on the language server.

João



Re: [FR] Allow flattened imenu index

2023-12-11 Thread Juri Linkov
>>   menu1
>> sub-item1
>> sub-item2
>>
>> could be flattened to
>>
>>   menu1 -> sub-item1
>>   menu1 -> sub-item2
>
> By the way, this seems to be exactly what the breadcrumb-jump command
> in my breadcrumb.el package does.  Goes reasonably well with a flex/fuzzy
> completion style.

It would be great to have some form of breadcrumb-jump in imenu.el
since it's useful on its own even for someone who doesn't use breadcrumbs.

> You can look at it for an implementation idea.  Just be sure to do this
> flattening at the presentation level (i.e. M-x imenu), not at the
> internal representation level.

Here are some observations while testing on
emacs/test/manual/etags/ruby-src/test.rb.

Both ruby-mode and ruby-ts-mode provide a list that is already flat:

ruby-mode:
  ModuleExample
  ModuleExample#ModuleExample.module_class_method
  ModuleExample#module_instance_method
  ModuleExample::ClassExample
  ModuleExample::ClassExample#+
  ModuleExample::ClassExample#ClassExample.class_method
  ModuleExample::ClassExample#instance_method

ruby-ts-mode:
  ModuleExample
  ModuleExample#module_instance_method
  ModuleExample.module_class_method
  ModuleExample::ClassExample
  ModuleExample::ClassExample#+
  ModuleExample::ClassExample#instance_method
  ModuleExample::ClassExample.class_method

When eglot is enabled then imenu-create-index-function returns a tree.

What is interesting is that breadcrumb-jump already correctly handles both
a flat list and a tree:

a flat list in breadcrumb-jump completions is exactly the same as in 'imenu':
  ModuleExample
  ModuleExample#module_instance_method
  ModuleExample.module_class_method
  ModuleExample::ClassExample
  ModuleExample::ClassExample#+
  ModuleExample::ClassExample#instance_method
  ModuleExample::ClassExample.class_method

a tree from eglot in breadcrumb-jump completions:
  Class > ModuleExample > ClassExample
  Method > ClassExample > class_method
  Method > ModuleExample > module_class_method
  Method > ModuleExample > module_instance_method
  Method > ModuleExample::ClassExample > +
  Method > ModuleExample::ClassExample > instance_method
  Module >  > ModuleExample

is still usable even without special characters like "#".

> It shouldn't be needed here at all, but in case anyone's thinking
> about it, please avoid messing with imenu's internal representation of
> hierarchies as that structure is relied upon by many extensions (not just
> mine, but several others).  Even certain things supported by certain
> imenu-presenting frontends (like "special elements") are not supported by
> other frontends.  It's a bit of a mess.  The symbols holding/describing
> this representation (imenu--index-alist, maybe others) are incorrectly
> named '--' but they are most definitely externally visible and used
> customization points.

Indeed, it's unfortunate that imenu--make-index-alist and imenu--index-alist
are named as internal.



[PATCH] lisp/org-capture.el: use link ID's for %K

2023-12-11 Thread Kenny Ballou
* org-capture.el (org-capture-fill-template): fill %K values using link
value from `org-store-link', which respects `org-id-link-to-use-id'.
* doc/ORG-NEWS: (Template variable expansion %K) Document new behavior.

Reported-by: Nathaniel W Griswold 
Signed-off-by: Kenny Ballou 
Link: 
https://list.orgmode.org/EF459D47-FCA4-4A18-AFC7-3E62159F186C@manicmind.earth/

TINYCHANGE
---
 etc/ORG-NEWS| 6 ++
 lisp/org-capture.el | 8 +++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 9328f333c..55ab2453c 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -539,6 +539,12 @@ Currently implemented options are:
   tasks this technically violates the iCalendar spec, but some
   iCalendar programs support this usage.
 
+*** Capture template expansion now supports ID links
+
+The capture template expansion element `%K' creates links using
+`org-store-link', which respects the values of
+`org-id-link-to-use-id'.
+
 ** New features
 *** =ob-plantuml.el=: Support tikz file format output
 
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index e482f667f..ee86a3ee0 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1675,11 +1675,9 @@ Expansion occurs in a temporary Org mode buffer."
  (org-no-properties org-clock-heading)
""))
 (v-K (if (marker-buffer org-clock-marker)
- (org-link-make-string
-  (format "%s::*%s"
-  (buffer-file-name (marker-buffer org-clock-marker))
-  v-k)
-  v-k)
+  (save-excursion
+(org-with-point-at org-clock-marker
+  (substring-no-properties (org-store-link 
current-prefix-arg nil
""))
 (v-f (or (org-capture-get :original-file-nondirectory) ""))
 (v-F (or (org-capture-get :original-file) ""))

base-commit: 420ed4e0338d12e26c62d3666ca39e7cff323d05
-- 
2.41.0




Re: [PATCH] lisp/org-capture.el: use link ID's for %K

2023-12-11 Thread Kenny Ballou


On 2023-12-10 12:19 GMT, Ihor Radchenko wrote:
> Kenny Ballou  writes:
>
>>
>> I ended up using `org-store-link-plist'.  For some reason that I don't
>> understand, the `save-excursion' -> `org-store-link' was not updating
>> `org-stored-links'.
>
> I can see it from the code now. Basically, instead of updating
> `org-stored-links', `org-store-link' returns the link when called
> non-interactively (with nil INTERACTIVE? argument).
> Now documented on main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5e809903d

Thank you for this!

>
>> ... Similarly, I had to use `save-window-excursion' or
>> the `org-clock-goto' would really break things.
>
> You should not use `org-clock-goto' - it is intended for interactive use
> and does a lot of unnecessary work.
> You may instead do (org-with-point-at org-clock-marker ...)

Yes, it felt heavy handed, and I haven't quite figured out how to query
the current set of functions for desired functionality.  Thank you for
your patience in this process, I believe it has really simplified the
change and the resulting patch (to follow).

Using your suggestions, I believe we can simply grab the link from
`org-store-link' and use it (almost) directly as the value of %K.
Furthermore, we do not need to branch off `org-id-link-to-use-id'
because the correct behavior is captured by `org-store-link'.

My remaining question is whether I should use `current-prefix-arg' or
not?  I'm not sure if that would be surprising or not, or if it would
even get to `org-store-link' when doing a capture.

-- 
-Kenny



Re: [ANN] lisp/ob-tangle-sync.el

2023-12-11 Thread Mehmet Tekman


Hey,

Ihor Radchenko  writes:

> Sorry for the late reply. Just got around to process your email.

All good, I know how it is, especially the grind towards the end of the
year.

>> +  (setq action "export"
>> +file (read-char raw-tangle
>  ^ this

Brilliant, everything seems to at least be working now on this branch. I
think I can springboard off this and try to put together something a bit
more refined, though probably over the winter/holiday period.

Cheers,
Mehmet



Re: TODO item: is there a way to alert me about it?

2023-12-11 Thread Ihor Radchenko
Renato Pontefice  writes:

> Hi,
> I’m wondering if I can have an alert for a TODO that I’ve to execute (i.e.) 
> some minutes later.
>
> Is there a way?

See https://orgmode.org/manual/Weekly_002fdaily-agenda.html (Appointment 
reminders).
There are also various third-party packages.

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



Re: [BUG] Hard-coded and inconsistent todo states in org-agenda.el [9.7-pre (release_9.6.12-934-g4d72f3 @ /home/rst/Devel/org-mode/lisp/)]

2023-12-11 Thread Ihor Radchenko
Raffael Stocker  writes:

> Hi,
>
> org-agenda.el contains the following hard-coded states in 
> ‘org-agenda-to-appt’:
>
> (when (and ok tod (not (string-match "\\`DONE\\|CANCELLED" evt)))...)

Thanks for reporting!
May you try the attached patch?

>From 6ffa23a01acad2d5cd37bafa11a57cf7a0c13cec Mon Sep 17 00:00:00 2001
Message-ID: <6ffa23a01acad2d5cd37bafa11a57cf7a0c13cec.1702304402.git.yanta...@posteo.net>
From: Ihor Radchenko 
Date: Mon, 11 Dec 2023 15:17:41 +0100
Subject: [PATCH] org-agenda-to-appt: Do not hard-code not-done todo keywords

* lisp/org-agenda.el (org-agenda-to-appt): Use org-todo-regexp and
org-not-done-regexp to determine whether an even is already done.

Reported-by: Raffael Stocker 
Link: https://orgmode.org/list/yplmsf4ac6va@mnet-mail.de
---
 lisp/org-agenda.el | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ac8adda7a..6a9b1cc5a 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -11141,10 +11141,16 @@ (defun org-agenda-to-appt ( refresh filter  args)
   (string-match cat-filter cat))
  (and (stringp evt-filter)
   (string-match evt-filter evt)))
-  (wrn (get-text-property 1 'warntime x)))
+  (wrn (get-text-property 1 'warntime x))
+  (todo-regexp (get-text-property 1 'org-todo-regexp x))
+  (not-done-regexp (get-text-property 1 'org-not-done-regexp x)))
  ;; FIXME: Shall we remove text-properties for the appt text?
  ;; (setq evt (set-text-properties 0 (length evt) nil evt))
- (when (and ok tod (not (string-match "\\`DONE\\|CANCELLED" evt)))
+ (when (and ok tod
+;; Exclude done items unconditionally.
+(or (not (and todo-regexp (string-match-p todo-regexp evt))) ; no todo keyword
+(and not-done-regexp (string-match-p not-done-regexp evt)) ; or not done
+))
(setq tod (concat "00" (number-to-string tod)))
(setq tod (when (string-match
 "\\([0-9]\\{1,2\\}\\)\\([0-9]\\{2\\}\\)\\'" tod)
-- 
2.42.0


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


Re: [PATCH] [WORG] Maintenance: on the frequency of bugfix releases

2023-12-11 Thread Bastien Guerry
Ihor Radchenko  writes:

> I think that upper limit for bugfix release frequency is slightly in
> odds with the previous
>
> Org development is the work of volunteers, and we cannot promise to
> follow a release schedule.

You're right -- I've rephrase it like so:

  Security fixes trigger an immediate bugfix release. For other
  important fixes, we generally wait a week between bugfix releases.
  Whenever possible for the maintainers, we wait less than two weeks
  before releasing important fixes.

-- 
 Bastien Guerry



Re: oeg-add-note and double backslash ?

2023-12-11 Thread Ihor Radchenko
David Masterson  writes:

>> No. See `org-skip-over-state-notes'.
>
> Hmm. The docstring on that should discuss what it's looking for to say
> "this is the end of the state notes".  Does a plain note (org-add-note)
> count as a state note?

Yes, it does.
I tried to improve a docstring a little on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=420ed4e03

>> Unlike headings, paragraphs, and timestamps, notes are not a part of Org
>> syntax. Their format is customizeable via `org-log-note-headings'.
>
> Oh! That's an interesting point.  That variable is not mentioned in the
> Manual (AFAICS), but perhaps it should be -- particularly around the
> talk of "rescheduling" (and "delschedule" which I don't see in the
> manual). Mentioned only in the sense of, if you want to change the note
> header, look here.
>
>> However, it is probably worth describing the notes in 5.3 Progress
>> Logging section of the manual.
>
> I'd agree.  In particular, what depends on the format of the note
> (header) -- like Agenda.  To warn people what they can or cannot touch.

Patches welcome.

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



Re: [ANN] lisp/ob-tangle-sync.el

2023-12-11 Thread Ihor Radchenko
Sorry for the late reply.
Just got around to process your email.

Mehmet Tekman  writes:

> I made some small edits a few months ago, to reform the header arguments
> so that tangle actions would be encoded in the `:tangle-params' header
> and would largely leave the `:tangle' header alone… but when I tested
> it, it was failing all tests for reasons I wasn't to sure about.

Do you mean that tests are not running at all?
If yes, it is likely because of

> +(defun org-babel--tangle-split (raw-tangle)
> +  "Split a :tangle headerby filename and sync action."
> ...
> +  ;; Otherwise set the default action and assume that the full
> +  ;; string has no action
> +  (if (or file action)
> +  (setq action "export"
> +file (read-char raw-tangle
 ^ this

`read-char' tries to read a character input from keyboard. That's why
you get tests not running. Maybe just (setq action "export" file raw-tangle)?

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



Re: [FR] Allow flattened imenu index

2023-12-11 Thread João Távora
On Sat, Dec 9, 2023 at 5:39 PM Juri Linkov  wrote:

>   menu1
> sub-item1
> sub-item2
>
> could be flattened to
>
>   menu1 -> sub-item1
>   menu1 -> sub-item2


By the way, this seems to be exactly what the breadcrumb-jump command
in my breadcrumb.el package does.  Goes reasonably well with a flex/fuzzy
completion style.

You can look at it for an implementation idea.  Just be sure to do this
flattening at the presentation level (i.e. M-x imenu), not at the
internal representation level.

It shouldn't be needed here at all, but in case anyone's thinking
about it, please avoid messing with imenu's internal representation of
hierarchies as that structure is relied upon by many extensions (not just
mine, but several others).  Even certain things supported by certain
imenu-presenting frontends (like "special elements") are not supported by
other frontends.  It's a bit of a mess.  The symbols holding/describing
this representation (imenu--index-alist, maybe others) are incorrectly
named '--' but they are most definitely externally visible and used
customization points.

João



Re: [PATCH] [WORG] Maintenance: on the frequency of bugfix releases

2023-12-11 Thread Ihor Radchenko
Bastien Guerry  writes:

>   Security fixes trigger an immediate bugfix release. Other important
>   fixes should be accumulated for more than one week and for less than
>   two weeks before a bugfix release.
>
> It's important to allow immediate release for security fixes only, and
> to let the dust settle for at least a week for other fixes.  
>
> Is it okay for you?

I think that upper limit for bugfix release frequency is slightly in
odds with the previous

Org development is the work of volunteers, and we cannot promise to
follow a release schedule.

Not a big deal though.

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



Re: Consider removing newlines from org-insert-link help message

2023-12-11 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Ihor Radchenko  writes:
>
>> You can just use `org-format-prompt'.
>
> TIL!  Updated.
>
> Thank you!
>
> P.S. I have also updated the commit message.

Thanks!
Applied, onto main, with minor amendments.
I have removed redundant `cons' call in the `apply' and added proper
function quoting: #'format.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=664ffde14

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