From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: PATCH Make org-open-at-point only ask once Date: Thu, 6 Oct 2011 11:57:36 +0200 Message-ID: References: <20110828200542.GS5700@0x63.nu> <20111006084350.GD26104@0x63.nu> <68F28744-3270-4616-841D-9DD270E87323@gmail.com> <20111006095132.GE26104@0x63.nu> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBkhz-0007oG-2e for emacs-orgmode@gnu.org; Thu, 06 Oct 2011 05:57:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBkhv-0006CV-27 for emacs-orgmode@gnu.org; Thu, 06 Oct 2011 05:57:43 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:45366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBkhu-0006CP-Tw for emacs-orgmode@gnu.org; Thu, 06 Oct 2011 05:57:39 -0400 Received: by eye13 with SMTP id 13so2831983eye.0 for ; Thu, 06 Oct 2011 02:57:37 -0700 (PDT) In-Reply-To: <20111006095132.GE26104@0x63.nu> 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: Anders Waldenborg Cc: Nicolas Goaziou , Org mode mailing list On Oct 6, 2011, at 11:51 AM, Anders Waldenborg wrote: > For the record, I'm below the limit of a cumulative change of 20 > non-repetitive change lines. Yes, I have marked the change as TINYCHANGE - Carsten >=20 > On Thu, Oct 06, 2011 at 10:54:10AM +0200, Carsten Dominik wrote: >> OK, I have accepted the patch. Thanks >>=20 >> - Carsten >>=20 >> On Oct 6, 2011, at 10:43 AM, Anders Waldenborg wrote: >>=20 >>> On Thu, Oct 06, 2011 at 10:00:38AM +0200, Carsten Dominik wrote: >>>> Hi Anders, Nicolas >>>>=20 >>>> I am wondering what the status of this patch is. There was a = discussion, but I am not sure about the conclusion... >>>=20 >>>=20 >>> Carsten, >>>=20 >>> I think that the simple patch still is valid, I'm including it again >>> below. >>>=20 >>> The discussion was about my more intrusive alternative patch, and = how >>> links change their meaning depending on if the buffer is narrowed or >>> not. I did start to hack up a alternative link resolver as a proof = of >>> concept to be able to better understand how links should work in = case >>> there are multiple targets, but unfortunately I got busy with other >>> things. >>>=20 >>> anders >>>=20 >>> -- >>>=20 >>> commit 54702f063ae2df48dec7f9feb80859a6b64002a4 >>> Author: Anders Waldenborg >>> Date: Sat Aug 27 21:18:46 2011 +0200 >>>=20 >>> Make org-open-at-point only ask once whether new header should be = created. >>>=20 >>> When following "thisfile" links org-open-at-point is kind enough = to >>> retry org-link-search again after widening the buffer it can't be >>> found. However org-link-search also asks the question "No match - >>> create this as a new heading? (y or n)" when target can't be >>> found. This means that the question is asked twice when following = a >>> nonexistent link and answering no. >>>=20 >>> This is fixed by setting org-link-search-inhibit-query in first = try, >>> so only second invocation asks the question. >>>=20 >>> diff --git a/lisp/org.el b/lisp/org.el >>> index d63b854..781de88 100644 >>> --- a/lisp/org.el >>> +++ b/lisp/org.el >>> @@ -9537,7 +9537,8 @@ application the system uses for this file = type." >>> ((equal arg '(16)) ''org-occur) >>> (t nil)) >>> ,pos))) >>> - (condition-case nil (eval cmd) >>> + (condition-case nil (let ((org-link-search-inhibit-query t)) >>> + (eval cmd)) >>> (error (progn (widen) (eval cmd)))))) >>>=20 >>> (t >>=20 >> - Carsten >>=20 >>=20 >>=20 >>=20 >=20 > --=20 - Carsten