[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: get the body of a heading up to the next subheading
From: |
Bastien |
Subject: |
Re: get the body of a heading up to the next subheading |
Date: |
Fri, 22 May 2020 16:41:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi John,
John Kitchin <address@hidden> writes:
> Here is a new version that might fail some other way!
>
> (defun canvas-org-get-heading-body ()
> "Return the body of the current heading up to the next heading."
> (interactive)
> (save-excursion
> (unless (org-at-heading-p)
> (org-previous-visible-heading 1))
> (org-end-of-meta-data)
> (buffer-substring (point)
> (progn (org-next-visible-heading 1) (point)))))
Maybe this is useful enough to end up in
https://orgmode.org/worg/org-hacks.html ?
We obviously need to make this page more readable and useful,
but new contents is always welcome.
Thanks,
--
Bastien