summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuchenxuan Tong <demon386@gmail.com>2013-07-19 13:19:07 +0800
committerCarsten Dominik <carsten.dominik@gmail.com>2013-08-08 08:49:20 +0200
commit59eff74fad2ba48140ccb957ac9e27b6cc5d38bb (patch)
tree774699472e0dcd87c7929fd40edc6f6eb4648b5a
parent2b9f8c94331571cfc1b2ba09d50a7b5927612eca (diff)
downloadorg-mode-59eff74fad2ba48140ccb957ac9e27b6cc5d38bb.tar.gz
save-restriction in `org-mobile-push'
* lisp/org-mobile.el (org-mobile-push): add `save-restriction' The fact that pushing org-file loses my narrow context annoys me. TINYCHANGE
-rw-r--r--lisp/org-mobile.el35
1 files changed, 18 insertions, 17 deletions
diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 7cdaf34..a43896b 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -319,23 +319,24 @@ create all custom agenda views, for upload to the mobile phone."
(org-agenda-tag-filter org-agenda-tag-filter)
(org-agenda-redo-command org-agenda-redo-command))
(save-excursion
- (save-window-excursion
- (run-hooks 'org-mobile-pre-push-hook)
- (org-mobile-check-setup)
- (org-mobile-prepare-file-lists)
- (message "Creating agendas...")
- (let ((inhibit-redisplay t)
- (org-agenda-files (mapcar 'car org-mobile-files-alist)))
- (org-mobile-create-sumo-agenda))
- (message "Creating agendas...done")
- (org-save-all-org-buffers) ; to save any IDs created by this process
- (message "Copying files...")
- (org-mobile-copy-agenda-files)
- (message "Writing index file...")
- (org-mobile-create-index-file)
- (message "Writing checksums...")
- (org-mobile-write-checksums)
- (run-hooks 'org-mobile-post-push-hook)))
+ (save-restriction
+ (save-window-excursion
+ (run-hooks 'org-mobile-pre-push-hook)
+ (org-mobile-check-setup)
+ (org-mobile-prepare-file-lists)
+ (message "Creating agendas...")
+ (let ((inhibit-redisplay t)
+ (org-agenda-files (mapcar 'car org-mobile-files-alist)))
+ (org-mobile-create-sumo-agenda))
+ (message "Creating agendas...done")
+ (org-save-all-org-buffers) ; to save any IDs created by this process
+ (message "Copying files...")
+ (org-mobile-copy-agenda-files)
+ (message "Writing index file...")
+ (org-mobile-create-index-file)
+ (message "Writing checksums...")
+ (org-mobile-write-checksums)
+ (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)