* org-open-at-point while on "normal" text
@ 2024-01-28 16:35 Rainer Dunker
2024-01-28 18:48 ` Ihor Radchenko
0 siblings, 1 reply; 4+ messages in thread
From: Rainer Dunker @ 2024-01-28 16:35 UTC (permalink / raw)
To: emacs-orgmode
Hello All,
typing C-c C-o to follow a link while point is on "normal" text instead of a link, this results in error "no link found"; okay.
Recently there was an Org Mode upgrade from version 9.4.4 to 9.6.6 on my machine, and since then, C-c C-o on "normal" text behaves differently: Instead of raising the no link error, it opens the "Select link to open" menu. As I understand, this behaviour should occur when point is on the section's headline, but not when it's just somewhere within the section.
I tracked this down to a changed behaviour of the org-element-at-point function. Suppose I have a buffer in Org Mode containing these two lines:
* headline
text
If I place point within the word "text" and evaluate the expression ...
(org-element-property :parent (org-element-property :parent (org-element-at-point)))
... this results in "(headline (:raw-value "headline" :begin 1 ...", apparently meaning that I just navigated the document structure tree from the text paragraph up to the section headline.
Doing the same test on another machine with Org Mode 9.4.4, the expression results in nil. And as far as I understand, this is the expected behaviour: Starting with (org-element-at-point) and following the chain of parent relations in the structure tree should not reach the headline. I found this explanation in both the Org Element API reference in section 1.1 ...
https://orgmode.org/worg/dev/org-element-api.html#local
... as well as in this mailing list post:
https://lists.gnu.org/archive/html/emacs-orgmode/2020-02/msg00226.html
I also noticed that, between these two Org Mode versions, the org-element-at-point function has been completely rewritten. Now my question is: Is the changed behaviour--and, as a consequence, also that of org-open-at-point--intended or rather a bug?
Regards,
Rainer Dunker
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-open-at-point while on "normal" text
2024-01-28 16:35 org-open-at-point while on "normal" text Rainer Dunker
@ 2024-01-28 18:48 ` Ihor Radchenko
2024-01-29 19:58 ` Rainer Dunker
0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2024-01-28 18:48 UTC (permalink / raw)
To: Rainer Dunker; +Cc: emacs-orgmode
Rainer Dunker <rainer.dunker@mailbox.org> writes:
> Recently there was an Org Mode upgrade from version 9.4.4 to 9.6.6 on my machine, and since then, C-c C-o on "normal" text behaves differently: Instead of raising the no link error, it opens the "Select link to open" menu. As I understand, this behaviour should occur when point is on the section's headline, but not when it's just somewhere within the section.
>
> I tracked this down to a changed behaviour of the org-element-at-point function. Suppose I have a buffer in Org Mode containing these two lines:
>
> * headline
> text
I am unable to reproduce the problem on the latest stable version of Org
mode - 9.6.17.
May you upgrade Org mode and let us know if you are still experiencing
the problem?
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-open-at-point while on "normal" text
2024-01-28 18:48 ` Ihor Radchenko
@ 2024-01-29 19:58 ` Rainer Dunker
2024-01-30 11:32 ` Ihor Radchenko
0 siblings, 1 reply; 4+ messages in thread
From: Rainer Dunker @ 2024-01-29 19:58 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
Am 28.01.2024 um 19:48:16 schrieb Ihor Radchenko:
> > Recently there was an Org Mode upgrade from version 9.4.4 to 9.6.6 on my machine, and since then, C-c C-o on "normal" text behaves differently: Instead of raising the no link error, it opens the "Select link to open" menu. As I understand, this behaviour should occur when point is on the section's headline, but not when it's just somewhere within the section.
> >
> > I tracked this down to a changed behaviour of the org-element-at-point function. Suppose I have a buffer in Org Mode containing these two lines:
> >
> > * headline
> > text
>
> I am unable to reproduce the problem on the latest stable version of Org
> mode - 9.6.17.
>
> May you upgrade Org mode and let us know if you are still experiencing
> the problem?
Of course. I did a test install of release_9.6.17-1108-gf490c15, and yes--the unepected behaviour persists. The result of the test expression is not completely identical to that of version 9.6.6, though; instead of ...
(headline (:raw-value "heading" :begin 1 :end 16 :pre-blank 0
:contents-begin 11 :contents-end 16 ...
... it starts with:
(headline (:standard-properties [1 1 11 16 16 0 (:title) first-section
element t nil 13 ...
But nevertheless, it's still not nil. Thus, I'm afraid, the upgrade did not solve the issue.
Thanks for the superfast reply and for any further help,
Rainer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-open-at-point while on "normal" text
2024-01-29 19:58 ` Rainer Dunker
@ 2024-01-30 11:32 ` Ihor Radchenko
0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2024-01-30 11:32 UTC (permalink / raw)
To: Rainer Dunker; +Cc: emacs-orgmode
Rainer Dunker <rainer.dunker@mailbox.org> writes:
>> I am unable to reproduce the problem on the latest stable version of Org
>> mode - 9.6.17.
>>
>> May you upgrade Org mode and let us know if you are still experiencing
>> the problem?
>
> Of course. I did a test install of release_9.6.17-1108-gf490c15, and yes--the unepected behaviour persists. The result of the test expression is not completely identical to that of version 9.6.6, though; instead of ...
>
> (headline (:raw-value "heading" :begin 1 :end 16 :pre-blank 0
> :contents-begin 11 :contents-end 16 ...
> ...
> But nevertheless, it's still not nil. Thus, I'm afraid, the upgrade did not solve the issue.
Ok. Then, may you provide more detailed instructions how to reproduce
the problem? Starting from emacs -Q or make repro. See
https://orgmode.org/manual/Feedback.html#Feedback
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-30 11:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-28 16:35 org-open-at-point while on "normal" text Rainer Dunker
2024-01-28 18:48 ` Ihor Radchenko
2024-01-29 19:58 ` Rainer Dunker
2024-01-30 11:32 ` Ihor Radchenko
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.