From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: Detect parent with SCHEDULED or DEADLINE Date: Thu, 14 Apr 2016 17:46:02 -0500 Message-ID: <87vb3jdd1x.fsf@alphapapa.net> References: <87bn5dupt4.fsf@artlab.createcnix.lan> <87vb3kx1r6.fsf@alphapapa.net> <87r3e8zmrf.fsf@nicolasgoaziou.fr> <87h9f48xfz.fsf@alphapapa.net> <87mvowzkox.fsf@nicolasgoaziou.fr> <87vb3jc22c.fsf@artlab.createcnix.lan> <87twj3c13z.fsf@artlab.createcnix.lan> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqq1f-0005gg-24 for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 18:46:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqq1b-0005Mt-SF for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 18:46:14 -0400 Received: from plane.gmane.org ([80.91.229.3]:54276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqq1b-0005ML-LB for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 18:46:11 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aqq1Y-00087w-78 for emacs-orgmode@gnu.org; Fri, 15 Apr 2016 00:46:08 +0200 Received: from 172-0-42-27.lightspeed.ltrkar.sbcglobal.net ([172.0.42.27]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Apr 2016 00:46:08 +0200 Received: from adam by 172-0-42-27.lightspeed.ltrkar.sbcglobal.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Apr 2016 00:46:08 +0200 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 Christophe Schockaert writes: > (save-excursion > (save-restriction > (widen) Hi Christophe, Thanks for sharing the solution! Here's something you might want to add to it, something I recently discovered. The `org-with-wide-buffer' macro can replace those three lines: #+BEGIN_SRC elisp (defmacro org-with-wide-buffer (&rest body) "Execute body while temporarily widening the buffer." `(save-excursion (save-restriction (widen) ,@body))) #+END_SRC It's in `org-macs.el' so it's included with Org.