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: Sun, 25 Oct 2015 12:19:19 +0100 Message-ID: <8737wz19hk.fsf@gmx.us> References: <874mhh1u7s.fsf@gmx.us> <87oafpz65e.fsf@gmx.us> <87pp04zc1r.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqJL3-0006Am-RE for emacs-orgmode@gnu.org; Sun, 25 Oct 2015 07:19:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqJKy-0001cr-Rz for emacs-orgmode@gnu.org; Sun, 25 Oct 2015 07:19:49 -0400 Received: from plane.gmane.org ([80.91.229.3]:54006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqJKy-0001cL-M5 for emacs-orgmode@gnu.org; Sun, 25 Oct 2015 07:19:44 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZqJKu-0003BJ-Vx for emacs-orgmode@gnu.org; Sun, 25 Oct 2015 12:19:41 +0100 Received: from tsn109-201-154-199.dyn.nltelcom.net ([109.201.154.199]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Oct 2015 12:19:40 +0100 Received: from rasmus by tsn109-201-154-199.dyn.nltelcom.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Oct 2015 12:19:40 +0100 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: emacs-orgmode@gnu.org Hi Puneeth, Puneeth Chaganti writes: >> 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’t widen. When it’s within the scope of the narrow it >> shouldn’t widen. This ALREADY seems to be the case. > > I will fix the patch to widen only when the target location is not > within the narrow. But, I don't understand why we shouldn't be > widening if the target location is in a different buffer. Can you > explain? Reading your latest patch it seems to be correct. I mean, if I click [[id:myid]] in narrowed buffer A and myid is in buffer B, then you shouldn’t widen in buffer A. Since you switch buffer there’s no such issue. >> However, your patch doesn’t work for me in the following example, starting >> 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 > > I had patched `org-id-goto' and looks like clicking on links uses > `org-id-open'. I will resend a patch. I wonder if these two > functions can reuse common code. The latest patch from Date: Sun, 25 Oct 2015 14:36:16 +0530 looks good to me. Thanks! Rasmus -- The second rule of Fight Club is: You do not talk about Fight Club