emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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

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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).