No context set in mu4e-compose-mode-hook?

10 views
Skip to first unread message

Malcolm Matalka

unread,
May 3, 2018, 11:10:58 AM5/3/18
to mu-discuss
I have the below code in my .emacs. When it runs, I get "Context name:
nil". Shouldn't I expect the context to be set in here?

I'm running version 1.0 C

(add-hook 'mu4e-compose-mode-hook
(lambda ()
"My settings for message composition."
(let (ctx-name (mu4e-context-name (mu4e-context-current)))
(message "Context name: %s" ctx-name)
(cond
((string= ctx-name "foobar") (mml-secure-message-sign-pgpmime))
((string= ctx-name "bazboom") (mml-secure-message-sign-pgpmime))))
(flyspell-mode)))

Thanks

Dirk-Jan C. Binnema

unread,
May 11, 2018, 7:48:51 AM5/11/18
to mu-di...@googlegroups.com

On Thursday May 03 2018, Malcolm Matalka wrote:

> I have the below code in my .emacs. When it runs, I get "Context name:
> nil". Shouldn't I expect the context to be set in here?
>
> I'm running version 1.0 C
>
> (add-hook 'mu4e-compose-mode-hook
> (lambda ()
> "My settings for message composition."
> (let (ctx-name (mu4e-context-name (mu4e-context-current)))

^^^
(let (( ....

(perhaps?)

> (message "Context name: %s" ctx-name)
> (cond
> ((string= ctx-name "foobar") (mml-secure-message-sign-pgpmime))
> ((string= ctx-name "bazboom") (mml-secure-message-sign-pgpmime))))
> (flyspell-mode)))
>

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

Malcolm Matalka

unread,
May 11, 2018, 7:57:26 AM5/11/18
to mu-di...@googlegroups.com

Dirk-Jan C. Binnema <dj...@djcbsoftware.nl> writes:

> On Thursday May 03 2018, Malcolm Matalka wrote:
>
>> I have the below code in my .emacs. When it runs, I get "Context name:
>> nil". Shouldn't I expect the context to be set in here?
>>
>> I'm running version 1.0 C
>>
>> (add-hook 'mu4e-compose-mode-hook
>> (lambda ()
>> "My settings for message composition."
>> (let (ctx-name (mu4e-context-name (mu4e-context-current)))
>
> ^^^
> (let (( ....
>
> (perhaps?)

Whoops, you are correct, I'm an elisp noob. Thanks for the help.
signature.asc
Reply all
Reply to author
Forward
0 new messages