emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug: org-store-link uses CUSTOM_ID instead of target point [9.4.4 (r


From: Max Nikulin
Subject: Re: Bug: org-store-link uses CUSTOM_ID instead of target point [9.4.4 (release_9.4.4 @ /usr/share/emacs/27.2/lisp/org/)]
Date: Sun, 14 Aug 2022 16:58:04 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 06/11/2021 19:51, Max Nikulin wrote:
On 06/05/2021 19:41, Bastien wrote:
Fr Ml writes:

I have a problem with the function org-store-link it doesn't work as
described in the documentation:
https://orgmode.org/manual/Handling-Links.html
"For Org files, if there is a '<<target>>' at point, the link points
to
the target."

Fixed in maint, thanks a lot for reporting this and Ihor for
confirming the bug.

Another issue likely caused by this change:

Carlos Pita to emacs-orgmode. Adding target and custom id links doesn't ask for description. Tue, 2 Aug 2022 14:44:58 -0300.
D99A712C-18D1-4A4F-8093-35A0BFB469C4@gmail.com">https://list.orgmode.org/D99A712C-18D1-4A4F-8093-35A0BFB469C4@gmail.com

Bastien, unfortunately your fix caused duplication of stored links like "file:~/org/file.org::#custom_id" when point is outside of <<target>>. Earlier #CUSTOM_ID link was stored in addition to "file:~/org/file.org::*Heading" search link. My suggestion is to revert your patch and to just reset custom-id variable when <<target>> link is stored. Another effect or your patch, that I consider unintentional, is storing [[file:~/org/file.org::#custom_id][file:~/org/file.org::#custom_id]] instead of [[file:~/org/file.org::#custom_id][Heading]]. I prefer "original" behavior.

Third patch is intended to avoid links inserted as [[target][file:~/org/file.org::target]] in the case of same file. I suppose, just [[target]] is better. Current variant looks unbalanced and misleading. Of course, you are free to skip last patch.

I am confused by `org-insert-link' behavior. It inserts links like [[file:~/org/file.org::#custom_id][file:~/org/file.org::#custom_id]] without user prompt for description but [[file:~/org/file.org::#custom_id][Heading]] requires to confirm "Heading" description explicitly. I would expect that "raw" link is subject to ask user for more friendly option.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]