Hi John,
John Kitchin 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-visibl
> I don't think there's anything built-in, no. I have needed this in
> various places, and did something similar to the above, except with a
> combination of `org-back-to-heading', `org-end-of-meta-data', then
> `outline-next-heading'.
Hmm. I just noticed a reference to built-in
org-agenda-get-so
John Kitchin writes:
> Thanks! Here is what I am currently using:
>
> (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))
> (
good point, thanks!
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-
> Thanks! Here is what I am currently using:
Note that your code may fail if there is an inline task in the body.
Best,
Ihor
John Kitchin writes:
> Thanks! Here is what I am currently using:
>
> (defun canvas-org-get-heading-body ()
> "Return the body of the current heading up to the next he
Thanks! Here is what I am currently using:
(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-substr
You may use something similar to org-quick-peek--get-entry-text from
org-quick-peek package (https://github.com/alphapapa/org-quick-peek):
(cl-defun org-quick-peek--get-entry-text (marker &key keep-drawers
keep-planning)
"Return Org entry text from node at MARKER.
If KEEP-DRAWERS is non-nil, dr
Emacs was created to do such things--in fact the name E-macs is a terse
form of Editor-Macros {originally a derivative of TECO}
{There is a huge list of what Emacs should stand for--my fave is: Emacs
Makes All Computing Simple}
Now, what I'm suggesting is you make a macro, and store and reuse it-