emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] A call of (org-end-of-meta-data t) goes too far in a heading with only whitespace
@ 2024-10-05  6:52 Benjamin McMillan
  0 siblings, 0 replies; only message in thread
From: Benjamin McMillan @ 2024-10-05  6:52 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

Specifically, a call to (org-end-of-meta-data t) with point at the > on the
following tree will go all the way to the next heading.
In contrast, a call to just (org-end-of-meta-data), without the FULL flag,
will go to the beginning of heading content, as expected.
* >heading


* another heading


The issue arises from the code for skipping clock lines, which does so by
checking if point is looking at (concat "[ \t]*$" "\\|" org-clock-line-re).
I'm not sure of the intention of the first alternative, the "[ \t]*$", but
it matches an empty line, and so the loop advances point to the next line,
until reaching the next heading in the case above.
Removing that from the regexp appears to fix the issue.

If this change is fine, then I am happy to provide a patch.
Thanks,
Ben

[-- Attachment #2: Type: text/html, Size: 937 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-05  6:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-05  6:52 [BUG] A call of (org-end-of-meta-data t) goes too far in a heading with only whitespace Benjamin McMillan

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).