On Mon, Mar 03 2014, Ken Mankoff <[email protected]> wrote:
> I'd like to have a global keybinding to INBOX and another to Compose.
> I already have one to bring up the main mu4e frame:
>
> (global-set-key "\M-M" 'mu4e)
>
> But when I try to set M-I to jump to the INBOX with this:
>
> (global-set-key "\M-I" '(mu4e~headers-jump-to-maildir "/INBOX"))
Well, keys have to be bound to commands, but you're binding it to a
literal list.
> It doesn't work. I also know we're not supposed to use the mu4e~*
> functions. Can someone advise how to set up a keystroke to jump to
> INBOX and to Compose?
Composing a new message is done with the command `mu4e-compose-new',
which you can easily bind to a key:
(global-set-key "\M-C" 'mu4e-compose-new)
For jumping to the inbox, you can define your own function, which
doesn't have to be very complex:
```
(defun my-mu4e-inbox ()
"Display the inbox."
(interactive)
(if (not (mu4e-running-p))
(error "mu4e is not running ")
(mu4e-headers-search "maildir:/INBOX")))
(global-set-key "\M-I" 'my-mu4e-inbox)
```
I'm assuming that "maildir:/INBOX" works in your situation, otherwise
you'll have to adjust appropriately.
Dirk, in case you're reading this, quick question: is there a way to
start mu4e in the background? I mean, running `mu4e' starts the main
mu4e view, but perhaps it would be nice to be able to start mu4e in
~/.emacs in the background, so the (mu4e-running-p) check isn't needed
in the above function.
HTH
--
Joost Kremers
Life has its moments
--
You received this message because you are subscribed to the Google Groups
"mu-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.