emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Muchenxuan Tong <demon386@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] save-restriction in `org-mobile-push'
Date: Thu, 8 Aug 2013 08:49:53 +0200	[thread overview]
Message-ID: <D31D02DF-C75D-4889-8704-2B9F3BFA5314@gmail.com> (raw)
In-Reply-To: <1374211147-14958-1-git-send-email-demon386@gmail.com>

Applied, thanks.

- Carsten

On 19.7.2013, at 07:19, Muchenxuan Tong <demon386@gmail.com> wrote:

> * lisp/org-mobile.el (org-mobile-push): add `save-restriction'
> 
> The fact that pushing org-file loses my narrow context annoys me.
> 
> TINYCHANGE
> ---
> lisp/org-mobile.el | 35 ++++++++++++++++++-----------------
> 1 file 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)
> -- 
> 1.8.3.2
> 
> 

      reply	other threads:[~2013-08-08  6:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19  5:19 [PATCH] save-restriction in `org-mobile-push' Muchenxuan Tong
2013-08-08  6:49 ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D31D02DF-C75D-4889-8704-2B9F3BFA5314@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=demon386@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).