emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: rpgoldman@sift.info
Cc: "Robert P. Goldman" <rpgoldman@real-time.com>, emacs-orgmode@gnu.org
Subject: Re: [PATCH] Don't prompt for bad links during babel export.
Date: Thu, 05 May 2011 19:54:03 -0600	[thread overview]
Message-ID: <87fwossi36.fsf@gmail.com> (raw)
In-Reply-To: 1304634783-20495-1-git-send-email-rpgoldman@sift.info

Applied.  Thanks for the patch -- Eric

rpgoldman@sift.info writes:

> From: Robert P. Goldman <rpgoldman@real-time.com>
>
> 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))))

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

      reply	other threads:[~2011-05-06  2:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05 22:33 [PATCH] Don't prompt for bad links during babel export rpgoldman
2011-05-06  1:54 ` Eric Schulte [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fwossi36.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rpgoldman@real-time.com \
    --cc=rpgoldman@sift.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).