reply and forcing context

15 views
Skip to first unread message

Erik Colson

unread,
Aug 7, 2017, 11:02:42 AM8/7/17
to mu-discuss
Hello,

Sometimes people knowing my personal mail address sent a professional mail to it.  Hitting R will reply then using my personal address, which is not what I want.
mu4e allows me to switch context, but when I hit R it switches back to my personal context.  Is there an option to force another context while replying to a mail ?

thanks

Yuri D'Elia

unread,
Aug 9, 2017, 11:01:40 AM8/9/17
to mu-di...@googlegroups.com
On Mon, Aug 07 2017, Erik Colson wrote:
> mu4e allows me to switch context, but when I hit R it switches back to my
> personal context. Is there an option to force another context while
> replying to a mail ?

In 'mu4e-contexts, you can setup a :match-func that will be run to
decide which context is used depending on the message being acted on.

See the documentation about contextes.

Erik Colson

unread,
Aug 9, 2017, 5:44:30 PM8/9/17
to mu-di...@googlegroups.com

Yuri D'Elia <wav...@thregr.org> writes:

> In 'mu4e-contexts, you can setup a :match-func that will be run to
> decide which context is used depending on the message being acted on.

That is the function I actually use in normal situation. Sometimes I
want to _force_ mu4e to _not_ follow the matching context and use
another one. I can figure how to do this since mu4e always rechecks
match-func's before launching an action.
--
erik colson

Yuri D'Elia

unread,
Aug 9, 2017, 5:57:25 PM8/9/17
to mu-di...@googlegroups.com
On Wed, Aug 09 2017, Erik Colson wrote:
>> In 'mu4e-contexts, you can setup a :match-func that will be run to
>> decide which context is used depending on the message being acted on.
>
> That is the function I actually use in normal situation. Sometimes I
> want to _force_ mu4e to _not_ follow the matching context and use
> another one. I can figure how to do this since mu4e always rechecks
> match-func's before launching an action.

Ok, it's clear now. Just as a pure guess, what about checking for a
prefix argument in :match-func and return nil? [hoping it would prompt]

What I normally do in these cases is change the context when composing.
I use the snippet posted by "cacology" on the mu issues to change it
mid-flight:

https://github.com/djcb/mu/issues/776#issuecomment-242924867

Christophe Troestler

unread,
Aug 10, 2017, 4:17:43 AM8/10/17
to mu-di...@googlegroups.com
Hi,

On 2017-08-09, Yuri D'Elia wrote:
>
> On Mon, Aug 07 2017, Erik Colson wrote:
> > mu4e allows me to switch context, but when I hit R it switches back
> > to my personal context. Is there an option to force another context
> > while replying to a mail ?
>
> In 'mu4e-contexts, you can setup a :match-func that will be run to
> decide which context is used depending on the message being acted on.

BTW, wouldn’t it make sense that :enter-func takes (a possibly null)
message as argument? That would be useful to set the default dictionary
according to the person one replies to for example.

Best,
C.
Reply all
Reply to author
Forward
0 new messages