From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [PATCH] org-id-goto doesn't work if buffer is narrowed. Date: Sat, 24 Oct 2015 20:03:05 +0200 Message-ID: <87oafof8km.fsf@gmx.us> References: <874mhh1u7s.fsf@gmx.us> <87oafpz65e.fsf@gmx.us> <87d1w4zb5b.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq3A5-0001vj-Vo for emacs-orgmode@gnu.org; Sat, 24 Oct 2015 14:03:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zq3A2-0001Eh-P9 for emacs-orgmode@gnu.org; Sat, 24 Oct 2015 14:03:25 -0400 Received: from mout.gmx.net ([212.227.17.21]:59914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq3A2-0001ER-If for emacs-orgmode@gnu.org; Sat, 24 Oct 2015 14:03:22 -0400 In-Reply-To: (John Kitchin's message of "Sat, 24 Oct 2015 13:48:26 -0400") 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: jkitchin@andrew.cmu.edu Cc: emacs-orgmode@gnu.org John Kitchin writes: > I like the idea too. I worked out a partial solution for id links here: > http://kitchingroup.cheme.cmu.edu/blog/2015/10/24/Saving-the-current-restriction-and-restoring-it-while-following-links/ > using the idea for saving and restoring the restriction. Thanks, John. You will probably want to use markers since one might edit stuff in-between the widening and going back to the narrow. http://www.gnu.org/software/emacs/manual/html_node/elisp/Overview-of-Markers.html#Overview-of-Markers Markers should be cleaned up, which might prove difficult since one might not go back with C-c &, but you can at least ensure that at most two loose markers exists (potentially per Org buffer). Also, I wonder if there exits cases where you would need to store the buffer as well as the narrow points... I guess not? Thanks, Rasmus -- Slowly unravels in a ball of yarn and the devil collects it