Re: Need some better ideas for folder-hooks
On Friday 10 August 2018 08:14, Dave Woodfall put forth the proposition: > My ~/Mail is a local maildir mailbox, and I have quite a few > folder-hooks, some to set different 'from' and 'sendmail' to send via > various smtp servers and addresses and some set other properties: > > folder-hook .* source ~/.mutt/default > folder-hook =Lists/* source ~/.mutt/listhook > folder-hook =Google source ~/.mutt/google > folder-hook =Yahoo source ~/.mutt/yahoo > folder-hook =Paypal|Sent|Ebay|Trash|Shops|Slackware set sort=date > ... > etc. > > There are around 12 custom hooks in all. Because I was having > problems, I also added them without the = too to see if would help. After testing a few things it turned out that only 'from' wasn't being set, but I changed things to use my_hdr and it seems OK so far. Funnily enough I used to use my_hdr a long time ago but switched to 'set from'. Not sure why now, but looking at the man page it looks like it can't be set on the fly like my_hdr. -Dave -- All language designers are arrogant. Goes with the territory... -- Larry Wall .--. oo ()// ~'
Need some better ideas for folder-hooks
My ~/Mail is a local maildir mailbox, and I have quite a few folder-hooks, some to set different 'from' and 'sendmail' to send via various smtp servers and addresses and some set other properties: folder-hook .* source ~/.mutt/default folder-hook =Lists/* source ~/.mutt/listhook folder-hook =Google source ~/.mutt/google folder-hook =Yahoo source ~/.mutt/yahoo folder-hook =Paypal|Sent|Ebay|Trash|Shops|Slackware set sort=date ... etc. There are around 12 custom hooks in all. Because I was having problems, I also added them without the = too to see if would help. After a while though I find that settings aren't being applied and I can't seem to find any clues why. Is it the .* that's messing up the others? They seem to work fine for a while, even with that. If there are better ways to do this I'd be glad for any ideas. -Dave -- It's now the GNU Emacs of all terminal emulators. -- Linus Torvalds, regarding the fact that Linux started off as a terminal emulator .--. oo ()// ~'
Re: weird behaviour unaliasing/sourcing aliases in folder-hooks
On Wed, Oct 05, 2016 at 04:42:38PM -0700, Kevin J. McCarthy wrote: > TL;DR: > > $alias_file is expanded at muttrc parsing time, not when the folder-hook > is run. > > One workaround is to defer evaluation of $alias_file by using > \$alias_file (see https://dev.mutt.org/doc/manual.html#set-myvar). > > Alternatively, you can just spell out the file in both the set and the > source. (literally, or perhaps by using a user-defined variable to > reduce duplication). > > Details: > > Since $alias_file defaults to the value of the muttrc, essentially each > of your hooks initially will set $alias_file and re-read the muttrc. > They are equivalent to: > > folder-hook "foo_folder" "unalias *; set alias_file = +foo_alias; source > muttrc" > > folder-hook "bar_folder" "unalias *; set alias_file = +bar_alias; source > muttrc" > > folder-hook "last_folder" "unalias *; set alias_file = +last_alias; source > muttrc" > > Lets say you enter foo_folder first. This will run the first hook > above, resourcing the muttrc and creating three new folder hooks. So > all the folder hooks will look like this: > > folder-hook "foo_folder" "unalias *; set alias_file = +foo_alias; source > muttrc" > folder-hook "foo_folder" "unalias *; set alias_file = +foo_alias; source > +foo_alias" > > folder-hook "bar_folder" "unalias *; set alias_file = +bar_alias; source > muttrc" > folder-hook "bar_folder" "unalias *; set alias_file = +bar_alias; source > +foo_alias" > > folder-hook "last_folder" "unalias *; set alias_file = +last_alias; source > muttrc" > folder-hook "last_folder" "unalias *; set alias_file = +last_alias; source > +foo_alias" > > Note that mutt will not create exact duplicate folder-hooks. So > subsequently entering foo_folder will not create any more folder hooks > when sourcing the muttrc. > > But, when you enter bar_folder, it will add a third folder hook to every > folder (sourcing +bar_alias), and last_folder will add a forth hook when > entered. After that, whichever folder you enter, the last folder hook > will "win". Hi Kevin, thank you for the in-depth explanation. I now understand what was going on under the hood. I also read about variable late expansion, but for some reason i didn't think this was the case. Now everything works as expected. Thanks again for this exhaustive mail, really appreciated it. Have a nice day!
Re: weird behaviour unaliasing/sourcing aliases in folder-hooks
On Wed, Oct 05, 2016 at 11:38:28PM +0200, nfb wrote: > folder-hook "some_folder" "\ > unalias *; set alias_file=/path/to/alias/file; source $alias_file" TL;DR: $alias_file is expanded at muttrc parsing time, not when the folder-hook is run. One workaround is to defer evaluation of $alias_file by using \$alias_file (see https://dev.mutt.org/doc/manual.html#set-myvar). Alternatively, you can just spell out the file in both the set and the source. (literally, or perhaps by using a user-defined variable to reduce duplication). Details: Since $alias_file defaults to the value of the muttrc, essentially each of your hooks initially will set $alias_file and re-read the muttrc. They are equivalent to: folder-hook "foo_folder" "unalias *; set alias_file = +foo_alias; source muttrc" folder-hook "bar_folder" "unalias *; set alias_file = +bar_alias; source muttrc" folder-hook "last_folder" "unalias *; set alias_file = +last_alias; source muttrc" Lets say you enter foo_folder first. This will run the first hook above, resourcing the muttrc and creating three new folder hooks. So all the folder hooks will look like this: folder-hook "foo_folder" "unalias *; set alias_file = +foo_alias; source muttrc" folder-hook "foo_folder" "unalias *; set alias_file = +foo_alias; source +foo_alias" folder-hook "bar_folder" "unalias *; set alias_file = +bar_alias; source muttrc" folder-hook "bar_folder" "unalias *; set alias_file = +bar_alias; source +foo_alias" folder-hook "last_folder" "unalias *; set alias_file = +last_alias; source muttrc" folder-hook "last_folder" "unalias *; set alias_file = +last_alias; source +foo_alias" Note that mutt will not create exact duplicate folder-hooks. So subsequently entering foo_folder will not create any more folder hooks when sourcing the muttrc. But, when you enter bar_folder, it will add a third folder hook to every folder (sourcing +bar_alias), and last_folder will add a forth hook when entered. After that, whichever folder you enter, the last folder hook will "win". -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA signature.asc Description: PGP signature
Syncing settings, different folder-hooks on different machines
Hi, I sync my settings between different machines via Dropbox. I have settings for several accounts and each in its own file. When I open a specific inbox via a macro like macro index f5 'change-folderimaps://acco...@mailserver.com/INBOXenter' I use a folder-hook to source a specific account file folder-hook 'mailserver.com' 'source ~/.mutt/account.mailserver.com' (while .mutt is a symlink to a folder in my Dropbox) Since those account-files are in my Dropbox-account, I don't have passwords saved in there. But when using mutt from my personal laptop, I'd like to source the following file: ~/.mutt_local/account.mailserver.com because in there I have set the passwords. Because I already have special settings for my personal laptop I have a .muttrc on my personal laptop that sources all the appropriate files, instead of relying solely on the muttrc in the Dropbox It looks right now like this: source ~/Dropbox/Dotfiles/mutt/muttrc source ~/Dropbox/Dotfiles/mutt/sidebar source ~/Dropbox/Dotfiles/mutt/gpg.rc source ~/Dropbox/Dotfiles/mutt/gpg_special auto_view text/html I thought now that I could fit in a special file with folder-hooks that overwrites the folder-hooks in ~/Dropbox/Dotfiles/mutt/muttrc by adding source ~/.mutt_local/local_folderhooks right after sourcing ~/Dropbox/Dotfiles/mutt/muttrc but it doesn't work. Any ideas how I could solve this? I mean synced settings for different machines but having on one machine separate folder-hooks for the accounts, so account-files with passwords get sourced. Thanks, Niels pgppShE0JZbLf.pgp Description: PGP signature
Re: priority of send-hooks and folder-hooks
On Mon, May 16, 2011 at 09:53:34AM +0200, Thorsten Scherf wrote: I did some signature configuration based on folder-hooks and send-hooks. As default send-hook, I've choosen a specific signature that changes based on different recipient addresses. I now want to change the signature also based on specific holders, but it looks like the config I did for send-hooks has preference over the folder-hook config. Is there any way to change this behaviour? Can you elaborate more specifically on what you want to accomplish? It's unclear to me if you are attemping to set a specific signature per folder that overrides your default recipient send-hooks.
priority of send-hooks and folder-hooks
I did some signature configuration based on folder-hooks and send-hooks. As default send-hook, I've choosen a specific signature that changes based on different recipient addresses. I now want to change the signature also based on specific holders, but it looks like the config I did for send-hooks has preference over the folder-hook config. Is there any way to change this behaviour? Cheers, Thorsten smime.p7s Description: S/MIME cryptographic signature
Re: folder hooks and condition not for the first message [SOLVED]
the command next-entry is to delete from the selected message to bottom, not like without it, to the top message. What happens if you drop next-entry and set $resolve? Exactly this works great! Thank you very much! Have a nice Sunday. Raphael.
Re: folder hooks and condition not for the first message
the command next-entry is to delete from the selected message to bottom, not like without it, to the top message. What happens if you drop next-entry and set $resolve? Hi Alain, I'll read it at the weekend how this work, at the moment, I don't understand what $resolve is. But, i'll try it... thank you for your tip.
Re: folder hooks and condition not for the first message
Hello Raphael, On Friday, March 21, 2008 at 16:48:11 +0100, Raphael Brunner wrote: the command next-entry is to delete from the selected message to bottom, not like without it, to the top message. What happens if you drop next-entry and set $resolve? Bye!Alain. -- set honor_followup_to=yes in muttrc is the default value, and makes your list replies go where the original author wanted them to go: Only to the list, or with a private copy.
folder hooks and condition not for the first message
Dear Users I use this folder-hook at the moment: folder-hook 999-Trash* 'macro index d purge-messagesync-mailboxnext-entry; \ macro pager d purge-messagesync-mailboxnext-entry' now, the command next-entry is to delete from the selected message to bottom, not like without it, to the top message. this works good, only if I'm on the first message in the folder, then it jumps after to the second. From then, it stays allways on the second, if I press the d key. Is there any way to give a condition to the command next-entry to ignore, if it's the first message in the box? Or is there any better idea? Thank you for any idea and help. Raphael
How to limit displayed messages via folder-hooks
Hi, i am reading several mailing lists (including mutt-users) and prefer to view those folders with 'limit ~N'. But it seems not to be possible to enable this limit for folders by default, by using folder-hooks. Example: folder-hook . 'limit all' folder-hook =Mailinglisten.mutt-users 'limit ~N' It says that limit is an unknown command. But why? According to the help texts with '?' this is exactly the command hiding behind the keybinding 'l'. What would I need to do in order to achieve what I want? Thanks in advance, Best Regards Patrick signature.asc Description: Digital signature
Re: How to limit displayed messages via folder-hooks
* Patrick Schoenfeld on Saturday, October 06, 2007 at 20:33:21 +0200 i am reading several mailing lists (including mutt-users) and prefer to view those folders with 'limit ~N'. But it seems not to be possible to enable this limit for folders by default, by using folder-hooks. Example: folder-hook . 'limit all' folder-hook =Mailinglisten.mutt-users 'limit ~N' try: folder-hook . 'push limitallenter' folder-hook =Mailinglisten.mutt-users 'push limit~Nenter' c -- Python Mutt utilities http://www.blacktrash.org/hg/muttils/
Re: How to limit displayed messages via folder-hooks
On 2007-10-06, Patrick Schoenfeld [EMAIL PROTECTED] wrote: Hi, i am reading several mailing lists (including mutt-users) and prefer to view those folders with 'limit ~N'. But it seems not to be possible to enable this limit for folders by default, by using folder-hooks. Example: folder-hook . 'limit all' folder-hook =Mailinglisten.mutt-users 'limit ~N' It says that limit is an unknown command. But why? According to the help texts with '?' this is exactly the command hiding behind the keybinding 'l'. What would I need to do in order to achieve what I want? 'limit' is a function, not a command. folder-hooks execute commands not functions. However, the 'push' and 'exec' commands will execute functions. So one solution would be this: folder-hook =Mailinglisten.mutt-users 'push limit~NReturn' You don't need a default hook to limit all because the limit list is cleared when you change folders. Regards, Gary
Re: How to limit displayed messages via folder-hooks
* Christian Ebert on Saturday, October 06, 2007 at 21:13:02 +0200 * Patrick Schoenfeld on Saturday, October 06, 2007 at 20:33:21 +0200 i am reading several mailing lists (including mutt-users) and prefer to view those folders with 'limit ~N'. But it seems not to be possible to enable this limit for folders by default, by using folder-hooks. folder-hook . 'push limitallenter' actually, in this case, you don't need the default command above. the following should suffice: folder-hook =Mailinglisten.mutt-users 'push limit~Nenter' c -- Der Feind ist unsere eigene Frage als Gestalt. --Carl Schmitt
Re: How to limit displayed messages via folder-hooks
On Sat, Oct 06, 2007 at 12:19:00PM -0700, Gary Johnson wrote: 'limit' is a function, not a command. folder-hooks execute commands Ahh. I understand. Thanks for pointing this out. not functions. However, the 'push' and 'exec' commands will execute functions. So one solution would be this: folder-hook =Mailinglisten.mutt-users 'push limit~NReturn' Yep, that does the trick. Thanks for it. You don't need a default hook to limit all because the limit list is cleared when you change folders. Okay, thats good to know. Thanks to all, helping me with this. Regards, Patrick signature.asc Description: Digital signature
Re: folder-hooks applying too often
On Sat, Apr 14, 2007 at 04:59:45PM +0200, Rado S wrote: =- Matthew Daubenspeck wrote on Sat 14.Apr'07 at 10:55:49 -0400 -= * Matthew Daubenspeck [EMAIL PROTECTED] [2007-04-14 09:48 -0400]: folder-hook =INBOX 'macro index d save-message=INBOX.Trashenter' This hook is applied to all folders that contain =INBOX. when in INBOX and INBOX.Work. However, it is using the setup in ALL folders. Any suggestions? Add $ at the end of the mailboxname. I must have the syntax wrong, as I tried that and it makes no difference: Please re-check how folder-hooks work, maybe http://WIKI.mutt.org/?DebugConfig can help you. catch-all default is what you miss. Ugh. My mistake. That fixed it and made it work perfectly. Thanks for the link. -- Matthew Daubenspeck http://oddprocess.org Gentoo Linux x86_64 Dual Core AMD Opteron(tm) Processor 165 01:07:02 up 72 days, 14:54, 1 user, load average: 0.00, 0.00, 0.00
folder-hooks applying too often
=- Matthew Daubenspeck wrote on Sat 14.Apr'07 at 10:55:49 -0400 -= * Matthew Daubenspeck [EMAIL PROTECTED] [2007-04-14 09:48 -0400]: folder-hook =INBOX 'macro index d save-message=INBOX.Trashenter' This hook is applied to all folders that contain =INBOX. when in INBOX and INBOX.Work. However, it is using the setup in ALL folders. Any suggestions? Add $ at the end of the mailboxname. I must have the syntax wrong, as I tried that and it makes no difference: Please re-check how folder-hooks work, maybe http://WIKI.mutt.org/?DebugConfig can help you. catch-all default is what you miss. -- © Rado S. -- You must provide YOUR effort for your goal! EVERY effort counts: at least to show your attitude. You're responsible for ALL you do: you get what you give.
Re: Les clefs GPG et les folder hooks (2éme version)
Nicolas C. [EMAIL PROTECTED] - Tue, Jul 01, 2003: Je cherche, en vain, à assigner une signature GPG par défaut dans chacun de mes folder hook. C'est à dire, par exemple, que dans mon hook pour ma boite toto je voudrais que tous mes mails soient signés automatiquement (set pgp_autosign=yes) avec ma clef GPG correspondant à mon email [EMAIL PROTECTED] et pour le hook de ma boite tata la signature GPG assignée par défaut soit [EMAIL PROTECTED] J'utilise les folder-hook pour changer l'affichage entre mes folders d'arrivées et mes folders de sent/, ça se présente ainsi : folder-hook . 'set index_format=%3C %Z %{%b %d} %-15.15n (%3l) %s' folder-hook 'sent/*' 'set index_format=%{%b %d} %-30.30t (%3l) %s' le . matche tous les fodlers et définit le comportement par défaut. Il suffit donc de remplacer les commandes que j'utilise par des commandes GPG et des commandes qui changent le ficheir de signature. P.S : Pourquoi mutt m'affiche t'il l'ensemble des clefs GPG que je posséde quand je fais signer en tant que au lieu de n'afficher que les clefs dont j'ai la partie secréte ? Je dis peut-être une grosse bêtise, mais il existe au moins la possibilité de signer un mail avec sa clé privée pour que les receveurs le vérifie avec la clé publique, et également la possibilité de crypter avec la clé publique de quelqu'un un mail qu'il sera le seul à pouvoir décrypter avec sa clé privée. Cela refléterait-il ces possibilités (je n'utilise que rarement GPG, et pas avec Mutt) ? -- Loïc Minier [EMAIL PROTECTED]
Re: Les clefs GPG et les folder hooks (2éme version)
Le mardi 01 juillet 2003 à 22:33, Loïc Minier écrivait : J'utilise les folder-hook pour changer l'affichage entre mes folders d'arrivées et mes folders de sent/, ça se présente ainsi : folder-hook . 'set index_format=%3C %Z %{%b %d} %-15.15n (%3l) %s' folder-hook 'sent/*' 'set index_format=%{%b %d} %-30.30t (%3l) %s' le . matche tous les fodlers et définit le comportement par défaut. Il suffit donc de remplacer les commandes que j'utilise par des commandes GPG et des commandes qui changent le ficheir de signature. Oui mais je cherche justement à savoir quelle serait la commande qui permet de sélectionner la clef GPG par défaut. Merci pour votre aide en tout cas :-) -- Mail : Bounga at altern.org Clef GPG : http://linuxpower.free.fr/bounga.asc
Re: abook and folder-hooks.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Armin Wolfermann [EMAIL PROTECTED] wrote: * Jussi Ekholm [EMAIL PROTECTED] [15.10.2002 07:14]: When I open abook in vim-folder, and compose a mail to some address selected from there (press 'm' when the cursor's on top of the address I want to mail), my From-header gets mangled like this: pressing 'm' in abook starts a new instance of mutt. The new instance doesn't know about the previously selected folder. I suspected this to be so, but now I'm sure about this and it's always goot to be sure about things. So the thing goes, that one launches Mutt from within abook, which is launched within other (the first and main one) Mutt, right? :-) Oh, and this brings me to additional question: how did I query for abook's entries from Mutt's 'To: ' prompt again? And where the hell it was again where I was able to specify the file to be queried in this situation? I hate it when I forget things. Take a look at '4.5. External Address Queries' in your manual. Ah indeed, thanks! And I actually appreciate answers that refers to something, where the question is already answered; in this case, especially, it reminds me again of how good Mutt's manual is and from the fact, that I shouldn't be so hasty in writing a question. I should try to find the answers myself. So, thanks again - this article of yours was really uplifting! :-) - -- Jussi Ekholm [EMAIL PROTECTED] | http://erppimaa.ihku.org/ | 0x1410081E -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.0 (GNU/Linux) iD8DBQE9rCl3AtEARxQQCB4RAtUrAJ9slo3dfpiiMFQdji9hXFJvWawLIACeJ3I4 szcFTnLKGppa+G++l3fK2iY= =X5T2 -END PGP SIGNATURE-
Re: Color with folder-hooks and status changes
I beleive the color used depends on the *last* matching color index statement, so you might have to include the ~D, ~F, and ~T ones in your folder-hook *after* the ~f one. No amount of reordering seemed to solve the problem, I've tried N different combinations (likely missing the right one of course :) However, I have run across something that does seem to work well. The 5 commands: folder-hook . 'color index blue black !((! ~f jishac)|~T|~F|~D)' folder-hook =sent 'color index white black !((! ~f jishac)|~T|~F|~D)' color index black red ~D color index red black ~F color index magenta black ~T produce the desired effect. Mind you I didn't know how to AND things together (and a simple A B wasn't working) so I simply applied good ol' DeMorgan's Law to ((~f jishac)(! ~T)(! ~F)(! ~D)) If there is a more elegant solution, feel free to share ;) Now if only the command: color indicator red white ~F would actually be possible ... -Joseph
Re: Color with folder-hooks and status changes
* On Fri, 07 Jun 2002, Joseph Ishac wrote: No amount of reordering seemed to solve the problem, I've tried N different combinations (likely missing the right one of course :) What I was originally thinking was not just reordering what you had, but also moving the ~D, ~F, and ~T into your folder-hook -- something like (using ~P for from me): folder-hook . 'color index blue black ~P; \ color index black red ~D; \ color index red black ~F; \ color index magenta black ~T' folder-hook =sent 'color index white black ~P; \ color index black red ~D; \ color index red black ~F; \ color index magenta black ~T' Or did you try that? However, I have run across something that does seem to work well. The 5 commands: folder-hook . 'color index blue black !((! ~f jishac)|~T|~F|~D)' folder-hook =sent 'color index white black !((! ~f jishac)|~T|~F|~D)' color index black red ~D color index red black ~F color index magenta black ~T produce the desired effect. Mind you I didn't know how to AND things together (and a simple A B wasn't working) so I simply applied good ol' DeMorgan's Law to ((~f jishac)(! ~T)(! ~F)(! ~D)) If there is a more elegant solution, feel free to share ;) That seems like a pretty good solution to me (maybe use the ~P as above?). Now if only the command: color indicator red white ~F would actually be possible ... See the indicator color question thread from a few days ago ... -- John
Re: Color with folder-hooks and status changes
Actually, I wasn't aware you could do that with the folder-hook command. :) However, I did a quick copy/paste on the lines below and it didn't remedy the problem. I think I'll stick with the four term expression with the use of ~P (which I didn't know about either). Thanks again for the help. -Joseph No amount of reordering seemed to solve the problem, I've tried N different combinations (likely missing the right one of course :) What I was originally thinking was not just reordering what you had, but also moving the ~D, ~F, and ~T into your folder-hook -- something like (using ~P for from me): folder-hook . 'color index blue black ~P; \ color index black red ~D; \ color index red black ~F; \ color index magenta black ~T' folder-hook =sent 'color index white black ~P; \ color index black red ~D; \ color index red black ~F; \ color index magenta black ~T' Or did you try that? However, I have run across something that does seem to work well. The 5 commands: folder-hook . 'color index blue black !((! ~f jishac)|~T|~F|~D)' folder-hook =sent 'color index white black !((! ~f jishac)|~T|~F|~D)' color index black red ~D color index red black ~F color index magenta black ~T produce the desired effect. Mind you I didn't know how to AND things together (and a simple A B wasn't working) so I simply applied good ol' DeMorgan's Law to ((~f jishac)(! ~T)(! ~F)(! ~D)) If there is a more elegant solution, feel free to share ;) That seems like a pretty good solution to me (maybe use the ~P as above?). Now if only the command: color indicator red white ~F would actually be possible ... See the indicator color question thread from a few days ago ... -- John
Re: Color with folder-hooks and status changes
* Joseph Ishac [EMAIL PROTECTED] [2002-06-07 15:11]: Actually, I wasn't aware you could do that with the folder-hook command. :) However, I did a quick copy/paste on the lines below and it didn't remedy the problem. I think I'll stick with the four term expression with the use of ~P (which I didn't know about either). Make sure that the lines you pasted in had nothing after the \ 's; they need to escape the newline. (darren) -- The rebootings will continue until the configuration works.
Re: Color with folder-hooks and status changes
* On Fri, 07 Jun 2002, Joseph Ishac wrote: Actually, I wasn't aware you could do that with the folder-hook command. :) However, I did a quick copy/paste on the lines below and it didn't remedy the problem. Works as intended here -- maybe you had other 'color index' commands which were interfering? I think I'll stick with the four term expression with the use of ~P (which I didn't know about either). Cool. Thanks again for the help. No problem. -- John
Color with folder-hooks and status changes
Hi, I've recently noticed an issue with my attempt to color some index entries on a per mailbox basis using the folder-hook command. The desired effect (expressed with the snip-it below) is to color mail from myself blue, except if I'm looking at the mbox that stores my outbound messages. However, if I go to tag/delete/flag one of these messages, they do not follow the color scheme for the desired status. Instead they remain either (blue,black) or (white,black) with respect to whatever mbox is currently active. The desired effect would be to have the behavior of the hooks as well as always changing color for status changes (such as tagging, etc.) --muttrc SNIP-- folder-hook . 'color index blue black ~f jishac' folder-hook =sent 'color index white black ~f jishac' color index black red ~D color index red black ~F color index magenta black ~T --END SNIP-- converting [color index magenta black ~T] to [folder-hook . 'color index magenta black ~T'] doesn't work either, as the message remains blue/white upon being tagged. Any insight? Thanks. -Joseph
Re: Color with folder-hooks and status changes
* On Thu, 06 Jun 2002, Joseph Ishac wrote: The desired effect would be to have the behavior of the hooks as well as always changing color for status changes (such as tagging, etc.) I beleive the color used depends on the *last* matching color index statement, so you might have to include the ~D, ~F, and ~T ones in your folder-hook *after* the ~f one. -- John
folder-hooks
Hi, I have a problem with a folder-hook. Say, I've got three folders IN.back1, IN.back2 and IN.test. If I want to take some action for all folders except IN.back1 I use: folder-hook =IN\.[^b][^a][^c][^k][^1] ... The problem is that mutt doesn't apply it to IN.test. I guess that for IN.test it checks if the first 5 characters after IN. are not one of b,a,c,k,1 - but 'test' is only 4 long. I guess that's the reason why it fails in this special case while it works for all other folder names longer or equal to 5 characters after IN.. Has anybody seen this before or am I just missing something? I know I could copy'n'paste the set of folder-hooks for that one affected folder and adjust the pattern... Cheers, Rocco
Re: folder-hooks
On Fri, May 31, 2002 at 02:27:09PM +0200, Rocco Rutte wrote: I have a problem with a folder-hook. Say, I've got three folders IN.back1, IN.back2 and IN.test. If I want to take some action for all folders except IN.back1 I use: folder-hook =IN\.[^b][^a][^c][^k][^1] ... The problem is that mutt doesn't apply it to IN.test. I guess that for IN.test it checks if the first 5 characters after IN. are not one of b,a,c,k,1 - but 'test' is only 4 long. I guess that's the reason why it fails in this special case while it works for all other folder names longer or equal to 5 characters after IN.. sounds to me that it's doing exactly what you told it to... match any folder that begins with an IN., followed by 5 chars that are not (in order) b a c k 1 - and you're right - since test is only 4 characters, it doesn't match the not 1 section. I think you might be better off making a general folder hook (that will match back1 as well), then adding another folder hook (after? before?) that will deal with the special case. HTH! -- Dan Boger Linux MVP brainbench.com msg28424/pgp0.pgp Description: PGP signature
Re: folder-hooks
Hi, * Dan Boger [05/31/02 14:34:37 CEST] wrote: On Fri, May 31, 2002 at 02:27:09PM +0200, Rocco Rutte wrote: I have a problem with a folder-hook. Say, I've got three folders IN.back1, IN.back2 and IN.test. If I want to take some action for all folders except IN.back1 I use: folder-hook =IN\.[^b][^a][^c][^k][^1] ... The problem is that mutt doesn't apply it to IN.test. I guess that for IN.test it checks if the first 5 characters after IN. are not one of b,a,c,k,1 - but 'test' is only 4 long. I guess that's the reason why it fails in this special case while it works for all other folder names longer or equal to 5 characters after IN.. sounds to me that it's doing exactly what you told it to... match any folder that begins with an IN., followed by 5 chars that are not (in order) b a c k 1 - and you're right - since test is only 4 characters, it doesn't match the not 1 section. Yeah, that's what I was afraid of. Actually, I was somehow missing the fact that it checks for an existing character while 'not 1' is true for just nothing - but it's not a character. [^1] thus is true if a) there's a character and b) that character is not 1. If you don't understand the way I thought... doesn't matter: You're right. I think you might be better off making a general folder hook (that will match back1 as well), then adding another folder hook (after? before?) that will deal with the special case. It don't need even more lines in my setup. I think it should be not too difficult to write a pattern doing what I want - now that I'm aware of the small difference. Thanks anyways... Cheers, Rocco
Re: folder-hooks
Rocco, et al -- ...and then Rocco Rutte said... % % Hi, Hello! % % * Dan Boger [05/31/02 14:34:37 CEST] wrote: % On Fri, May 31, 2002 at 02:27:09PM +0200, Rocco Rutte wrote: ... % % folder-hook =IN\.[^b][^a][^c][^k][^1] ... ... % guess that for IN.test it checks if the first 5 characters % after IN. are not one of b,a,c,k,1 - but 'test' is only 4 ... % order) b a c k 1 - and you're right - since test is only 4 ... % while 'not 1' is true for just nothing - but it's not a % character. [^1] thus is true if a) there's a character and % b) that character is not 1. If you don't understand the way Have you tried [^b][^a][^c][^k][^1]* to match zero or more not-ones? HTH HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg28427/pgp0.pgp Description: PGP signature
Re: folder-hooks
On Fri, May 31, 2002 at 08:23:14AM -0500, David T-G wrote: Have you tried [^b][^a][^c][^k][^1]* to match zero or more not-ones? can't use that to negate a 1 in the 5th position... test1 would match because it would match 0 '1's in the 5th position, followed by a '1'... if you get my meaning... just occured to me that this won't match back2 either, since it starts with a b... -- Dan Boger Linux MVP brainbench.com msg28428/pgp0.pgp Description: PGP signature
Re: folder-hooks
Dan -- ...and then Dan Boger said... % % On Fri, May 31, 2002 at 08:23:14AM -0500, David T-G wrote: % Have you tried % %[^b][^a][^c][^k][^1]* % % to match zero or more not-ones? % % can't use that to negate a 1 in the 5th position... test1 would % match because it would match 0 '1's in the 5th position, followed by a % '1'... if you get my meaning... Hmmm... So something like test12345 == (t)(e)(s)(t)()12345 then? Yeah, I guess not. % % just occured to me that this won't match back2 either, since it starts % with a b... Yeah, that's another problem that occurred to me after posting. I had the same sort of problem with $alternates; I'd really like to be able to say something like set alternates = [^(laura*|madi|^quin*)]@justpickone.* to match everything at a JPO site *except* other family members (yes, I know that this leaves out webmaster and so on, which in fact *is* me but can be thought of as not being me; anyway, it's *supposed* to be a simple example). Despite some (much appreciated!) attempts to come up with a working pattern, we never figured out something that would work. % % -- % Dan Boger % Linux MVP % brainbench.com % HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg28429/pgp0.pgp Description: PGP signature
Re: folder-hooks
On Fri, May 31, 2002 at 08:39:20AM -0500, David T-G wrote: % just occured to me that this won't match back2 either, since it starts % with a b... Yeah, that's another problem that occurred to me after posting. I had the same sort of problem with $alternates; I'd really like to be able to say something like set alternates = [^(laura*|madi|^quin*)]@justpickone.* what we need is like the perl lookbehind: (?!pattern) A zero-width negative lookbehind assertion. For example /(?!bar)foo/ matches any occurrence of foo that isn't following bar. Works only for fixed-width lookbehind. so you could do set alternates =(?!laura|madi|quin)justpickone but note that I had to remove the * (which I think were supposed to be .*) - since it only works for a fixed-width string... another by the way - having a trailing .* is a nop, just eats cpu cycles (in a patterm match)... :) -- Dan Boger Linux MVP brainbench.com msg28430/pgp0.pgp Description: PGP signature
Re: folder-hooks
Hi, * David T-G [05/31/02 15:23:14 CEST] wrote: Have you tried [^b][^a][^c][^k][^1]* to match zero or more not-ones? See answer. I've already asked a few people how to best solve problems like your and mine. No way. I was advised to write a script which creates which takes all possible values and a blacklist pattern and returns a whitelist. Regular expressions are really great -- but not if someone wanted to work with blacklists. * Dan Boger [05/31/02 16:28:34 CEST] wrote: On Fri, May 31, 2002 at 08:39:20AM -0500, David T-G wrote: % just occured to me that this won't match back2 either, since it starts % with a b... Yeah, that's another problem that occurred to me after posting. I had the same sort of problem with $alternates; I'd really like to be able to say something like set alternates = [^(laura*|madi|^quin*)]@justpickone.* Hey, didn't your wife read the mail for the cat? ;-) what we need is like the perl lookbehind: (?!pattern) A zero-width negative lookbehind assertion. For example /(?!bar)foo/ matches any occurrence of foo that isn't following bar. Works only for fixed-width lookbehind. That's worth a try. another by the way - having a trailing .* is a nop, just eats cpu cycles (in a patterm match)... If I had as much [insert_favorite_good_here] as I have CPU cycles waiting to be wasted... Cheers, Rocco
problem with folder hooks
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everyone, I'm having a little trouble with setting a reply-to on a specific folder. I've commented the code below so I'm sure you can see what I'm attempting to do: #this is my main account send-hook '.' my_hdr Reply-To: Nick Wilson [EMAIL PROTECTED] # these three appear to work but sometimes when I switch back to # explodingnet after sending a mail from tioka I get the tioka # signiture? folder-hook =Tioka/nick set trash=~/Mail/Trash/tioka folder-hook =Tioka/nick set from=[EMAIL PROTECTED] folder-hook =Tioka/nick set signature=/home/nick/.tioka_signature # but this little bugger's having none of it folder-hook =Tioka/nick my_hdr Reply-To: Nick Wilson [EMAIL PROTECTED] a little help would be much appreciated, cheers.. - -- Nick Wilson // www.tioka.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8zn/eHpvrrTa6L5oRAp2SAJ9GrG4LK3TlsOnsA9ON79cuzQoS/gCgr4hj e4xk5mABoh6217gLxcHGWyM= =veLl -END PGP SIGNATURE-
Folder hooks are helping me make an ass of myself - need some more creative ideas
Hey folks. I need some help here to stop making an ass of myself on mailing lists. First, a description of how I keep doing this: My imap account is divided into quite a number of folders, each of which I can have mail delivered directly into by using the 'plussed users' format - note my From header. This is because I subscribe to a good number of lists - 6 at the moment - and I don't want to make Mutt do the sorting everytime I log in. That could take forever - especially since some of those lists have several aliases and can be quite heavy in traffic. So my natural inclination was to set up a macro that automagically sets my From, Reply-To, and To headers tied to a folder hook for each folder. Easy. Works like a charm. Except when I ask for specific info, sometimes the person helping me chooses - often for good reason - to reply directly to me, rather than on list. Well, When I reply back - not with 'L' but with 'r', yep, you guessed it, I have inappropriately brought an off list discussion back on list, often leaving out some important context. Very annoying. People get quite flustered about it too. Understandibly so. So how can I 'smarten' mutt up a little so that the To header is not automagically set if I hit 'r' instead of 'L'? Thanks everyone. PS: Please refrain from taking this one off list so I don't prove once again that I'm a bloody scatterbrain :) Thanks Lou -- Louis LeBlanc [EMAIL PROTECTED] Fully Funded Hobbyist, KeySlapper Extrordinaire :) http://acadia.ne.mediaone.net ԿԬ Technology is dominated by those who manage what they do not understand.
Re: Folder hooks are helping me make an ass of myself - need some more creative ideas
Louis LeBlanc wrote: Well, When I reply back - not with 'L' but with 'r', yep, you guessed it, I have inappropriately brought an off list discussion back on list, often leaving out some important context. Very annoying. People get quite flustered about it too. Understandibly so. perhaps you should not set the 'Reply-to' or 'To' headers and just the 'From' header? that's what i do. eg if i hit 'r' instead of 'L', my folder hook still sets the 'from' address to '[EMAIL PROTECTED]', (which is intentional - so that follow-ups directed directly to me are at least categorized in the correct folder) hitting 'L' should automatically set the correct 'to' field so there's no need to set this. i suppose one could argue as to whether or not setting the 'Reply-To' header to the list is a good idea; i'd just nicely ask people to reply to the list if they accidentally reply to me instead. hitting 'L' should also set 'Mail-Followup-To' correctly, so assuming other peoples' clients follow this (what other mail clients besides mutt pay attention to this?) that should help make sure the reply is directed appropriately. this scheme messes me up sometimes too when i forward a message from a list and forget to edit the header. such is life. w -- GPG Public Key: http://infinitejazz.net/will/pgp/
(send|folder)-hooks solved [was: Re: patch.my_hdr_subject]
On Sat, Sep 22, 2001 at 11:59:48PM -0400, David T-G wrote: [...] % This doesn?t work as sendhooks seem to take precedence over % folderhooks. Just an assumption. Well, yes and no; a folder-hook gets executed whenever you enter a matching folder, while a send-hook gets executed whenever you send a matching email. Have you tried defining a folder-hook that redefines your send-hook? --- begin hooks file --- unhook * send-hook . 'unset signature' folder-hook . 'exec collapse-all' [1] send-hook . 'set signature=~/.muttcf/signature/sig-all' [2] send-hook \ .*@*\.(ar|es|cl|co|cu|cr|ho|mx|pe|ph|uy|ve|it|pt|br)$ \ 'set signature=~/.muttcf/signature/sig-esp' [3] send-hook .*@*\.(com|org|edu|)$ \ 'set signature=~/.muttcf/signature/sig-misc' [4] send-hook ^majordomo@* 'set signature=' [5] send-hook .*-(request|(un)?subscribe|list-admin)@* \ 'set signature=' [6] folder-hook box\.uni'unhook send-hook' [7] folder-hook box\.uni\ 'set signature=~/.muttcf/signature/sig-uni' --- end hooks file --- Now I enter any box and the signature is set according to the address (sig-es, sig-misc ... or sig-all if there is no match). Then, if it´s a, say, majordomo@ address, the signature is not included. Next, I go into folder box.uni and the signature included is sig-uni. So far so good. BUT if I now leave box.uni and compose a message to any address, I expect to use one of [1, 2, 3, 4, or 5] depending on the address. Instead, [7] is used. Ok, now it works. I´ve added a folder-hook to [1, 2, 3, 4 and 5]. Not sure if this will get trickier as I add more hooks, but for now it suffices. Here is the diff for the changes against the above hooks: --- hooks.old Sun Sep 23 10:37:51 2001 +++ hooks.new Sun Sep 23 10:39:49 2001 @@ -5,17 +5,18 @@ folder-hook . 'exec collapse-all' -[1] send-hook .'set signature=~/.muttcf/signature/sig-all' +[1] foder-hook . send-hook . \ +'set signature=~/.muttcf/signature/sig-all' -[2] send-hook \ +[2] folder-hook . send-hook \ .*@*\.(ar|es|cl|co|cu|cr|ho|mx|pe|ph|uy|ve|it|pt|br)$ \ 'set signature=~/.muttcf/signature/sig-esp' -[3] send-hook .*@*\.(com|org|edu|)$\ +[3] folder-hook . send-hook .*@*\.(com|org|edu|)$ \ 'set signature=~/.muttcf/signature/sig-misc' -[4] send-hook ^majordomo@* 'set signature=' -[5] send-hook .*-(request|(un)?subscribe|list-admin)@* \ +[4] folder-hook . send-hook ^majordomo@* 'set signature=' +[5] folder-hook . send-hook .*-(request|(un)?subscribe|list-admin)@* \ 'set signature=' [6] folder-hook box\.uni 'unhook send-hook' Thank You, -- Horacio
how about folder hooks?
Hey Guys, Thanks for the keybinding. Works like a charm. Now, onto the good ole folder hook problem... I'd like a different sig and from line, depending on what folder I'm in when I reply or send. I thought I would make mutt read another config file depending on the folder, but the line I have does not do a thing. folder-hook =inbox$ source ~/.mutt/inbox.rc is that even close? -- Eat more spinach. -tom
Re: how about folder hooks?
Tom Foster [mutt-users] 24/07/01 09:31 -0400: I'd like a different sig and from line, depending on what folder I'm in when I reply or send. I thought I would make mutt read another config file depending on the folder, but the line I have does not do a thing. Use folder hooks. folder-hook =inbox$ source ~/.mutt/inbox.rc Try quoting that. Or try just adding the whole lot to your muttrc - like http://www.hserus.net/muttrc.html folder-hook . set sort=threads folder-hook . set signature=/tmp/sig.mallet folder-hook . 'set attribution = %n [%d]:' folder-hook . my_hdr From: [EMAIL PROTECTED] (Suresh Ramasubramanian) folder-hook . my_hdr Reply-To: [EMAIL PROTECTED] (Suresh Ramasubramanian) folder-hook . my_hdr Organization: The Lumber Cartel, India (tinlcI) folder-hook . my_hdr X-Operating-System: `uname -mnrs` folder-hook mutt unmy_hdr reply-to folder-hook mutt 'set attribution=%n [mutt-users] %d: ' -- Suresh Ramasubramanian + Wallopus Malletus Indigenensis EMail Sturmbannfuhrer, Lower Middle Class Unix Sysadmin
Re: how about folder hooks?
on Tue,24 Jul 2001, Tom Foster wrote: I'd like a different sig and from line, depending on what folder I'm in when I reply or send. See the following for setting up profiles: http://www.acoustics.hut.fi/~mara/mutt/profiles.html -- Whether you believe you can, or whether you believe you can't, you're absolutely right. -Henry Ford
Re: how-to elimintate headers in folder-hooks
* Thomas Duterme [EMAIL PROTECTED] [010402 22:29]: Hi everyone, I'm pretty new to mutt, but I love it so far. What's not to love? My one problem: I'd like to eliminate, or reduce headers at least in my mailboxes. Actually, I'ld like to if possible just keep the basic headers like Subject and From, rather than get the entire envelope. Is this possible? from `man muttrc`: [un]ignore pattern [ pattern ... ] The ignore command permits you to specify header fields which you usually don't wish to see. Any header field whose tag begins with an "ignored" pattern will be ignored. The unignore command permits you to define excep tions from the above mentioned list of ignored headers. -- -Mick [EMAIL PROTECTED] OpenPGP info is in the X-.* mail headers PGP signature
how-to elimintate headers in folder-hooks
Hi everyone, I'm pretty new to mutt, but I love it so far. My one problem: I'd like to eliminate, or reduce headers at least in my mailboxes. Actually, I'ld like to if possible just keep the basic headers like Subject and From, rather than get the entire envelope. Is this possible? TIA, Thomas
Re: how-to elimintate headers in folder-hooks
Thomas Duterme wrote: Hi everyone, I'm pretty new to mutt, but I love it so far. My one problem: I'd like to eliminate, or reduce headers at least in my mailboxes. Actually, I'ld like to if possible just keep the basic headers like Subject and From, rather than get the entire envelope. Is this possible? TIA, Thomas If you mean you want to reduce what is displayed in the pager, then you'll want to take advantage of Mutt's header weeding. Check out the sections of the manual dealing with that topic, especially the 'ignore' and 'unignore' commands, the 'weed' variable, and the 'display-toggle-weed' function. However, if you mean you want the headers actually removed from the email, then it sounds like a job for a mail formatter like formail, probably most conveniently invoked from a mail processor like procmail as the messages are coming in, (that's how I do it, anyway.) (BTW, good form requires you to limit your line length to less than 80 characters.) -- Mr. Wade -- Linux: The Choice of the GNU Generation
Re: how-to elimintate headers in folder-hooks
Thomas Duterme proclaimed on mutt-users that: My one problem: I'd like to eliminate, or reduce headers at least in my mailboxes. Actually, I'ld like to if possible just keep the basic headers like Subject and From, rather than get the entire envelope. Is this possible? ignore * unignorefrom: subject to cc mail-followup-to \ date x-mailer x-url hth --s -- Suresh Ramasubramanian + Wallopus Malletus Indigenensis mallet @ cluestick.org + Lumber Cartel of India, tinlcI EMail Sturmbannfuhrer, Lower Middle Class Unix Sysadmin
folder-hooks dont work
Hi! To have different Return-Paths set in my headers, in different folders I set up the following: folder-hook {imaphost}myfolder 'my_hdr Return-Path: [EMAIL PROTECTED]' When I hit m to compose a mail, it seems as it would work. With header editing enabled I can see the Return-Path is set correct. But then after I hit y to finaly send the mail the Return-Path is changed to [EMAIL PROTECTED] There are no send-hooks in my .muttrc. For a test I set up different From headers or different .signatures and they won't be overwritten, only the Return-Path. Frustrated I tried to set the my_hdr stuff in single quotes, doubles or without quotes without a different result. For now two days I try to track the problem down but I am still clueless. I am using mutt 1.2.5i on OpenBSD 2.7 (i386). Help needed. Thank you in advance. Christoph
Re: folder-hooks dont work
Christoph proclaimed on mutt-users that: To have different Return-Paths set in my headers, in different folders I set up the following: folder-hook {imaphost}myfolder 'my_hdr Return-Path: [EMAIL PROTECTED]' No damned use this way. You set the envelope (and hence the return path) using the set sendmail option in older mutts and the set envelope_from in newer mutts. For now two days I try to track the problem down but I am still clueless. I am using mutt 1.2.5i on OpenBSD 2.7 (i386). Help needed. You might get a clue from the fact that the return path is set by the mail server - and may be altered by any mailserver in the path (such as a list server, say) -s -- Suresh Ramasubramanian + Wallopus Malletus Indigenensis mallet @ cluestick.org + Lumber Cartel of India, tinlcI EMail Sturmbannfuhrer, Lower Middle Class Unix Sysadmin
Re: folder-hooks dont work
On Wed, Mar 21, 2001 at 06:56:27PM +0530, Suresh Ramasubramanian wrote: folder-hook {imaphost}myfolder 'my_hdr Return-Path: [EMAIL PROTECTED]' No damned use this way. You set the envelope (and hence the return path) using the set sendmail option in older mutts and the set envelope_from in newer mutts. Problem solved. thanks! Christoph
IMAP folder hooks and other troubles
I run mutt (1.0.1i) on a local mail host (using mbox mailboxes)and use a number of folder hooks as follows: folder-hook =Lists/Mutt-users 'macro index leftchange-folder?tab9enter' This works fine. I now try to use mutt (1.2.5i) over imap to the same box and have the following folder hook folder-hook '{hobbiton}Mail/Lists/Mutt-users' 'macro index leftchange-folder?tab10enter' where {hobbiton}Mail/Lists/Mutt-users in the browser gets me into the correct mailbox. Ths folder hook doesn't work, in fact, I get errors on startup Invalid content of \{\} for the line in question. If I define the macro without the folder hook, it works fine. If if define the folder hook like: folder-hook Mail/Lists/Mutt-users 'macro indexleftchange-folder?tab10enter' mutt accepts the folder hook but doesn't act on it. Any ideas? Second problem. I'm using imap-4.7-5 on the server and am getting irritating delays accessing email. I'm in a folder and hit tab for the next unread. Sometimes I get it almost instantly while other times (I'm thinking a folder refresh or something here), it takes up to 30 seconds or so and I get these two messages: Message 1425 UID 468 less than 1425 Message 168 UID 3481 greater than last 170 Mean anything to anyone? Better imap server? I don't get such delays using M$ Outlook Express from the same client box to the same server for the same user. TIA -- Conor Daly [EMAIL PROTECTED] Domestic Sysadmin :-) - faenor.cod.ie 11:53pm up 99 days, 6:22, 0 users, load average: 0.08, 0.02, 0.01 Hobbiton.cod.ie 11:49pm up 4 days, 13:38, 2 users, load average: 0.72, 0.42, 0.31
Re: folder-hooks with IMAP mailboxes?
On Mon, Nov 27, 2000 at 09:06:29PM -0500 or thereabouts, Tabor J. Wells wrote: On Mon, Nov 27, 2000 at 08:01:29PM +, Conor Daly [EMAIL PROTECTED] is thought to have said: Ah, got it! use folder-hook INBOX.mutt-users set sort=thread instead so long as the folder appears in your .muttrc. Doesn't work for me with 1.3.11i. From my .muttrc: mailboxes ! {server}INBOX.mutt-users ^ What's the exclamation mark for. folder-hook INBOX.mutt-users set sort=thread and it still defaults to date-received -- Conor Daly Met Eireann, Glasnevin Hill, Dublin 9, Ireland Ph +353 1 8064217 Fax +353 1 8064275
Re: folder-hooks with IMAP mailboxes?
On 2000-11-30 09:34:56 +, Conor Daly wrote: mailboxes ! {server}INBOX.mutt-users What's the exclamation mark for. It's a short-hand for your inbox. -- Thomas Roessler [EMAIL PROTECTED]
Re: folder-hooks with IMAP mailboxes?
On Sun, Nov 26, 2000 at 04:06:04PM -0500, Tabor J. Wells [EMAIL PROTECTED] wrote: I would have expected that: folder-hook {hostname}INBOX.mutt-users set sort=thread would work, but that apparantly is not the case. Any suggestions on what I'm missing? Here's a few folder-hooks that I have set: folder-hook . set pager_index_lines=10 folder-hook "!$" set pager_index_lines=4 folder-hook "!$" 'uncolor index "~C bobbell"' folder-hook "!.mutt" 'color index red default "~f Roessler"' etc. etc. -- Bob Bell [EMAIL PROTECTED] - "There are two major products to have come out of Berkeley: LSD and UNIX" -- Author Unknown
Re: folder-hooks with IMAP mailboxes?
On Mon, Nov 27, 2000 at 07:53:33PM + or so it is rumoured hereabouts, Conor Daly thought: On Mon, Nov 27, 2000 at 12:31:28PM -0500 or so it is rumoured hereabouts, Bob Bell thought: On Sun, Nov 26, 2000 at 04:06:04PM -0500, Tabor J. Wells [EMAIL PROTECTED] wrote: I would have expected that: folder-hook {hostname}INBOX.mutt-users set sort=thread would work, but that apparantly is not the case. Any suggestions on what I'm missing? Here's a few folder-hooks that I have set: folder-hook . set pager_index_lines=10 folder-hook "!$" set pager_index_lines=4 folder-hook "!$" 'uncolor index "~C bobbell"' folder-hook "!.mutt" 'color index red default "~f Roessler"' Could you post what your imap folders look like? Ie. How do you translate "!.mutt" to "{server}Mail/whatever/the/mailbox/name/is" TIA Conor Daly Ah, got it! use folder-hook INBOX.mutt-users set sort=thread instead so long as the folder appears in your .muttrc. Conor Daly
Re: folder-hooks with IMAP mailboxes?
On Mon, Nov 27, 2000 at 12:31:28PM -0500 or so it is rumoured hereabouts, Bob Bell thought: On Sun, Nov 26, 2000 at 04:06:04PM -0500, Tabor J. Wells [EMAIL PROTECTED] wrote: I would have expected that: folder-hook {hostname}INBOX.mutt-users set sort=thread would work, but that apparantly is not the case. Any suggestions on what I'm missing? Here's a few folder-hooks that I have set: folder-hook . set pager_index_lines=10 folder-hook "!$" set pager_index_lines=4 folder-hook "!$" 'uncolor index "~C bobbell"' folder-hook "!.mutt" 'color index red default "~f Roessler"' Could you post what your imap folders look like? Ie. How do you translate "!.mutt" to "{server}Mail/whatever/the/mailbox/name/is" TIA Conor Daly
Re: folder-hooks with IMAP mailboxes?
On Mon, Nov 27, 2000 at 08:01:29PM +, Conor Daly [EMAIL PROTECTED] is thought to have said: Ah, got it! use folder-hook INBOX.mutt-users set sort=thread instead so long as the folder appears in your .muttrc. Doesn't work for me with 1.3.11i. From my .muttrc: mailboxes ! {server}INBOX.mutt-users folder-hook INBOX.mutt-users set sort=thread and it still defaults to date-received Tabor -- Tabor J. Wells[EMAIL PROTECTED] Systems Administrator Art Technology Group http://www.atg.com
folder-hooks with IMAP mailboxes?
Up until yesterday I had folder-hook statements that look like: folder-hook =mutt-users set sort=thread Yesterday I moved everything from local mailboxes to IMAP mailboxes at my site and I've been unable to figure out how to get this behavior when I enter the mailbox. I would have expected that: folder-hook {hostname}INBOX.mutt-users set sort=thread would work, but that apparantly is not the case. Any suggestions on what I'm missing? Thanks, Tabor -- Tabor J. Wells[EMAIL PROTECTED] Systems Administrator Art Technology Group http://www.atg.com
Re: Folder Hooks
On Wed, May 17, 2000 at 07:58:38AM +0200, Frank Derichsweiler muttered: - On Tue, May 16, 2000 at 07:57:00PM -0600, Charles Curley wrote: - OK: I have some send hooks working. When I try to do analogous things with - folder hooks, those fail. For example: - - folder-hook =wyo_lp 'set signature=~/.signatures/conan_the_anarchist.txt' - folder-hook =wyo_lp 'my_hdr Reply-To: [EMAIL PROTECTED]' - - does not seem to work, where - - I am testing by going into the appropriate folder, then starting a new - email with "m". - - Some ideas: - * Do you have some other folder-hooks in your muttrc? IMHO *all* - matching ones are executed. E.g. a folder-hook . unmy_hdr reply-to - later in the muttrc will abandon your Reply-to-address. - *Is the = directory properly set at that time? (muttrc is read from - top to bottom...) - * Try removing the '' ticks in the 2nd one. - - HTH - Frank Thanks, Frank, but no joy on any of these. I even commented out my "folder-hook . ..." defaults, which are above the ondes I showed above. -- -- C^2 No windows were crashed in the making of this email. Looking for fine software and/or web pages? http://w3.trib.com/~ccurley
Re: Folder Hooks
Charles Curley proclaimed on mutt-users that: - * Do you have some other folder-hooks in your muttrc? IMHO *all* - matching ones are executed. E.g. a folder-hook . unmy_hdr reply-to - later in the muttrc will abandon your Reply-to-address. One (perhaps stupid) question - have you _defined_ mailboxes first, before applying folder hooks? Try something like ... subscribe linux subscribe spam-l subscribe mutt # Set options for the various mailing lists I'm on # The mailboxes that I should check mailboxes $MAIL =spam-l =linux =mutt =juno-post save-hook '~f spam-l' =spam-l save-hook '~f linux-india' =linux save-hook '~f mutt-' =mutt # Sort our mailboxes by date set sort_browser=date folder-hook spam-l 'set attribution="Talking to spam-l, thus spake %n: "' folder-hook linux 'set attribution="%n spewed into the LI bitstream: "' folder-hook mutt 'set attribution="%n proclaimed to mutt-users that: "' and then add your folder-hook . 'blah blah' As you can see from the attribution below, it works for me :) hth -s -- Suresh Ramasubramanian | sureshr at staff.juno.com Economists can certainly disappoint you. One said that the economy would turn up by the last quarter. Well, I'm down to mine and it hasn't. -- Robert Orben
Re: Folder Hooks
On Wed, May 17, 2000 at 07:39:38AM -0600, Charles Curley wrote: [Problem with folder-hook] Thanks, Frank, but no joy on any of these. I even commented out my "folder-hook . ..." defaults, which are above the ondes I showed above. Perhaps you post your muttrc and we can look. I can prove that the folder-hook mechanism is working in 1.2i ... Frank
Re: Folder Hooks
Charles Curley [EMAIL PROTECTED] wrote on Wed, 17 May 2000: This may be a problem. I would like to use both send-hooks and folder hooks. I will explore further. Mutt 1.2 has a new feature command "clear-hooks". It should be possible to clear all your send-hooks when entering a folder and set them selectively, and also to have a different default send-hook for each folder. It may get a bit complex but theoretically it should be doable. :-) (Picture this: a defalt folder-hook that sets a default send-hook, and some other send-hooks, and then some other folder-hooks that set some other kind of default send-hook, as well as other send-hooks... May require some care to get that working right. g) This would be easier if there was a folder-matching operator that could be used in send-hooks, but there isn't, so you have to make do with what you've got. Mikko -- // Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/ // The Corrs list maintainer // net.freak // DALnet IRC operator / // Interests: roleplaying, Linux, the Net, fantasy scifi, the Corrs / Entropy isn't what it used to be.
Re: Folder Hooks
On Wed, May 17, 2000 at 06:27:03PM +0300, Mikko Hänninen muttered: - Charles Curley [EMAIL PROTECTED] wrote on Tue, 16 May 2000: - I am testing by going into the appropriate folder, then starting a new - email with "m". If I provide the appropriate address for the send hook, it - works. If I provide a different address, the defaults are invoked. This is - true even when I comment out my send hooks. - - I still think it might be because the send-hooks are overriding the - settings in the folder-hook(s). The send-hook stuff is executed every - time you beging a new email, so if you have a default send-hook (very - likely) that gets executed every time. If it sets any of the same - things that you set with a folder-hook when entering that folder, those - settings will be overridden. This turns out to be correct. I carefully commented out only the default send hooks, and then use an email address that would not trigger any of the custom ones. I got my folder hook to work. Either I previously observed my tests incorrectly (quite possible after many interations), or something else prevented the folder hooks from working. Previously I did comment out all of my send hooks, not just the default ones, and restarted mutt. This may be a problem. I would like to use both send-hooks and folder hooks. I will explore further. - - You say that this happens even when you comment out the send-hooks, but - did you *restart* Mutt after that? Even if you comment the lines out - from your .muttrc and do ":source .muttrc" then send-hooks will remain, - you need to restart Mutt to do a full reset. - (Or, I suppose you could use the clear-hooks command to clear all - send-hooks, but restart is a sure way...) I have been restarting mutt. - - - Regards, - Mikko - -- - // Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/ - // The Corrs list maintainer // net.freak // DALnet IRC operator / - // Interests: roleplaying, Linux, the Net, fantasy scifi, the Corrs / - "The last good thing written in C was Franz Schubert's Symphony #9." Not the Concerto for Line Printer and Orchestra, by Franz List? -- -- C^2 No windows were crashed in the making of this email. Looking for fine software and/or web pages? http://w3.trib.com/~ccurley
Folder Hooks
OK: I have some send hooks working. When I try to do analogous things with folder hooks, those fail. For example: folder-hook =wyo_lp 'set signature=~/.signatures/conan_the_anarchist.txt' folder-hook =wyo_lp 'my_hdr Reply-To: [EMAIL PROTECTED]' does not seem to work, where send-hook '~C [EMAIL PROTECTED]' "set signature=~/.signatures/conan_the_anarchist.txt; \ my_hdr Reply-To: [EMAIL PROTECTED]" does work correctly. The case is correct in the folder name. I am testing by going into the appropriate folder, then starting a new email with "m". If I provide the appropriate address for the send hook, it works. If I provide a different address, the defaults are invoked. This is true even when I comment out my send hooks. -- -- C^2 No windows were crashed in the making of this email. Looking for fine software and/or web pages? http://w3.trib.com/~ccurley
Re: Folder Hooks
On Tue, May 16, 2000 at 07:57:00PM -0600, Charles Curley wrote: OK: I have some send hooks working. When I try to do analogous things with folder hooks, those fail. For example: folder-hook =wyo_lp 'set signature=~/.signatures/conan_the_anarchist.txt' folder-hook =wyo_lp 'my_hdr Reply-To: [EMAIL PROTECTED]' does not seem to work, where I am testing by going into the appropriate folder, then starting a new email with "m". Some ideas: * Do you have some other folder-hooks in your muttrc? IMHO *all* matching ones are executed. E.g. a folder-hook . unmy_hdr reply-to later in the muttrc will abandon your Reply-to-address. *Is the = directory properly set at that time? (muttrc is read from top to bottom...) * Try removing the '' ticks in the 2nd one. HTH Frank
folder hooks and sendmailendmail
Hi, I can't seem to get mutt to use different sendmail settings for different folders: folder-hook "!" set sendmail="/usr/sbin/sendmail [EMAIL PROTECTED]" just makes mutt beep when switching to that folder... I thought that ANY configuration setting could be made from a folder hook? Thanks, Raymond -- Raymond A. Meijer True Bit BV
Re: folder hooks and sendmailendmail
On Wed, Feb 09, 2000 at 11:03:11AM +0100, Raymond A. Meijer wrote: I can't seem to get mutt to use different sendmail settings for different folders: folder-hook "!" set sendmail="/usr/sbin/sendmail [EMAIL PROTECTED]" ---end quoted text--- I use folder-hook FOLDERNAME 'set sendmail="SENDMAILCOMMAND "' ^ ^ and it works fine ! HTH Frank
Re: folder hooks and sendmail
On Wed, 09 Feb 2000, 13:55, Frank Derichsweiler wrote: (sorry about that Subject header :) folder-hook "!" set sendmail="/usr/sbin/sendmail [EMAIL PROTECTED]" I use folder-hook FOLDERNAME 'set sendmail="SENDMAILCOMMAND "' ^ ^ and it works fine ! ...and it works fine here as well!! Thanks a million! Raymond -- Raymond A. Meijer True Bit BV
Re: folder-hooks, (un)ignore, and From_
On Thu, Jan 20, 2000 at 01:06:13PM +0200, Mikko Hänninen wrote: Greg Matheson [EMAIL PROTECTED] wrote on Thu, 20 Jan 2000: I'm having a problem with folder hooks in which I have (un)ignore commands for From_ headers. I remember reading somewhere that you can't (re-)ignore a header which you have unignored. That was the problem, but upgrading to 1.0.1, that problem has gone away. -- Greg MathesonThink globally Chinmin College, Taiwan Act locally [EMAIL PROTECTED] Think one thing, do another
Re: folder-hooks, (un)ignore, and From_
On Thu, Jan 20, 2000 at 15:01:56 +0100, Byrial Jensen wrote: Except "unignore *" that just removes "*" from the ignore list if it is there, and else does nothing -- it doesn't remove all tokens from the ignore list as the manual says. Ups, in fact it does. And "ignore *" removes all tokens from the unignore list. Sorry for the confusion. -- Byrial
folder-hooks, (un)ignore, and From_
I'm having a problem with folder hooks in which I have (un)ignore commands for From_ headers. After unignoring the From_ header in one mailbox, I can't ignore it in others. The reason I want to see the From_ line is that I am using mutt to read my procmail log. This file has for each delivered email an entry showing the `From ' and `Subject:' fields of the header and some other stuff. I wrote for .procmail/log: folder-hook procmail/log'unignore "from "' And this works. But because this is not turned off when you change to another mailbox, there has to be a default folder-hook . 'ignore "from "' And this works placed ahead of the other folder-hook in my .muttrc when I first enter mutt. The problem is after I have changed to .procmail/log, and then to another mailbox, it doesn't work. I get both From_ and From: lines. The ignore lines in my .muttrc: # default list of header fields to weed when displaying # ignore "from " received content- mime-version status x-status message-id ignore sender references return-path lines x-mailer priority precedence ignore x-sender reply-to mail-followup-to in-reply-to comments #my list ignore x- date user-agent organi cc delivered-to approved-by ignore resent- list- importance newsgroups errors-to followup-to ignore supersedes -- Greg MathesonDoing things right is Chinmin College, Taiwan doing the right thing. [EMAIL PROTECTED] Doing things wrong is education.
Re: folder-hooks, (un)ignore, and From_
Greg Matheson [EMAIL PROTECTED] wrote on Thu, 20 Jan 2000: I'm having a problem with folder hooks in which I have (un)ignore commands for From_ headers. After unignoring the From_ header in one mailbox, I can't ignore it in others. I remember reading somewhere that you can't (re-)ignore a header which you have unignored. I'm not positive if that's so, but if yes, then this is probably the source of your problem. Mikko -- // Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/ // The Corrs list maintainer // net.freak // DALnet IRC operator / // Interests: roleplaying, Linux, the Net, fantasy scifi, the Corrs / Any sufficiently advanced magic is indistinguishable from technology.
Re: folder-hooks, (un)ignore, and From_
On Thu, Jan 20, 2000 at 17:50:03 +0800, Greg Matheson wrote: X-Mailer: Mutt 0.95.7us It might help to upgrade to Mutt 1.0.1. There have been some fixes to ignore/unignore which make them work better. However don't trust the manual about this topic. Header weeding functions this way: Mutt stores internally two lists: the ignore list and the unignore list. A header is ignored if and only if it matches the ignore list and doesn't match the unignore list. So if you have these commands: ignore x- unignore x-mailer you will see x-mailer headers because it matches the unignore list. The manual says otherwise but is wrong. The ignore command adds its arguments to the ignore list and removes them from the unignore list if they are there. The unignore command adds its arguments to the unignore list and removes them from the ignore list if they are there. Except "unignore *" that just removes "*" from the ignore list if it is there, and else does nothing -- it doesn't remove all tokens from the ignore list as the manual says. -- Byrial
FAQ/Web site maintance (Was: using $index_format in folder-hooks)
On Sat, Apr 10, 1999 at 01:58:04PM +0200, Stefan `Sec` Zehl wrote: P.S.: this is becoming an faq, do we have an active faq maintainer ? Which brings up the question of what happened to the expected web site enhancements ?? (www.mutt.org is still listing 0.95.1) -- Later ... Rich Roth --- On-the-Net Direct: Box 927, Northampton, MA 01061, Voice: 413-586-9668 Email: [EMAIL PROTECTED] Url: http://www.on-the-net.com ~~~ www.i-depth.com lets you Add Instant Depth to your Website~~~ ~~~ Adding depths to Web presences and Internet providers ~
Re: using $index_format in folder-hooks
++ 10.04.1999, 16:22:14 (+0800) = [EMAIL PROTECTED]: But I don't like the other one, which is showing the list name in the index menu display. For example in my mua folder, I'm only getting mail from mutt-users, so I'm losing authors' names and jsut being told the mail is coming from mutt-users, which I already know. [...] folder-hook muaset index_format="%3C %Z %{%b %d} %-15.15F (%3l) %s" I have this in my .muttrc (snipped away some of the listnames): folder-hook (mutt-users|other_list) 'set index_format="%4C %Z %{%b %d} %-15.15a (%4l) %s"' So i think your problem is in the quotes. As a result of that Mutt interprets the commands for the folder-hook incorrect. I suggest you try it with line you have, but with some more quotes, like mine. I have noticed this is more or less a FAQ. I have seen several others (including myself) with the same kind of problems. -Rejo. -- = Rejo [Sister Ray Crisiscentrum] [EMAIL PROTECTED] = http://mediaport.org/~sister PGP: DSS B20D35F8, RSA FAE40065 -- = Please do not carbon me on list replies. I'll get my copy from the list.
Re: using $index_format in folder-hooks
On Sat, Apr 10, 1999 at 04:22:14PM +0800, [EMAIL PROTECTED] wrote: folder-hook . set index_format="%4C %Z %{%b %d} %-15.15L (%4l) %s" folder-hook mua set index_format="%3C %Z %{%b %d} %-15.15F (%3l) %s" folder-hook sla set index_format="%4C %Z %{%b %d} %-15.15F (%4l) %s" You can't set index_format in a folder-hook? You can, but you should add proper quoting: folder-hook . 'set index_format="%4C %Z %{%b %d} %-15.15L (%4l) %s"' folder-hook mua 'set index_format="%3C %Z %{%b %d} %-15.15F (%3l) %s"' folder-hook sla 'set index_format="%4C %Z %{%b %d} %-15.15F (%4l) %s"' CU, Sec P.S.: this is becoming an faq, do we have an active faq maintainer ? -- Treat your password like your toothbrush. Don't let anybody else use it, and get a new one every six months. --Clifford Stoll
alternate personal address and buggy folder hooks
Hi, Here's something I ran into today that I thought would be nice to have in Mutt. The ability to specify alternate addresses for myself, so when I have something like: my_hdr From: Me [EMAIL PROTECTED] (unfortunately that is probably a real address). When I look at a folder of stored outbound messages I only see "Me" in the name field, instead of the names of the people I really sent the messages to. If there was some way to specify an alternate address for myself, then I could see the names of the people to whom I sent the messages. Is there a way to do that now? That I just didn't see in the documentation? Also here's another buglette, notice my name in the message "Elad the Etarip", it shouldn't say that, it should just say "Dale Harris" for the mutt-* folders. It appears that Mutt doesn't forget folder-hook's, once they've been used, but keeps using them for each folder I access after that, in other words the folder-hooks appear to be sticky, when they shouldn't be. -- ~ Dale Harris [EMAIL PROTECTED] http://www.ecst.csuchico.edu/~rodmur/ GPG-Fingerprint: 8849 BC4F 3DF0 F0A8 3355 E94C 537C 3E1D EEE5 2AB2 |+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|
Re: alternate personal address and buggy folder hooks
On Mon, Apr 05, 1999 at 09:08:11PM -0700, Elad the Etarip wrote: It appears that Mutt doesn't forget folder-hook's, once they've been used, but keeps using them for each folder I access after that, in other words the folder-hooks appear to be sticky, when they shouldn't be. No. folder-hooks are intended to be 'sticky'. Instead you should use a construct like the following: folder-hook . unmy_hdr From: folder-hook mutt-users my_hdr From: [EMAIL PROTECTED] folder-hook mutt-devmy_hdr From: sec+mutt-dev folder-hook pilot-unix my_hdr From: [EMAIL PROTECTED] i.e. use a catch-all statement on top to reset your header. CU, Sec -- YKYBRASRTLW this beauty of an acronym parses the first time. Naaah, YKYBRTTSWYKYBAEWTLWTLW that happens. -- Bradley Dave in ASR
Re: Using folder-hooks for mail archive
On Thu, Feb 18, 1999 at 04:52:22PM -0500, Douglas L. Potts wrote: I seem to remember a discussion a while back where someone was able to use folder-hooks to say--gunzip a Mail folder. That way the messages are in zipped/archived type format until the folder is entered. If this sounds familiar or if someone is currently doing this, I would appreciate any help in setting this up. Take a look at http://www.rhein.de/~roland/mutt/ -- (T.) Michael Sandersinternet: [EMAIL PROTECTED] Physics Department URL: http://www-personal.umich.edu/~sanders University of Michigan phone: 734/936-0799 Ann Arbor, MI 48109-1120FAX: 734/764-6843