Re: mutt/2323: feature of creating personal my_variables should be documented
Thank you all for looking into this.
* Alain Bench on Friday, July 07, 2006 at 01:05:01 +0200:
> On Wednesday, July 5, 2006 at 2:35:02 +0200, Brendan Cully wrote:
>> On Wednesday, 05 July 2006 at 02:15, Alain Bench wrote:
> On Wednesday, July 5, 2006 at 13:25:01 +0200, Rocco Rutte wrote:
<snip>
>> I recall Alain Bench having better examples
>
> Ah? Forgot, yes: From Mutt-ng discussions when you created user_vars
> and system vars, right. Well I grepped my sent box, and my "temporary
> backup" example is in spirit already there in your patch. Exactly was
> (adapted to $my_syntax):
>
>| macro index <F42> '\
>| <enter-command> set my_old_resolve=$resolve resolve=no<Enter>\
>| ...multiple operations on one mail...\
>| <enter-command> set resolve=$my_old_resolve &my_old_resolve<Enter>'
^
I don't understand the &my_old_resolve.
Why isn't
<enter-command> set resolve=$my_old_resolve<Enter>
enough?
What exactly does/means &my_old_resolve?
<snip>
> Yet another backup usage, but with the "\$" trick to defer variable
> expansion from muttrc parsing time to macro execution time:
>
>| macro pager <PageDown> "\
>| <enter-command> set my_old_pager_stop=\$pager_stop pager_stop<Enter>\
>| <next-page>\
>| <enter-command> set pager_stop=\$my_old_pager_stop &my_old_pager_stop<Enter>"
Again I don't get the &my_... part.
So, just to make sure even I understand:
| macro pager <PageDown> '\
| <enter-command> set my_old_pager_stop=$pager_stop pager_stop<Enter>\
| <next-page>\
| <enter-command> set pager_stop=$my_old_pager_stop<Enter>'
would finally set pager_stop to its value at /parsing/ time?
Also, from my meagre experiments the last example does *only*
work with single quotes. In case this is expected behaviour it
would be good to note it in the docs.
I also use something that is perhaps illegal:
set my_datesort="uncollapse_jump=no sort=date sort_aux=date"
and then, in a hook:
folder-hook test "set $my_datesort"
This works, as long as I use $my_datesort in the same file as I
have it declared in. It doesn't work when I do
folder-hook test "source testhook"
where file testhook contains "set $my_datesort".
c
--
_B A U S T E L L E N_ lesen! --->> <http://www.blacktrash.org/baustellen.html>