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 14:27:44 +0200 Message-ID: <87pp04zc1r.fsf@gmx.us> References: <874mhh1u7s.fsf@gmx.us> <87oafpz65e.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpxvK-0005uY-9U for emacs-orgmode@gnu.org; Sat, 24 Oct 2015 08:27:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpxvG-0004sg-SG for emacs-orgmode@gnu.org; Sat, 24 Oct 2015 08:27:50 -0400 Received: from mout.gmx.net ([212.227.15.19]:49903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpxvG-0004sW-M8 for emacs-orgmode@gnu.org; Sat, 24 Oct 2015 08:27:46 -0400 In-Reply-To: (Puneeth Chaganti's message of "Sat, 24 Oct 2015 10:59:31 +0530") 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: punchagan@gmail.com Cc: emacs-orgmode@gnu.org Hi Puneeth, First, I now think your suggestion (to widen) is consistent with the current behavior of Org. E.g. C-c C-o on a CUSTOM_IDs link will widen the buffer. Also, if ID is outside of the current file, it will follow the link. Second, I think the current behavior should be changed, but that is a separate discussion. Thus, I think for now your suggestion is the correct one. However, you need to make sure that it only widens if ID is in the same buffer and outside of the narrow. In particular, when ID is in another file you shouldn=E2=80=99t widen. When it=E2=80=99s within the scope of th= e narrow it shouldn=E2=80=99t widen. This ALREADY seems to be the case. However, your patch doesn=E2=80=99t work for me in the following example, s= tarting from emacs -q, adding /tmp/test.org (with the below content) to my agenda list and requiring org-id, org-narrow-to-subtree on foo, and then org-open-at-point on the link * foo [[id:myid]] now C-c C-o on link * bar :PROPERTIES: :ID: myid :END: We can add your patch when it works properly. > I find it weird to have a subtly different thing happening depending > on whether or not the target buffer is narrowed -- entry shown in > normal buffer when no narrowing vs. entry shown in a special/indirect > buffer. Widening is the current behavior when you click on a most link in a narrowed buffer. Personally, I would rather throw an error. > Also, given that no other part of org really uses indirect buffers, I > don't know if this function alone should make use of that feature. Another option might be to make "C-c &" recall the last narrow (as John also mentions). But this is sort of redefining the meaning of C-c &, which may not be comfortable. > PS: I've patched my org sources to do indirect buffers for this, and > will try it out for sometime to see how it feels. Thanks a lot for your efforts, Puneeth. Cheers, Rasmus --=20 Together we will make the possible totalllly impossible!