diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-01-03 15:45:53 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-01-03 15:45:53 +0100 |
commit | c0ea20aab70a74136110417bae459abd8efabeaf (patch) | |
tree | 953ef28dda387386352bab79653614b29bea7bb8 | |
parent | 837e1b4249f8dcabd25e40cff765a5bb91b9dae5 (diff) | |
download | org-mode-c0ea20aab70a74136110417bae459abd8efabeaf.tar.gz |
org-mobile: Save agenda files before pushing
* lisp/org-mobile.el (org-mobile-push): Save agenda files before
pushing.
Fixes: 19448
-rw-r--r-- | lisp/org-mobile.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index a548930..27038a1 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -311,6 +311,11 @@ create all custom agenda views, for upload to the mobile phone." (let ((org-agenda-buffer-name "*SUMO*") (org-agenda-tag-filter org-agenda-tag-filter) (org-agenda-redo-command org-agenda-redo-command)) + ;; Offer to save agenda-related buffers before pushing, preventing + ;; "Non-existent agenda file" prompt for lock files (see #19448). + (let ((agenda-buffers (org-buffer-list 'agenda))) + (save-some-buffers nil + (lambda () (memq (current-buffer) agenda-buffers)))) (save-excursion (save-restriction (save-window-excursion |