Re: folder-hook for sending to lists
On Wed, Feb 05, 2014 at 04:23:31PM +1300, Chris Bannister wrote: On Mon, Feb 03, 2014 at 11:03:36AM -0500, glphvgacs wrote: and so i get: To: mutt-users@mutt.org, ycm-us...@googlegroups.com i don't know if there is a way to un-hook a hook when one leaves a folder, or rather when a pattern for a hook stops to evaluate TRUE. another guess, this might have something to do with the fact that there is no List-id: in mutt-users's headers (wonder why?) I have an idea that it uses the List-Post: tag. true, but why? i mean can i set list-reply to look for List-Post in the header then?
Re: folder-hook for sending to lists
On Fri, Feb 07, 2014 at 05:08:17PM -0500, glphvgacs wrote: On Wed, Feb 05, 2014 at 04:23:31PM +1300, Chris Bannister wrote: On Mon, Feb 03, 2014 at 11:03:36AM -0500, glphvgacs wrote: and so i get: To: mutt-users@mutt.org, ycm-us...@googlegroups.com i don't know if there is a way to un-hook a hook when one leaves a folder, or rather when a pattern for a hook stops to evaluate TRUE. another guess, this might have something to do with the fact that there is no List-id: in mutt-users's headers (wonder why?) I have an idea that it uses the List-Post: tag. true, but why? i mean can i set list-reply to look for List-Post in the header then? Not sure what you mean here. I was meaning that if the List-id: tag is there but the List-Post: tag is missing then list-reply doesn't work. This is from memory, I don't know what the current situation is. -- If you're not careful, the newspapers will have you hating the people who are being oppressed, and loving the people who are doing the oppressing. --- Malcolm X
Re: folder-hook for sending to lists
On Mon, Feb 03, 2014 at 11:03:36AM -0500, glphvgacs wrote: and so i get: To: mutt-users@mutt.org, ycm-us...@googlegroups.com i don't know if there is a way to un-hook a hook when one leaves a folder, or rather when a pattern for a hook stops to evaluate TRUE. another guess, this might have something to do with the fact that there is no List-id: in mutt-users's headers (wonder why?) I have an idea that it uses the List-Post: tag. -- If you're not careful, the newspapers will have you hating the people who are being oppressed, and loving the people who are doing the oppressing. --- Malcolm X
Re: folder-hook for sending to lists
On Sun, Feb 02, 2014 at 07:37:49PM -0600, David J. Weller-Fahy wrote: * glphvgacs darwinsker...@gmail.com [2014-02-02 18:25 -0600]: and this to hooks: folder-hook to:mutt-users@mutt.org '\ set autoedit=yes my_hdr To:' folder-hook to:mutt-users@mutt.org '\ my_hdr To:mutt-users@mutt.org' By the way, you may want to check your hooks thoroughly, as a second address seems to have crept into your response. The second address includes a trailing single quote ('). The To: header I received from you via the mailing list is below. #v+ To: mutt-users@mutt.org, mutt-users@mutt.org' #v- appended address, i think, has to do with the order of folder's in my sidebar. so this is a snippet of my config: drw [ -- ] notmuch://?query=folder:drw AND tag:unread NOT from:darwinsker...@gmail.com \ [ --] notmuch://?query=from:darwinsker...@gmail.comlimit=512 \ [ -- ] notmuch://?query=folder:drw AND from:darwinsker...@gmail.com AND to:darwinsker...@gmail.com \ [ ..] notmuch://?query=folder:drw \ list [ ycm ] notmuch://?query=tag:ycm-users \ [ vim ] notmuch://?query=tag:vim_use \ [ zsh ] notmuch://?query=tag:zsh-users \ [ mutt ] notmuch://?query=to:mutt-users@mutt.org \ 'folder:' is for filesystem directories here; in particular there is path: .maildir/gmail/drw if i go to this very thread in [ -- ], _after_ i've gone over [ ycm ] and do list-reply from there guess what happens: folder-hook tag:ycm-users set autoedit=yes; my_hdr To:ycm-us...@googlegroups.com and so i get: To: mutt-users@mutt.org, ycm-us...@googlegroups.com i don't know if there is a way to un-hook a hook when one leaves a folder, or rather when a pattern for a hook stops to evaluate TRUE. another guess, this might have something to do with the fact that there is no List-id: in mutt-users's headers (wonder why?) This may or may not be related to the trailing space I noticed in your hooks (the trailing space i on the first line of the second folder-hook in the quoted content above). Regards, -- dave [ please don't CC me ] (') has to do with me not ever knowing how to wrap a *-hook line. brackets would be nice; something like: foo-hook (pattern) { set bar = baz } shouldn't harm anyone and help with clarity, imho. (hmm, i will check the man after i send this, it might be implemented and then i'm in trouble:) )
Re: folder-hook for sending to lists
On Mon, Feb 03, 2014 at 11:03:36AM -0500, glphvgacs wrote: On Sun, Feb 02, 2014 at 07:37:49PM -0600, David J. Weller-Fahy wrote: * glphvgacs darwinsker...@gmail.com [2014-02-02 18:25 -0600]: and this to hooks: folder-hook to:mutt-users@mutt.org '\ set autoedit=yes my_hdr To:' folder-hook to:mutt-users@mutt.org '\ my_hdr To:mutt-users@mutt.org' By the way, you may want to check your hooks thoroughly, as a second address seems to have crept into your response. The second address includes a trailing single quote ('). The To: header I received from you via the mailing list is below. #v+ To: mutt-users@mutt.org, mutt-users@mutt.org' #v- appended address, i think, has to do with the order of folder's in my sidebar. so this is a snippet of my config: drw [ -- ] notmuch://?query=folder:drw AND tag:unread NOT from:darwinsker...@gmail.com \ [ --] notmuch://?query=from:darwinsker...@gmail.comlimit=512 \ [ -- ] notmuch://?query=folder:drw AND from:darwinsker...@gmail.com AND to:darwinsker...@gmail.com \ [ ..] notmuch://?query=folder:drw \ list [ ycm ] notmuch://?query=tag:ycm-users \ [ vim ] notmuch://?query=tag:vim_use \ [ zsh ] notmuch://?query=tag:zsh-users \ [ mutt ] notmuch://?query=to:mutt-users@mutt.org \ 'folder:' is for filesystem directories here; in particular there is path: .maildir/gmail/drw if i go to this very thread in [ -- ], _after_ i've gone over [ ycm ] and bad idea, to to re-send? maybe, list-reply from [ mutt ], which is what i'm dong now, is actually better, since my previous commnets get quoted, which is nice. do list-reply from there guess what happens: folder-hook tag:ycm-users set autoedit=yes; my_hdr To:ycm-us...@googlegroups.com and so i get: To: mutt-users@mutt.org, ycm-us...@googlegroups.com i don't know if there is a way to un-hook a hook when one leaves a folder, or rather when a pattern for a hook stops to evaluate TRUE. another guess, this might have something to do with the fact that there is no List-id: in mutt-users's headers (wonder why?) This may or may not be related to the trailing space I noticed in your hooks (the trailing space i on the first line of the second folder-hook in the quoted content above). Regards, -- dave [ please don't CC me ] (') has to do with me not ever knowing how to wrap a *-hook line. brackets would be nice; something like: foo-hook (pattern) { set bar = baz } shouldn't harm anyone and help with clarity, imho. (hmm, i will check the man after i send this, it might be implemented and then i'm in trouble:) ) alright, i saw the unhook, let me think if and how i can use it here.
Re: folder-hook for sending to lists
On Mon, Feb 03, 2014 at 11:16:50AM -0500, glphvgacs wrote: On Mon, Feb 03, 2014 at 11:09:42AM -0500, glphvgacs wrote: alright, i saw the unhook, let me think if and how i can use it here. cann't unhook from within a hook : folder-hook . unhook * this has no effect, or not the effect i want it to have: unhook * this is how i changes folders: macro index J sidebar-nextsidebar-open macro index K sidebar-prevsidebar-open macro index tab sidebar-nextsidebar-open macro index backtab sidebar-prevsidebar-open but don't know if unhook has an equivalent function that can be called at the end of a those macros.
Re: folder-hook for sending to lists
On Mon, Feb 03, 2014 at 11:09:42AM -0500, glphvgacs wrote: alright, i saw the unhook, let me think if and how i can use it here. cann't unhook from within a hook : folder-hook . unhook * this has no effect, or not the effect i want it to have: unhook *
Re: folder-hook for sending to lists
On 2014-02-03, glphvgacs wrote: On Mon, Feb 03, 2014 at 11:09:42AM -0500, glphvgacs wrote: alright, i saw the unhook, let me think if and how i can use it here. cann't unhook from within a hook : folder-hook . unhook * this has no effect, or not the effect i want it to have: unhook * Sure you can. At least you can unhook specific hook types and I see no reason that you couldn't unhook all hooks, although that might kill the execution of other folder-hooks until they are redefined. As an example from my muttrc: folder-hook . 'unhook message-hook' Regards, Gary
Re: folder-hook for sending to lists
On Mon, Feb 03, 2014 at 10:40:24AM -0800, Gary Johnson wrote: On 2014-02-03, glphvgacs wrote: On Mon, Feb 03, 2014 at 11:09:42AM -0500, glphvgacs wrote: alright, i saw the unhook, let me think if and how i can use it here. cann't unhook from within a hook : folder-hook . unhook * this has no effect, or not the effect i want it to have: unhook * Sure you can. At least you can unhook specific hook types and I see no reason that you couldn't unhook all hooks, although that might kill the execution of other folder-hooks until they are redefined. As an example from my muttrc: folder-hook . 'unhook message-hook' Regards, Gary true, i don't know what i was doing earlier. it works for both folder-hook and (*). however changing folders now happen in slow-motion. i haven't test the effect either.
Re: folder-hook for sending to lists
On Mon, Feb 03, 2014 at 02:10:13PM -0500, glphvgacs wrote: On Mon, Feb 03, 2014 at 10:40:24AM -0800, Gary Johnson wrote: On 2014-02-03, glphvgacs wrote: On Mon, Feb 03, 2014 at 11:09:42AM -0500, glphvgacs wrote: alright, i saw the unhook, let me think if and how i can use it here. cann't unhook from within a hook : folder-hook . unhook * this has no effect, or not the effect i want it to have: unhook * Sure you can. At least you can unhook specific hook types and I see no reason that you couldn't unhook all hooks, although that might kill the execution of other folder-hooks until they are redefined. As an example from my muttrc: folder-hook . 'unhook message-hook' Regards, Gary true, i don't know what i was doing earlier. it works for both folder-hook and (*). however changing folders now happen in slow-motion. i haven't test the effect either. it works, but the performance is not practical. mutt struggles to change folder. note that all my maildir's are on local fs not to mention the use of notmuch.
folder-hook for sending to lists
when starting the Mail composition in mutt, is there a way skip the 'To:' header by filling it up based on a given pattern? i don't think a folder-hook would do this since i don't think there is such a thing as 'set to = ' in configuration file (correct me if i'm wrong please). so perhaps a macro?
Re: folder-hook for sending to lists
On Sun, Feb 02, 2014 at 02:24:19PM -0500, Patrick Shanahan wrote: * glphvgacs darwinsker...@gmail.com [02-02-14 14:06]: when starting the Mail composition in mutt, is there a way skip the 'To:' header by filling it up based on a given pattern? i don't think a folder-hook would do this since i don't think there is such a thing as 'set to = ' in configuration file (correct me if i'm wrong please). so perhaps a macro? check the subscribed section of your example .muttrc or the mutt docs. i was just reading that and actually just added that to muttrc. here is the thing though, it just adds the 'L' to the threads/msgs that belong to the list. i doesn't _skip_ the 'To:' part of mail composition. i mean i don't see how ``subscribe'' is relevant here.
Re: folder-hook for sending to lists
On Sun, Feb 02, 2014 at 02:24:19PM -0500, Patrick Shanahan wrote: * glphvgacs darwinsker...@gmail.com [02-02-14 14:06]: when starting the Mail composition in mutt, is there a way skip the 'To:' header by filling it up based on a given pattern? i don't think a folder-hook would do this since i don't think there is such a thing as 'set to = ' in configuration file (correct me if i'm wrong please). so perhaps a macro? maybe i can use my_hdr
Re: folder-hook for sending to lists
* glphvgacs darwinsker...@gmail.com [02-02-14 14:38]: On Sun, Feb 02, 2014 at 02:24:19PM -0500, Patrick Shanahan wrote: * glphvgacs darwinsker...@gmail.com [02-02-14 14:06]: when starting the Mail composition in mutt, is there a way skip the 'To:' header by filling it up based on a given pattern? i don't think a folder-hook would do this since i don't think there is such a thing as 'set to = ' in configuration file (correct me if i'm wrong please). so perhaps a macro? check the subscribed section of your example .muttrc or the mutt docs. i was just reading that and actually just added that to muttrc. here is the thing though, it just adds the 'L' to the threads/msgs that belong to the list. i doesn't _skip_ the 'To:' part of mail composition. i mean i don't see how ``subscribe'' is relevant here. There is more the the very good man pages of mutt. How are you trying to reply to list? Are you using the L key as described in the fine manual? -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535@ http://linuxcounter.net
Re: folder-hook for sending to lists
starting a thread is the problem. to reply to a mailing list, list-reply works just fine. but when one wants to start a thread, that's when you need to skip the 'To:'
Re: folder-hook for sending to lists
On Sun, Feb 02, 2014 at 02:44:58PM -0500, Patrick Shanahan wrote: How are you trying to reply to list? Are you using the L key as described in the fine manual? yes. i'm not talking about _reply_, i'm talking about starting a thread.
Re: folder-hook for sending to lists
* glphvgacs darwinsker...@gmail.com [02-02-14 14:54]: starting a thread is the problem. to reply to a mailing list, list-reply works just fine. but when one wants to start a thread, that's when you need to skip the 'To:' Then list-reply to an existing thread, and remove the In-Reply-To: header and adjust the Subject:. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535@ http://linuxcounter.net
Re: folder-hook for sending to lists
++ 02/02/14 14:05 -0500 - glphvgacs: when starting the Mail composition in mutt, is there a way skip the 'To:' header by filling it up based on a given pattern? i don't think a folder-hook would do this since i don't think there is such a thing as 'set to = ' in configuration file (correct me if i'm wrong please). so perhaps a macro? Untested, probably something like the following will work: unmy_hdr To: -- Rejo Zenger . r...@zenger.nl . 0x21DBEFD4 . https://rejo.zenger.nl GPG encrypted e-mail preferred . +31.6.39642738 . @rejozenger pgp8ofTavLqC2.pgp Description: PGP signature
Re: folder-hook for sending to lists
On Sun, Feb 02, 2014 at 03:01:41PM -0500, Patrick Shanahan wrote: * glphvgacs darwinsker...@gmail.com [02-02-14 14:54]: starting a thread is the problem. to reply to a mailing list, list-reply works just fine. but when one wants to start a thread, that's when you need to skip the 'To:' Then list-reply to an existing thread, and remove the In-Reply-To: header and adjust the Subject:. that's your solution? never mind.
Re: folder-hook for sending to lists
On Sun, Feb 02, 2014 at 02:57:13PM -0500, Patrick Shanahan wrote: * glphvgacs darwinsker...@gmail.com [02-02-14 14:46]: On Sun, Feb 02, 2014 at 02:24:19PM -0500, Patrick Shanahan wrote: * glphvgacs darwinsker...@gmail.com [02-02-14 14:06]: when starting the Mail composition in mutt, is there a way skip the 'To:' header by filling it up based on a given pattern? i don't think a folder-hook would do this since i don't think there is such a thing as 'set to = ' in configuration file (correct me if i'm wrong please). so perhaps a macro? maybe i can use my_hdr why? Didn't you ask about mail-lists? From the fine manual, subscribed tells mutt about the mailing lists you are subscribed to and allows mutt to assign a to and from address for *that* list. You also need to set up aliases and, perhaps, send-hooks, for the subscribed lists. where doesn't it say assing a to and from?
Re: folder-hook for sending to lists
On Sun, Feb 02, 2014 at 09:00:56PM +0100, Rejo Zenger wrote: ++ 02/02/14 14:05 -0500 - glphvgacs: when starting the Mail composition in mutt, is there a way skip the 'To:' header by filling it up based on a given pattern? i don't think a folder-hook would do this since i don't think there is such a thing as 'set to = ' in configuration file (correct me if i'm wrong please). so perhaps a macro? Untested, probably something like the following will work: unmy_hdr To: my_hdr To: works, almost. folder-hook to:mutt-users@mutt.org '\ my_hdr To:mutt-users@mutt.org' it fills up the To: header but it's missing '\n' to go to Subject: i tried this but didn't work: my_hdr To:mutt-users@mutt.org\n' is there a way to add the '\n' there?
Re: folder-hook for sending to lists
On Sun, Feb 02, 2014 at 02:57:13PM -0500, Patrick Shanahan wrote: * glphvgacs darwinsker...@gmail.com [02-02-14 14:46]: On Sun, Feb 02, 2014 at 02:24:19PM -0500, Patrick Shanahan wrote: * glphvgacs darwinsker...@gmail.com [02-02-14 14:06]: when starting the Mail composition in mutt, is there a way skip the 'To:' header by filling it up based on a given pattern? i don't think a folder-hook would do this since i don't think there is such a thing as 'set to = ' in configuration file (correct me if i'm wrong please). so perhaps a macro? maybe i can use my_hdr why? folder-hook to:mutt-users@mutt.org '\ my_hdr To:mutt-users@mutt.org' that's why. in fact passing an '\n' at the end would be nice too.
Re: folder-hook for sending to lists
* glphvgacs darwinsker...@gmail.com [2014-02-02 14:28 -0600]: ++ 02/02/14 14:05 -0500 - glphvgacs: when starting the Mail composition in mutt, is there a way skip the 'To:' header by filling it up based on a given pattern? is there a way to add the '\n' there? I didn't find a way to add the '\n', instead I looked for another way to skip that prompt entirely. For each mailing list you want to use in this way, do the following. #v+ folder-hook . unset autoedit; set edit_headers=yes folder-hook '=lists\.mutt-users'set autoedit=yes; set edit_headers=yes folder-hook . unmy_hdr To: folder-hook '=lists\.mutt-users'my_hdr To: mutt-users@mutt.org #v- Note that both set autoedit=yes and set edit_headers=yes together are what gets you to the message without setting the recipient first. Also note that the folder-hook to execute in all other folders is based on my defaults, change to suit. Also, also note that the folder name is based on my folder layout, not yours, so that'll have to change. See section 3.18. autoedit in TFM. Regards, -- dave [ please don't CC me ] pgp4rUExapHvG.pgp Description: PGP signature
Re: folder-hook for sending to lists
On 2014-02-02, glphvgacs wrote: when starting the Mail composition in mutt, is there a way skip the 'To:' header by filling it up based on a given pattern? i don't think a folder-hook would do this since i don't think there is such a thing as 'set to = ' in configuration file (correct me if i'm wrong please). so perhaps a macro? Yes. Here is what I do. I have a separate folder for each list to which I'm subscribed and a folder-hook for each of those lists. I also use aliases to expand the list name to the full address of the list. Here are the hook and alias I use for mutt-users: folder-hook +Incoming/mutt-users\ 'macro index M mailmutt-users^M^M mail to list' alias mutt-usersmutt-users@mutt.org Note that the ^M is an ASCII carat followed by an ASCII upper-case M. With that, I type M to send a new message to the list and the first prompt I see is for the Subject. Regards, Gary
Re: folder-hook for sending to lists
On Sun, Feb 02, 2014 at 05:45:54PM -0600, David J. Weller-Fahy wrote: * glphvgacs darwinsker...@gmail.com [2014-02-02 14:28 -0600]: ++ 02/02/14 14:05 -0500 - glphvgacs: when starting the Mail composition in mutt, is there a way skip the 'To:' header by filling it up based on a given pattern? is there a way to add the '\n' there? I didn't find a way to add the '\n', instead I looked for another way to skip that prompt entirely. For each mailing list you want to use in this way, do the following. #v+ folder-hook . unset autoedit; set edit_headers=yes folder-hook '=lists\.mutt-users' set autoedit=yes; set edit_headers=yes folder-hook . unmy_hdr To: folder-hook '=lists\.mutt-users' my_hdr To: mutt-users@mutt.org #v- now that is what i'm talking about. great stuff, thanks. Note that both set autoedit=yes and set edit_headers=yes together are what gets you to the message without setting the recipient first. Also note that the folder-hook to execute in all other folders is based on my defaults, change to suit. i already had: set edit_header=yes so i added this to muttrc: unset autoedit and this to hooks: folder-hook to:mutt-users@mutt.org '\ set autoedit=yes my_hdr To:' folder-hook to:mutt-users@mutt.org '\ my_hdr To:mutt-users@mutt.org' Also, also note that the folder name is based on my folder layout, not yours, so that'll have to change. np, i use mutt-kz and folder are actually vfolder and easy grep (Get with rexp) See section 3.18. autoedit in TFM. a 'see also' pointer to that from mailing list section would be nice.
Re: folder-hook for sending to lists
* glphvgacs darwinsker...@gmail.com [2014-02-02 18:25 -0600]: now that is what i'm talking about. great stuff, thanks. You're welcome. and this to hooks: folder-hook to:mutt-users@mutt.org '\ set autoedit=yes my_hdr To:' folder-hook to:mutt-users@mutt.org '\ my_hdr To:mutt-users@mutt.org' FYI, you may be able to merge those into one folder-hook. np, i use mutt-kz and folder are actually vfolder and easy grep (Get with rexp) Ah: I'll have to check that out at some point. See section 3.18. autoedit in TFM. a 'see also' pointer to that from mailing list section would be nice. Hrm... I may have to put together a patch for that... have to gather enough round tuits first. ;) Regards, -- dave [ please don't CC me ] pgpsq1LtfaXZC.pgp Description: PGP signature
Re: folder-hook for sending to lists
* glphvgacs darwinsker...@gmail.com [2014-02-02 18:25 -0600]: and this to hooks: folder-hook to:mutt-users@mutt.org '\ set autoedit=yes my_hdr To:' folder-hook to:mutt-users@mutt.org '\ my_hdr To:mutt-users@mutt.org' By the way, you may want to check your hooks thoroughly, as a second address seems to have crept into your response. The second address includes a trailing single quote ('). The To: header I received from you via the mailing list is below. #v+ To: mutt-users@mutt.org, mutt-users@mutt.org' #v- This may or may not be related to the trailing space I noticed in your hooks (the trailing space i on the first line of the second folder-hook in the quoted content above). Regards, -- dave [ please don't CC me ] pgpX4Q4t4oxJ3.pgp Description: PGP signature