[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: |
Sat, 6 Nov 2021 19:51:29 +0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
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.
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.
0001-Revert-lisp-ol.el-Fix-bug-when-storing-links.patch
Description: Text Data
0002-ol.el-Skip-CUSTOM_ID-when-target-link-is-stored.patch
Description: Text Data
0003-ol.el-Avoid-links-like-target-file-org-test.org-targ.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 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/)],
Max Nikulin <=