From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Dunn Subject: Subtree macro Date: Mon, 02 Jan 2017 13:12:18 -0500 Message-ID: <87y3ytnxfh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cO75o-0001eC-UN for emacs-orgmode@gnu.org; Mon, 02 Jan 2017 13:12:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cO75n-0002JJ-W4 for emacs-orgmode@gnu.org; Mon, 02 Jan 2017 13:12:20 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cO75n-0002JF-SR for emacs-orgmode@gnu.org; Mon, 02 Jan 2017 13:12:19 -0500 Received: from [2604:6000:1010:176:da4d:3352:bae5:f50e] (port=46462 helo=escafil) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cO75n-00045J-CS for emacs-orgmode@gnu.org; Mon, 02 Jan 2017 13:12:19 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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