[PATCH 5/5] emacs: Retain the state of the buffer during `notmuch-show-refresh-view'.

Mark Walters markwalters1009 at gmail.com
Mon Jan 30 12:19:23 PST 2012


On Mon, 30 Jan 2012 16:31:04 +0000, David Edmondson <dme at dme.org> wrote:
> Record the state of the buffer during `notmuch-show-refresh-view'.
> 
> In this context, "state" is defined as:
>  - the open/closed state of each message,
>  - the current message.

This looks great! I have two very minor queries one of which may class
as bikeshedding.

The first is that I currently sometimes use = (that is
notmuch-show-refresh-view) as a way to go back to the original state (ie
which messages are open and back to the first message) so I am not sure
the keep state version should completely replace the old one. (Maybe
there is an alternative way to achieve the same effect that I don't know!)

Secondly in

>  (defun notmuch-show-refresh-view ()
>    "Refresh the current view.
>  
>  Refreshes the current view, observing changes in cryptographic preferences."
>    (interactive)
> -  (let ((inhibit-read-only t))
> -    (erase-buffer))
> -  (notmuch-show-worker notmuch-show-thread-id notmuch-show-parent-buffer
> -		       notmuch-show-query-context))
> +  (let ((inhibit-read-only t)
> +	(state (notmuch-show-capture-state)))
> +    (erase-buffer)
> +    (notmuch-show-worker notmuch-show-thread-id notmuch-show-parent-buffer
> +			 notmuch-show-query-context)
> +    (notmuch-show-apply-state state)))

how would you feel about a (notmuch-show-message-adjust) at the end?

Other than that this is excellent.

Best wishes

Mark



More information about the notmuch mailing list