[PATCH 5/5] emacs: Retain the state of the buffer during `notmuch-show-refresh-view'.
David Edmondson
dme at dme.org
Mon Jan 30 22:17:58 PST 2012
On Mon, 30 Jan 2012 20:19:23 +0000, Mark Walters <markwalters1009 at gmail.com> wrote:
> 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!)
Thinking about it afterwards, I agree. That is:
- '=' should behave as though the buffer was remade anew,
- the toggle commands should retain the state.
> 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?
Agreed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120131/3610f74c/attachment.pgp>
More information about the notmuch
mailing list