summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-03-03 17:42:32 +0100
committerBastien Guerry <bzg@altern.org>2013-03-03 17:42:32 +0100
commit06ec88657267c10aecdb5e509fb8ba6d373844cc (patch)
tree674ba06a846379c4e2d055f79011488a0007fca5
parentf48605c8783eee8d62dec4df038c3520a9a01f29 (diff)
downloadorg-mode-06ec88657267c10aecdb5e509fb8ba6d373844cc.tar.gz
org-agenda.el (org-agenda-write): Overwrite file when called non-interactively
* org-agenda.el (org-agenda-write): Overwrite file when called non-interactively. Thanks to Simon Thum for reporting this.
-rw-r--r--lisp/org-agenda.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 414fd2b..20e3761 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3219,7 +3219,8 @@ If AGENDA-BUFFER-NAME, use this as the buffer name for the agenda to write."
(interactive "FWrite agenda to file: \nP")
(if (or (not (file-writable-p file))
(and (file-exists-p file)
- (not (y-or-n-p (format "Overwrite existing file %s? " file)))))
+ (if (called-interactively-p 'any)
+ (not (y-or-n-p (format "Overwrite existing file %s? " file))))))
(error "Cannot write agenda to file %s" file))
(org-let (if nosettings nil org-agenda-exporter-settings)
'(save-excursion