On Sat, Nov 28, 2015 at 9:37 PM, Xu Wang <xuwang...@gmail.com> wrote:
> On Sat, May 30, 2015 at 5:44 AM, Xu Wang <xuwang...@gmail.com> wrote:
>> On Fri, May 29, 2015 at 5:22 PM, Andrzej Popielewicz
>> <apopi...@amu.edu.pl> wrote:
>>> * Xu Wang <xuwang...@gmail.com> [2015-05-27 22:27:00]:
>>>
>>>> Dear all,
>>>>
>>>> I would like set a folder hook for postponed messages, which I hope is
>>>> run when I do "R" to change to the postponed folder.
>>>>
>>>> Note that in my .muttrc I have:
>>>>
>>>> set postponed="+[Gmail].Drafts"
>>>>
>>>> but the hook does not seem to work. I tried many, including:
>>>>
>>>> folder-hook 'Drafts' 'set editor = "vim"'
>>>>
>>>> Is there a reason this is not matched by regex?
>>>>
>>>> Kind regards,
>>>>
>>>> Xu
>>>
>>> I have just tested .
>>> The following works
>>>
>>> set editor="elvis"
>>> folder-hook "imap.amu.edu.pl/Drafts" set editor="vim"
>>>
>>> If I use
>>> mutt -f imaps://imap.amu.edu.pl/INBOX/
>>> and I use "e" command to edit the message then elvis is used
>>> if I use
>>> mutt -f imaps://imap.amu.edu.pl/Drafts/
>>> and I use "e" command to edit the message then vi is used
>>>
>>> Seems it is exactly what You wanted . Or ?
>>>
>>> Andrzej
>>
>> Dear all,
>>
>> Thank you very much for such great responses. I understand the issue I
>> had much better now. I thought I wanted folder-hook, but actually I
>> think I want something like postpone-hook, which does not exist
>> (probably for good reason).
>>
>> I now see two options, to use folder hook and 'c' to change
>> directories, such as Andrzej is suggesting, or to use macros, such as
>> Kevin is suggesting.
>>
>> I will test and figure out which is best for my set up. Thank you so much.
>>
>> Kind regards,
>
> I am still attempting to configure things to my preference.
>
> I have currently in my .muttrc:
>
>
> set index_format = "%4C %Z %[%b %d %R] %-15.15n (%X) %s"
> macro index,pager R "<enter-command>set index_format='%4C %Z %[%b %d
> %R] %-15.15F (%X) %s'<enter><recall-message>
> push R
>
> I prefer a different index format when in the list of postponed
> messages. Because we don't have such a thing as "map-based hooks" I
> use macro.
> The last command is what opens postponed messages on startup, which is
> my preference.
>
> However, now my default index is changed. For example, suppose no
> postponed message. Then index is set as above and not set to index I
> prefer when not in postpone map. I attempted:
>
> folder-hook "." 'set index_format = "%4C %Z %[%b %d %R] %-15.15n (%X) %s"'
>
> but that does not help (=does not change anything unless I first
> change to a folder and then change back).
> Is there a method to set a variable when *leaving* postponed map?
>
> Does someone have a suggestion?
>
> Kind regards,
>
> Xu

Hello,

I still have the above question. I am unsure how to proceed.
Basically, I would like one index_format (using -15.15n) in every
situation except when I am in the postponed map, where I would like a
different index_format (-15.15L).

Is there a suggestion for achieving above goal?

Kind regards,

Xu

Reply via email to