> Thank you for your feedback Earl!
>
> Let me first address your second point. When I try using the function you
recommend (org-display-outline-path 'title t " > " t) on this file:
>
> #+TITLE: 2026
>
> * 06-17
> ** TODO Drink me!
>
> I get this result:
>
> "2026 >  > 06-17 > Drink me!"
>
> The redundant separator appears to happen because in
org-display-outline-path (lines 7953–7956), the prefix is built as title +
separator, then passed to org-format-outline-path which adds another
separator between prefix and path via (and prefix path separator), which
produces the double >  >.
>
> If we remove the concat of the separator onto the prefix, that function
then returns
>
> "2026 > 06-17 > Drink me!"
>
> Is my state strange in some way that causes this function to produce
incorrect results?
>
> If the code as is seems incorrect to you as well, I will include a fix
for org-display-outline-path along with my revised patch that uses it.
>

Nope, that's a bug. I didn't notice it until after I replied to your email.
Fortunately, I already sent in a patch that fixes that bug. Hopefully it
gets merged soon.

Le jeu. 18 juin 2026 à 15:13, Greg Coladonato <[email protected]> a écrit :

> Thank you for your feedback Earl!
>
> Let me first address your second point. When I try using the function you
> recommend (org-display-outline-path 'title t " > " t) on this file:
>
> #+TITLE: 2026
>
> * 06-17
> ** TODO Drink me!
>
> I get this result:
>
> "2026 >  > 06-17 > Drink me!"
>
> The redundant separator appears to happen because in
> org-display-outline-path (lines 7953–7956), the prefix is built as title +
> separator, then passed to org-format-outline-path which adds another
> separator between prefix and path via (and prefix path separator), which
> produces the double >  >.
>
> If we remove the concat of the separator onto the prefix, that function
> then returns
>
> "2026 > 06-17 > Drink me!"
>
> Is my state strange in some way that causes this function to produce
> incorrect results?
>
> If the code as is seems incorrect to you as well, I will include a fix for
> org-display-outline-path along with my revised patch that uses it.
>
> On Wed, Jun 17, 2026 at 9:59 AM Earl Chase <[email protected]> wrote:
>
>> Le mar. 16 juin 2026 à 10:02, Greg Coladonato <[email protected]> a
>> écrit :
>> >
>> > (please be gentle, this is the first time I've ever tried contributing
>> source code like this :)
>> >
>> > When I org-store-link to Sub in this file:
>> >
>> > #+TITLE: Test
>> > * Top
>> > ** Sub
>> >
>> > I currently get [[id:260616_075039][Sub]] (I have my own id timestamp
>> generator)
>> >
>> > I often have a generic word like Todos or Notes in place of Sub, so
>> that the link text isn't a good reminder of what it's linking to. I would
>> like it to be [[id:260616_075039][Test > Top > Sub]]
>> >
>> > I haven't seen any discussion of this in the archives. Criticism
>> welcome.
>> >
>> > Cheers,
>> > Greg
>> >
>> > --
>> > Sent from my Palm Pilot
>>
>> This is a great idea.
>>
>> > +              (let ((heading (if (match-end 4)
>> > +                         (match-string-no-properties 4)
>> > +                       (match-string-no-properties 0))))
>> > +                (if org-id-link-description-include-outline-path
>>
>> As of now, your code does not respect `org-link-context-for-files' and
>> `org-id-link-use-context'. Currently, org-id will only create a
>> description for a link if the value of both of those variables is
>> non-nil:
>>
>> > (precise-target (and org-link-context-for-files
>> >                                org-id-link-use-context
>> >                               (org-link-precise-link-target))
>>
>> With your change, a link description will always be created even if
>> those values are nil. That actually leads me to my next point, which
>> is that the outline path code would fit better in
>> org-link-precise-target instead of org-id-store-link. That would of
>> course also mean you would need to move the defcustom you created to
>> ol.el. But with that change, the values of
>> `org-link-context-for-files' and `org-id-link-use-context' would
>> always be respected and your code could be used to create link
>> descriptions for links that are not created by org-id. When you do
>> that, I suggest you also create a test.
>>
>> > +                (let* ((olp (org-get-outline-path))
>> > +                       (title (cadr (assoc "TITLE"
>> > +                               (org-collect-keywords
>> > +                                '("TITLE")))))
>> > +                       (parts (append (when title (list title))
>> > +                              olp
>> > +                              (list heading))))
>> > +                  (mapconcat #'identity parts " > "))
>> > +                  heading)))
>>
>> You can simplify your code by using `org-display-outline-path'. The
>> equivalent to the above code would be: (org-display-outline-path
>> 'title t " > " t).
>>
>
>
> --
> Sent from my Palm Pilot
>

Reply via email to