emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Subtree macro
@ 2017-01-02 18:12 Ian Dunn
  2017-01-02 18:41 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Dunn @ 2017-01-02 18:12 UTC (permalink / raw)
  To: emacs-orgmode


Is there something like this macro in org?

(defmacro org-with-subtree (&rest body)
  "Evaluate BODY with the buffer narrowed to the current subtree."
  (declare (debug (body)))
  `(save-mark-and-excursion
     (save-restriction
       (org-narrow-to-subtree)
       ,@body)))

--
Ian Dunn

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Subtree macro
  2017-01-02 18:12 Subtree macro Ian Dunn
@ 2017-01-02 18:41 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-01-02 18:41 UTC (permalink / raw)
  To: Ian Dunn; +Cc: emacs-orgmode

Hello,

Ian Dunn <dunni@gnu.org> writes:

> Is there something like this macro in org?
>
> (defmacro org-with-subtree (&rest body)
>   "Evaluate BODY with the buffer narrowed to the current subtree."
>   (declare (debug (body)))
>   `(save-mark-and-excursion
>      (save-restriction
>        (org-narrow-to-subtree)
>        ,@body)))

No, there isn't.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-02 18:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-02 18:12 Subtree macro Ian Dunn
2017-01-02 18:41 ` Nicolas Goaziou

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).