[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Don't ask "File changed on disk" in org-babel-post-tangl
From: |
Eric Schulte |
Subject: |
Re: [O] [PATCH] Don't ask "File changed on disk" in org-babel-post-tangle-hook |
Date: |
Fri, 07 Jun 2013 07:23:41 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Vitalie Spinu <address@hidden> writes:
> The problem with org-babel-post-tangle-hook is that user is always asked
> yes-or-no-p for file reversion. Calling auto revert (as Rainer tried)
> will not help.
>
> The problem is in find-file-noselect in org-babel-find-file-noselect-refresh.
>
> The following patch fixes it by silencing find-file-noselect. Besides
> reversion question, there are a couple of other warning/questions that
> are silenced, but given that org-babel-find-file-noselect-refresh is
> used only for reverting tangled files, this is probably not an issue.
>
Applied. Thanks,
>
> Vitalie
>
>
> From 2f408019b940c7e3b742dd2941f725f97645b868 Mon Sep 17 00:00:00 2001
> From: Vitalie Spinu <address@hidden>
> Date: Fri, 7 Jun 2013 12:43:55 +0200
> Subject: [PATCH] avoid file warnings in org-babel-post-tangle-hook
>
> * lisp/ob-tangle.el (org-babel-find-file-noselect-refresh): call
> find-file-noselect with 'nowarn argument to surpress yes-or-no-p
> reversion message.
> ---
> lisp/ob-tangle.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
> index 95d518a..82f2c10 100644
> --- a/lisp/ob-tangle.el
> +++ b/lisp/ob-tangle.el
> @@ -114,7 +114,7 @@ result. The default value is `org-babel-trim'."
> (defun org-babel-find-file-noselect-refresh (file)
> "Find file ensuring that the latest changes on disk are
> represented in the file."
> - (find-file-noselect file)
> + (find-file-noselect file 'nowarn)
> (with-current-buffer (get-file-buffer file)
> (revert-buffer t t t)))
--
Eric Schulte
http://cs.unm.edu/~eschulte
- [O] Automatically adding local variables to tangled file, Rainer M Krug, 2013/06/05
- Re: [O] Automatically adding local variables to tangled file, Eric Schulte, 2013/06/08
- Re: [O] Automatically adding local variables to tangled file, Achim Gratz, 2013/06/08
- Re: [O] Automatically adding local variables to tangled file, Eric Schulte, 2013/06/08
- Re: [O] Automatically adding local variables to tangled file, Rainer M Krug, 2013/06/10
- [O] Problem in tangle-mode -- WAS: Automatically adding local variables to tangled file, Rainer M Krug, 2013/06/10
- Re: [O] Problem in tangle-mode -- WAS: Automatically adding local variables to tangled file, Eric Schulte, 2013/06/10
- [O] BUG - Problem in tangle-mode, Rainer M Krug, 2013/06/11
- Re: [O] BUG - Problem in tangle-mode, Eric Schulte, 2013/06/11
- Re: [O] BUG - Problem in tangle-mode, Rainer M Krug, 2013/06/11