<<< Date Index >>>     <<< Thread Index >>>

Re: Changing "weed" options when forwarding message



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday, November 28 at 11:26 AM, quoth Jean-Rene David:
>> Rather than a hook, you may want to rebind your "forward" key (I'll 
>> assume you've left it as 'f'). For example, you could do something 
>> like this:
>> 
>> macro index f \
>>     <enter-command>set\ forward_decode=yes<enter>\
>>     <forward-message>\
>>     <enter-command>set\ forward_decode=no<enter>
>
> I thought this would work but the command *after* 
> '<forward-message>' breaks things.

Ahh, okay, that's right. Hmm.

So, what needs to happen is you need the special settings set before 
forwarding, and you need them reset after you finish.

This will begin to get even uglier, but... one thing you could do is 
to macro the forward, like so:

# to set ignore settings for forwarding
macro index,pager f \
    <enter-command>ignore\ foo<enter>\
    <forward-message>

# to restore ignore settings
macro compose y \
    <enter-command>unignore\ foo<enter>\
    <send-message>
macro compose q \
    <enter-command>unignore\ foo<enter>\
    <exit>
macro compose P \
    <enter-command>unignore\ foo<enter>\
    <postpone-message>

There might be other ways to exit the compose screen of a forward, and 
you'd need to macro those as well, but they don't spring to mind right 
away. Note that these 'unignore foo' bits will happen for every 
message you send, not just for the ones that relate to forwarded 
messages. If all you're doing is ignore/unignore, this shouldn't pose 
a problem, but if you're doing something more complicated (like using 
'toggle' or something) where the extra steps should ONLY ever be 
performed for forwarded messages, you'd have to do something like 
this:

macro index,pager f \
    <enter-command>ignore\ foo<enter>\
    <enter-command>macro\ compose\ y\ ,y<enter>\
    <forward-message>
macro compose ,y <enter-command>unignore\ foo<enter>\
    <enter-command>bind compose y send-message<enter>\
    <send-message>

~Kyle
- -- 
Three things in human life are important.  The first is to be kind. 
The second is to be kind.  And the third is to be kind.
                                                        -- Henry James
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFFbIyiBkIOoMqOI14RAu1MAJ98gcO9gK6IjCm9W5Mvt1To3X5cdwCgvYiN
XZlg3C1f7epBWO26W5o6y3U=
=EAZZ
-----END PGP SIGNATURE-----