From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: save folded state Date: Mon, 26 Jan 2015 19:54:04 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFuQ0-00076G-Cm for emacs-orgmode@gnu.org; Mon, 26 Jan 2015 19:54:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFuPx-0005y2-3e for emacs-orgmode@gnu.org; Mon, 26 Jan 2015 19:54:12 -0500 Received: from mail-qg0-x236.google.com ([2607:f8b0:400d:c04::236]:41040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFuPw-0005xw-Vw for emacs-orgmode@gnu.org; Mon, 26 Jan 2015 19:54:09 -0500 Received: by mail-qg0-f54.google.com with SMTP id q108so9640817qgd.13 for ; Mon, 26 Jan 2015 16:54:08 -0800 (PST) Received: from Johns-MacBook-Air.local (c-67-186-28-151.hsd1.pa.comcast.net. [67.186.28.151]) by mx.google.com with ESMTPSA id y5sm11616275qah.38.2015.01.26.16.54.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jan 2015 16:54:07 -0800 (PST) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode List I am trying to map over a buffer with headlines in various states of folded, and get context around certain elements. I find I need to fully expand the buffer to get the context in the way I am currently doing it (e.g. getting the lines around the element), but I would like to put the buffer back to the way it was when I am finished. This is not done with the usual macros like save-excursion, save-restriction, etc... Is there a way to do this other than a temp buffer? thanks, -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu