From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: org-link-search: Augment signature? Date: Fri, 20 Aug 2010 15:18:04 +0530 Message-ID: <8162z57gyz.fsf@gmail.com> References: <817hjm94ta.fsf@gmail.com> <81fwy97id5.fsf@gmail.com> <2559B10D-71A8-46B9-9694-AE6332924768@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=53867 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmOS2-0003Wo-5e for emacs-orgmode@gnu.org; Fri, 20 Aug 2010 06:03:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OmOD3-0006P2-1B for emacs-orgmode@gnu.org; Fri, 20 Aug 2010 05:48:26 -0400 Received: from mail-pv0-f169.google.com ([74.125.83.169]:51560) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmOD2-0006Ox-RD for emacs-orgmode@gnu.org; Fri, 20 Aug 2010 05:48:25 -0400 Received: by pvc30 with SMTP id 30so1813450pvc.0 for ; Fri, 20 Aug 2010 02:48:23 -0700 (PDT) In-Reply-To: <2559B10D-71A8-46B9-9694-AE6332924768@gmail.com> (Carsten Dominik's message of "Fri, 20 Aug 2010 11:26:47 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: emacs-orgmode@gnu.org >> On a related note, how would I accomplish this - "Create the >> headline automagically everytime but suppress the prompt". >> >> This is the code snippet as it is in git today - >> >> ((and (not org-link-search-inhibit-query) (eq >> org-link-search-must-match-exact-headline 'query-to-create) >> (y-or-n-p "No match - create this as a new heading? ")) >> (goto-char (point-max)) (or (bolp) (newline)) (insert "* " s >> "\n") (beginning-of-line 0)) >> >> >> Shouldn't the above block should instead read thus >> >> ((and (eq org-link-search-must-match-exact-headline >> 'query-to-create) (or org-link-search-inhibit-query (y-or-n-p "No >> match - create this as a new heading? ")) (goto-char (point-max)) >> (or (bolp) (newline)) (insert "* " s "\n") (beginning-of-line 0)) > Why??? > The above code would stop at the first form that returns nil, for > example (insert ...) or even (newline) Mistake on my part. (Not a native speaker of elisp here) ((and (eq org-link-search-must-match-exact-headline 'query-to-create) (or org-link-search-inhibit-query (y-or-n-p "No match - create this as a new heading? "))) (goto-char (point-max)) (or (bolp) (newline)) (insert "* " s "\n") (beginning-of-line 0)) My gut feeling is that there is some inconsistency in the way org-link-search-must-match-exact-headline and org-link-search-inhibit-query work together. Jambunathan K.