From mboxrd@z Thu Jan 1 00:00:00 1970 From: rpgoldman@sift.info Subject: [PATCH] Don't prompt for bad links during babel export. Date: Thu, 5 May 2011 17:33:03 -0500 Message-ID: <1304634783-20495-1-git-send-email-rpgoldman@sift.info> Return-path: Received: from eggs.gnu.org ([140.186.70.92]:53141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QI76o-00088A-0u for emacs-orgmode@gnu.org; Thu, 05 May 2011 18:33:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QI76m-0002cW-Ux for emacs-orgmode@gnu.org; Thu, 05 May 2011 18:33:21 -0400 Received: from enchanter.real-time.com ([63.170.91.11]:2367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QI76m-0002cQ-OD for emacs-orgmode@gnu.org; Thu, 05 May 2011 18:33:20 -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: emacs-orgmode@gnu.org Cc: "Robert P. Goldman" From: Robert P. Goldman Previously, when trying to look for the header of a source block during export, org would prompt the user to add a new heading if it couldn't find a match. This prompt is not appropriate for non-interactive use. Patch to org-babel-exp-in-export-file macro to bind org-link-search-inhibit-query. --- Here's a patch I found the need for while I was debugging the org-babel export on included files. When org-babel was unable to find a link during its search for header arguments, it would inappropriately prompt me to create that header! lisp/ob-exp.el | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el index 20a7cda..d700f6d 100644 --- a/lisp/ob-exp.el +++ b/lisp/ob-exp.el @@ -93,7 +93,8 @@ source block function.") (set-buffer (get-file-buffer org-current-export-file)) (save-restriction (condition-case nil - (org-open-link-from-string link) + (let ((org-link-search-inhibit-query t)) + (org-open-link-from-string link)) (error (when heading (goto-char (point-min)) (re-search-forward (regexp-quote heading) nil t)))) -- 1.7.3.5