Re: Incorrect link is stored (org-elements?)

2021-11-11 Thread Max Nikulin
On 10/11/2021 20:48, Ihor Radchenko wrote: I pushed the patch upstream. P.S. I am puzzled that `org-element-at-point' returns paragraph even when patch is not applied. After such call `org-store-link' does what I expect. However "after undo" erroneous state survives emacs restart, thanks to

Re: Incorrect link is stored (org-elements?)

2021-11-10 Thread Ihor Radchenko
Max Nikulin writes: > With equivalent patch (attached one has additional differences in spaces > around) my particular case works. I have no idea which additional > scenarios it may affect. I did not test the patch extensively. I faced > the issue while I was preparing a patch to fix storing

Re: Incorrect link is stored (org-elements?)

2021-11-10 Thread Max Nikulin
On 09/11/2021 18:46, Ihor Radchenko wrote: Max Nikulin writes: `org-store-link' under some conditions may pick a link to wrong heading. Emacs-26.3, Org main~1. I can reproduce, though not exactly following your steps. Can you try the attached patch? With equivalent patch (attached one has

Re: Incorrect link is stored (org-elements?)

2021-11-09 Thread Ihor Radchenko
Max Nikulin writes: > `org-store-link' under some conditions may pick a link to wrong heading. > Emacs-26.3, Org main~1. I can reproduce, though not exactly following your steps. Can you try the attached patch? Best, Ihor >From 6465741dff757af23b10d1f0a412eb41d05f4c75 Mon Sep 17 00:00:00

Incorrect link is stored (org-elements?)

2021-11-08 Thread Max Nikulin
`org-store-link' under some conditions may pick a link to wrong heading. Emacs-26.3, Org main~1. --- >8 --- * Right Save this file, kill the buffer, open it again. Put cursor to the empty line below this paragraph, type something, e.g. =a=, undo =C-/=, =M-x org-store-link=. "#its_wrong" is