problem redrawing menu after context switch

5 views
Skip to first unread message

Stig Brautaset

unread,
Nov 29, 2016, 6:17:35 PM11/29/16
to mu-discuss

Hi,

I change mu4e-bookmarks in context vars to emulate a full account
switch. I have something like this:

#+BEGIN_SRC emacs-lisp
(mu4e-bookmarks
. (("flag:unread AND NOT flag:trashed AND
maildir:/Private/INBOX" "Unread Messages" ?u)
("flag:unread AND NOT flag:trashed AND
maildir:/Private/Lists" "Unread List Messages" ?l)
("date:today..now AND maildir:/Private/*" "Today's messages"
?t)
("date:7d..now AND maildir:/Private/*" "Last 7 days" ?7)))
#+END_SRC

In my Work context I have this:

#+BEGIN_SRC emacs-lisp
(mu4e-bookmarks
. (("flag:unread AND NOT flag:trashed AND maildir:/Work/INBOX"
"Unread Messages" ?u)
("date:today..now AND maildir:/Work/*" "Today's messages"
?t)
("date:7d..now AND maildir:/Work/*" "Last 7 days" ?7)))
#+END_SRC

As far as I can tell this works well, except for one little
annoying
issue: the menu is not redrawn until I hit "g" in the buffer
afterwards.

I tried adding a call to =(mu4e~main-view-real nil nil)= to the
enter-func,
but that did not work because enter-func is called *before*
setting the new
vars. I moved the call to enter-func to after setting the vars and
it appears
to work for me. Would you be open to a patch for that, or is it
likely to
cause more problems than benefits?


Stig

Stig Brautaset

unread,
Nov 30, 2016, 3:06:38 AM11/30/16
to mu-discuss

Stig Brautaset writes:
> I tried adding a call to =(mu4e~main-view-real nil nil)= to the
> enter-func, but that did not work because enter-func is called
> *before* setting the new vars. I moved the call to enter-func to
> after
> setting the vars and it appears to work for me. Would you be
> open to a
> patch for that, or is it likely to cause more problems than
> benefits?

I just went ahead and created that PR, since I already had a
branch for
it. It is here: https://github.com/djcb/mu/pull/960

Stig
Reply all
Reply to author
Forward
0 new messages