emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Benjamin McMillan <mcmillanbb@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] A call of (org-end-of-meta-data t) goes too far in a heading with only whitespace
Date: Sun, 20 Oct 2024 15:28:45 +0900	[thread overview]
Message-ID: <CALo8A5UkE6dvwRU174mUDfXgwvJRmm4wkBx+3DbetbtbS_7Emg@mail.gmail.com> (raw)
In-Reply-To: <877ca6zk4j.fsf@localhost>

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

I confused the issue in my response, and want to clear it up. As you say,
when the heading has no contents, "after metadata" is the next headline.
However, my problem is if heading 1 contains several blank lines:
* Heading 1
:PROPERTIES:
:ID: 111111
:END:




* Heading 2
In this example, a call of (org-end-of-meta-data) places point on the first
blank after :END:, in agreement with the docstring. On the other hand,
(org-end-of-meta-data t) places point all the way to heading 2, which is
not what the docstring says.
This mismatch caused me some headache. However, the suggestion to move back
lines is clever, and solves my problem.

Granted that it is not worth changing behavior of the function, would it be
reasonable to update the docstring? Something like
"When optional argument FULL is t, also skip planning information,
clocking lines, any kind of drawer, and blank lines.

When FULL is non-nil but not t, skip planning information,
properties, clocking lines, logbook drawers, and blank lines."

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

  reply	other threads:[~2024-10-20  6:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
2024-10-12 11:45 ` Ihor Radchenko
2024-10-17 11:55   ` Benjamin McMillan
2024-10-17 17:58     ` Ihor Radchenko
2024-10-20  6:28       ` Benjamin McMillan [this message]
2024-10-20  9:05         ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALo8A5UkE6dvwRU174mUDfXgwvJRmm4wkBx+3DbetbtbS_7Emg@mail.gmail.com \
    --to=mcmillanbb@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).