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: Tue, 22 Oct 2024 22:25:49 +0900 [thread overview]
Message-ID: <CALo8A5UbpaxWU=H67DxHcosw-N6aHP9RQ8ZTuoJ3jtivpmf2Qw@mail.gmail.com> (raw)
In-Reply-To: <878qujrvo9.fsf@localhost>
[-- Attachment #1.1: Type: text/plain, Size: 917 bytes --]
Sure, here is the patch.
On Sun, Oct 20, 2024 at 6:03 PM Ihor Radchenko <yantar92@posteo.net> wrote:
> Benjamin McMillan <mcmillanbb@gmail.com> writes:
>
> > 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."
>
> Yes. More precise docstring is certainly welcome.
> Would you be interested to submit a patch?
>
> --
> 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>
>
[-- Attachment #1.2: Type: text/html, Size: 1583 bytes --]
[-- Attachment #2: 0001-lisp-org.el-org-end-of-meta-data-Improve-docstring.patch --]
[-- Type: application/octet-stream, Size: 1660 bytes --]
From f93d8207ae54248bd2ecaabab93291b1a312d947 Mon Sep 17 00:00:00 2001
From: Benjamin McMillan <mcmillanbb@gmail.com>
Date: Tue, 22 Oct 2024 22:06:22 +0900
Subject: [PATCH] lisp/org.el (org-end-of-meta-data): Improve docstring
* lisp/org.el (org-end-of-meta-data): Clarify that a call of
org-end-of-metadata with non-nil argument FULL will skip blank lines
in addition to other meta-data.
Link: https://lists.gnu.org/archive/html/emacs-orgmode/2024-10/msg00243.html
[TINYCHANGE]
---
lisp/org.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 7651c0832..a76281ad8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -21765,10 +21765,10 @@ When TO-HEADING is non-nil, go to the next heading or `point-max'."
"Skip planning line and properties drawer in current entry.
When optional argument FULL is t, also skip planning information,
-clocking lines and any kind of drawer.
+clocking lines, any kind of drawer, and blank lines
When FULL is non-nil but not t, skip planning information,
-properties, clocking lines and logbook drawers."
+properties, clocking lines, logbook drawers, and blank lines."
(org-back-to-heading t)
(forward-line)
;; Skip planning information.
@@ -21783,7 +21783,7 @@ properties, clocking lines and logbook drawers."
(let ((end (save-excursion (outline-next-heading) (point)))
(re (concat "[ \t]*$" "\\|" org-clock-line-re)))
(while (not (eobp))
- (cond ;; Skip clock lines.
+ (cond ;; Skip clock lines and blank lines.
((looking-at-p re) (forward-line))
;; Skip logbook drawer.
((looking-at-p org-logbook-drawer-re)
--
2.46.0
next prev parent reply other threads:[~2024-10-22 13:43 UTC|newest]
Thread overview: 8+ 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
2024-10-20 9:05 ` Ihor Radchenko
2024-10-22 13:25 ` Benjamin McMillan [this message]
2024-10-22 17:28 ` 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='CALo8A5UbpaxWU=H67DxHcosw-N6aHP9RQ8ZTuoJ3jtivpmf2Qw@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).