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))
> (
:END:.*\n?" nil 'move)
> >> (point)
> >> (unless keep-planning
> >> (goto-char (point-min))
> >> (while (re-search-forward org-planning-line-re nil t)
> >> ;; Remove planning
(point)
>> (unless keep-planning
>> (goto-char (point-min))
>> (while (re-search-forward org-planning-line-re nil t)
>> ;; Remove planning line
>> (kill-whole-line)))
>> (setq text (buffer-substring (point-min
min))
> (while (re-search-forward org-planning-line-re nil t)
> ;; Remove planning line
> (kill-whole-line)))
> (setq text (buffer-substring (point-min) (point-max
> (-reduce-r #'funcall (reverse (cons text (cons #'identity
> org
ll (reverse (cons text (cons #'identity
org-quick-peek-filter-functions))
Best,
Ihor
John Kitchin writes:
> Hi everyone,
>
> I am trying to get the body of a heading up to the next subheading. For
> example with this org file,
>
> * quiz one
>
> This is the d
g to get the body of a heading up to the next subheading. For
> example with this org file,
>
> * quiz one
>
> This is the description.
> Use emacs for this.
>
> ** question 1
> what is 40 + 2
>
> If the point is in the first heading, I want to run a function that w
Hi everyone,
I am trying to get the body of a heading up to the next subheading. For
example with this org file,
* quiz one
This is the description.
Use emacs for this.
** question 1
what is 40 + 2
If the point is in the first heading, I want to run a function that would
return the string