summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-01-03 11:39:58 (GMT)
committer Bastien Guerry <bzg@altern.org>2013-01-03 11:39:58 (GMT)
commit3f4ad90975ec6ec3f23d7463a9203fdb898092a4 (patch)
tree6b2e313c8ba6240e9a41d571fc183106d90dce2e
parentfd0380b52fdde98820c0ac8e21a39d8ed61ae671 (diff)
downloadorg-mode-3f4ad90975ec6ec3f23d7463a9203fdb898092a4.zip
org-mode-3f4ad90975ec6ec3f23d7463a9203fdb898092a4.tar.gz
org-mobile.el (org-mobile-push): Use the correct agenda buffer names
* org-mobile.el (org-mobile-push): Use the correct agenda buffer names. Thanks to Ramon Diaz-Uriarte for reporting this issue.
-rw-r--r--lisp/org-mobile.el21
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 2016370..052ab42 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -304,12 +304,13 @@ Also exclude files matching `org-mobile-files-exclude-regexp'."
;;;###autoload
(defun org-mobile-push ()
- "Push the current state of Org affairs to the WebDAV directory.
+ "Push the current state of Org affairs to the target directory.
This will create the index file, copy all agenda files there, and also
create all custom agenda views, for upload to the mobile phone."
(interactive)
(let ((a-buffer (get-buffer org-agenda-buffer-name)))
- (let ((org-agenda-buffer-name "*SUMO*")
+ (let ((org-agenda-curbuf-name org-agenda-buffer-name)
+ (org-agenda-buffer-name "*SUMO*")
(org-agenda-tag-filter org-agenda-tag-filter)
(org-agenda-redo-command org-agenda-redo-command))
(save-excursion
@@ -329,15 +330,17 @@ create all custom agenda views, for upload to the mobile phone."
(org-mobile-create-index-file)
(message "Writing checksums...")
(org-mobile-write-checksums)
- (run-hooks 'org-mobile-post-push-hook))))
+ (run-hooks 'org-mobile-post-push-hook)))
+ (setq org-agenda-buffer-name org-agenda-curbuf-name
+ org-agenda-this-buffer-name org-agenda-curbuf-name))
(redraw-display)
- (when (and a-buffer (buffer-live-p a-buffer))
+ (when (buffer-live-p a-buffer)
(if (not (get-buffer-window a-buffer))
- (kill-buffer a-buffer)
- (let ((cw (selected-window)))
- (select-window (get-buffer-window a-buffer))
- (org-agenda-redo)
- (select-window cw)))))
+ (kill-buffer a-buffer)
+ (let ((cw (selected-window)))
+ (select-window (get-buffer-window a-buffer))
+ (org-agenda-redo)
+ (select-window cw)))))
(message "Files for mobile viewer staged"))
(defvar org-mobile-before-process-capture-hook nil