Re: folder regexp with folder-hook when using IMAPS + MAILDIR
On (06/05/13 16:04), Rado Q put forth the proposition: =- David Woodfall wrote on Mon 6.May'13 at 13:04:38 +0100 -= >I have: > >set folder=imaps://blackswan/ >folder-hook bleah "source ~/.mutt/bleah" > > >blackswan being the dovecot server hostname. >.mutt/bleah contains: > >set from="me " >set sendmail="/usr/bin/sendmail" > >The folder-hook isn't working and I've tried every combination of bleah >=bleah/ bleah/ etc that I can think of. Been googling for a while and >still not found out why it's not working. > >Any help greatly appreciated. > >Thanks Strangely my: folder-hook =Sent/ 'set index_format="%3C %Z %[!%d/%m/%y] %-20.20t%s"' works just fine... Why trailing '/'? Perhaps 'bleah' isn't specific enough, give a real example of muttrc config-line (folder-hook) and change-folder path. Put the 'set index_format' into the file, too, does still work then? Maybe conflicting hooks overriding each other. Try DebugConfig on wiki. Thanks. This helped. I found that a send-hook was undoing my folder-hook. D.
Re: Correct .muttrc format for Maildir
On Mon May 06, 2013 02:20PM, Trey Sizemore wrote: > On Mon, May 6, 2013, at 08:53 AM, Trey Sizemore wrote: > > I've been connecting to my fastmail.fm account directly via IMAP for a > > while now with no issues. Recently, I've decided to use offlineimap to > > mirror the content locally to a Maildir directory. > > > > I've been trying to change my .muttrc to reflect the change so that it > > points to the local files. While I'm seeing the mail in each subscribed > > folder, some of the expected behavior is not working ('c' prompting to > > change to the next folder with new messages). > > > > The local mail folders are located in ~/.mail/fastmail/ and look like: > > > > drwx-- 5 trey staff 170 May 5 21:40 .Drafts/ > > drwxr-xr-x 3 trey staff 102 May 5 19:12 .notmuch/ > > drwx-- 5 trey staff 170 May 5 21:38 Drafts/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Apple Mail To Do/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Archive/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.CentOS/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Deleted Messages/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Drafts/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.FreeBSD-Questions/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Junk/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Junk Mail/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.K12OSN/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Queue/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.SLES/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Saved/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Sent/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Sent Items/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Sent Messages/ > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.SuSE/ > > > > Not sure why I have multiple Drafts folders. > > > > In my .muttrc I have this: > > > > set mbox_type=Maildir > > set folder="~/.mail/fastmail/" > > set mask="!^\\.[^.]" > > set mbox="~/.mail/fastmail/" > > set record="+INBOX.Sent Items" > > set postponed="~/.mail/fastmail/INBOX.Drafts" > > set spoolfile="~/.mail/fastmail/INBOX" > > > > I assume that I've formatted the paths wrong above? Hoping someone can > > help. > > > > Related, what should the format of entries for 'mailboxes' be? > > mailboxes INBOX.mutt INBOX.Sent > > > > Thanks! > > > > To update, I put the full path in for both 'set record' and 'set > postponed' (such as "~/.mail/fastmail/INBOX.Sent") and both the remote > Drafts and Send folders get populated as would be expected. > > But I'm still not sure what the format should be for the 'mailboxes' > line in .muttrc. While on IMAP, I can hit 'c' and will be prompted with > the next folder that contains new mail. I had a line when connecting > via IMAP like: > > mailboxes =INBOX.ale =INBOX.mutt > > What should be the syntax for mailboxes entries when pointing to a local > Maildir? > > Thanks. > I found the correct format to be +INBOX.mutt This is on Max OSX Mountain Lion, so I used this entry in .muttrc to populate: mailboxes `find ~/.mail/fastmail -maxdepth 1 -type d -name ".*" -exec \ echo -n "+'{}' " \;` -- Cheers, Trey In answer to the question of why it happened, I offer the modest proposal that our Universe is simply one of those things which happen from time to time. --Edward P. Tryon Darwin tbook-2.local 12.3.0 x86_64 6:53 up 5 days, 20:32, 6 users, load averages: 0.89 1.04 1.07
Re: OT making ascii tables
Hello Christian, Rado, Christian Brabandt wrote on 06.05.13: > > > What you are seeing are ANSI Term sequences, which are usually used to > > > color text in the terminal. It might help to explicitly set the TERM > > > variable to dumb or vt100 or possibly set the -c parameter. You might > > > however need to pipe the input through col -b again. > > > > 'less' has a "raw" mode to let ANSI pass through to the terminal, > > Yes, that is less -r or less -R. But that doesn't hold for other > applications, like Vim (which can at least hides those characters using > the ansi_escape plugin). thank you for your help! I am experimenting with groffs -c -option which is not yet working as I expected. (nroff -c works, but not with utf8). Slowly getting there. greetings jan
Re: Using send and reply hooks to set from address and reverse_name
Hello Patrick and others, First, apologies for the delayed response. On Fri, May 03, 2013 at 08:08:48AM -0400, Patrick Shanahan wrote: > > Try the following: > set reverse_name > add as the very first send-hook: send-hook . "" > comment out or remove subject reply-hooks > > Make sure that all of the required "reverse_name"s are defined in > "alternates" This is what I did: 1. I removed all reply and send-hooks, `set reverse_name' (not reverse_name=yes), and then I set an empty default send-hook as you show above. I also made sure all my addresses are matched with alternates. The above allows me to respond to my own responses in a thread correctly, i.e. my email address from my response is picked as from. However, I cannot respond to mailing list emails delivered to any of these alternate email addresses with the correct email address (I use or ). Responding to messages addressed directly to any of the alternates work well. 2. To solve this, I added send-hooks for mailing lists delivered to my alternates. send-hook "%C work-lists" my_hdr From: wor...@domain.com send-hook "%C foss-lists" my_hdr From: l...@gmail.com Note work-lists and foss-lists are groups with mailing list addresses, and I still have the default empty send-hook. After this change, and works correctly again. But now, I have a problem with composing new messages. The new message has the from address of the last email I started to compose (it does not matter if I aborted the message or sent it). I guess this means the last my_hdr command "persists" through the rest of the session. 3. To solve this problem, I now change the default send-hook to something like this: send-hook . my_hdr From: prim...@gmail.com And of course this last change then breaks $reverse_name, and ; still works because of (2). 4. Now to solve this issue, I re-introduce the old reply-hooks. reply-hook '~h "Delivered-To: +list@gmail\\.com"' my_hdr From: l...@gmail.com reply-hook '~h "Delivered-To: +wor...@domain.com"' my_hdr From: wor...@domain.com This does not work right away because of (3). So I remove (3), set the default send-hook back to empty, as in (1), and introduce a default reply-hook as below: reply-hook . my_hdr From: prim...@gmail.com This fixes reply, but $reverse_name is still broken. As you can see, I'm going around in loops. Is my reasoning correct in all the above steps? Are there better ways to implement any of the intermediate steps? Hopefully I have detailed my steps accurately so that people can give suggestions. Thanks a lot :). Cheers, -- Suvayu Open source is the future. It sets us free.
Re: Using send and reply hooks to set from address and reverse_name
On Tue, May 07, 2013 at 01:58:57PM +0200, Suvayu Ali wrote: > Hello Patrick and others, > > First, apologies for the delayed response. > > On Fri, May 03, 2013 at 08:08:48AM -0400, Patrick Shanahan wrote: > > > > Try the following: > > set reverse_name > > add as the very first send-hook: send-hook . "" > > comment out or remove subject reply-hooks > > > > Make sure that all of the required "reverse_name"s are defined in > > "alternates" > > This is what I did: > > 1. I removed all reply and send-hooks, `set reverse_name' (not >reverse_name=yes), and then I set an empty default send-hook as you >show above. I also made sure all my addresses are matched with >alternates. > >The above allows me to respond to my own responses in a thread >correctly, i.e. my email address from my response is picked as from. > >However, I cannot respond to mailing list emails delivered to any of >these alternate email addresses with the correct email address (I use > or ). Responding to messages addressed directly >to any of the alternates work well. > > 2. To solve this, I added send-hooks for mailing lists delivered to my >alternates. > > send-hook "%C work-lists" my_hdr From: wor...@domain.com > send-hook "%C foss-lists" my_hdr From: l...@gmail.com > >Note work-lists and foss-lists are groups with mailing list >addresses, and I still have the default empty send-hook. > >After this change, and works correctly again. >But now, I have a problem with composing new messages. The new >message has the from address of the last email I started to compose >(it does not matter if I aborted the message or sent it). I guess >this means the last my_hdr command "persists" through the rest of the >session. > > 3. To solve this problem, I now change the default send-hook to >something like this: > > send-hook . my_hdr From: prim...@gmail.com > >And of course this last change then breaks $reverse_name, and >; still works because of (2). > > 4. Now to solve this issue, I re-introduce the old reply-hooks. > > reply-hook '~h "Delivered-To: +list@gmail\\.com"' my_hdr From: > l...@gmail.com > reply-hook '~h "Delivered-To: +wor...@domain.com"' my_hdr From: > wor...@domain.com > >This does not work right away because of (3). So I remove (3), set >the default send-hook back to empty, as in (1), and introduce a >default reply-hook as below: > > reply-hook . my_hdr From: prim...@gmail.com > >This fixes reply, but $reverse_name is still broken. I forgot to mention, this last step reintroduces the problem with composing new messages I mentioned in (2). This stands to reason since I removed the `my_hdr From: ...' command from the default send-hook. -- Suvayu Open source is the future. It sets us free.
Re: Using send and reply hooks to set from address and reverse_name
* Suvayu Ali [05-07-13 08:14]: > On Tue, May 07, 2013 at 01:58:57PM +0200, Suvayu Ali wrote: [...] > > This is what I did: > > > > 1. I removed all reply and send-hooks, `set reverse_name' (not > >reverse_name=yes), and then I set an empty default send-hook as you > >show above. I also made sure all my addresses are matched with > >alternates. > > > >The above allows me to respond to my own responses in a thread > >correctly, i.e. my email address from my response is picked as from. > > > >However, I cannot respond to mailing list emails delivered to any of > >these alternate email addresses with the correct email address (I use > > or ). Responding to messages addressed directly > >to any of the alternates work well. > > > > 2. To solve this, I added send-hooks for mailing lists delivered to my > >alternates. > > > > send-hook "%C work-lists" my_hdr From: wor...@domain.com > > send-hook "%C foss-lists" my_hdr From: l...@gmail.com > > > >Note work-lists and foss-lists are groups with mailing list > >addresses, and I still have the default empty send-hook. > > > >After this change, and works correctly again. > >But now, I have a problem with composing new messages. The new > >message has the from address of the last email I started to compose > >(it does not matter if I aborted the message or sent it). I guess > >this means the last my_hdr command "persists" through the rest of the > >session. > > > > 3. To solve this problem, I now change the default send-hook to > >something like this: > > > > send-hook . my_hdr From: prim...@gmail.com > > > >And of course this last change then breaks $reverse_name, and > >; still works because of (2). > > > > 4. Now to solve this issue, I re-introduce the old reply-hooks. > > > > reply-hook '~h "Delivered-To: +list@gmail\\.com"' my_hdr From: > > l...@gmail.com > > reply-hook '~h "Delivered-To: +wor...@domain.com"' my_hdr From: > > wor...@domain.com > > > >This does not work right away because of (3). So I remove (3), set > >the default send-hook back to empty, as in (1), and introduce a > >default reply-hook as below: > > > > reply-hook . my_hdr From: prim...@gmail.com > > > >This fixes reply, but $reverse_name is still broken. > > I forgot to mention, this last step reintroduces the problem with > composing new messages I mentioned in (2). This stands to reason since > I removed the `my_hdr From: ...' command from the default send-hook. Have a look at "send2-hook" in tfm. -- (paka)Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2 http://en.opensuse.org openSUSE Community Member Registered Linux User #207535@ http://linuxcounter.net
Any way to speed up regexp based coloring in bodies?
Hi, I have this rule in my muttrc: color body color163 default "(http|https|ftp)://" (this is simplified version, I was checking if there are no problems when using more complicated things). And it works fine. But - every now and then I get email that is rather large (64kB), and it contains many urls (~ 900). And in this case - displaying such mail takes long time (6-8 seconds). Strace shows that the time is not spent in any syscall, so I guess it's internal processing. Is there any way to speed up such coloring? Or, perhaps - make color rule work only for messages smaller than x kB ? Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/
Search utilities for use with mutt - I use mairix but it's not perfect
I currently use mairix to search through my mutt mail, it's OK but has a couple of disadvantages:- It's word oriented so one can't search for anything that it doesn't recognise as a word, I'd really prefer REs or something like. It 'finds' the relevant messages by copying them to a new folder, sometimes this is OK but other times I want to know where the original E-Mail is. What other search programs work well with mutt? -- Chris Green
Re: Search utilities for use with mutt - I use mairix but it's not perfect
* Chris Green [05-07-13 09:55]: > I currently use mairix to search through my mutt mail, it's OK but has a > couple of disadvantages:- I use mairix, also > It's word oriented so one can't search for anything that it doesn't > recognise as a word, I'd really prefer REs or something like. REs would be preferable but it does provide "fuzzy" searchs > It 'finds' the relevant messages by copying them to a new folder, > sometimes this is OK but other times I want to know where the > original E-Mail is. Look at the headers, it provides the location of "found" objects. -- (paka)Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2 http://en.opensuse.org openSUSE Community Member Registered Linux User #207535@ http://linuxcounter.net
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On 07.05.13 14:53, Chris Green wrote: > What other search programs work well with mutt? Mutt's own body search does the job for me within a mail folder, and egrep provides full Extended Regular Expressions when searching some set of my 1106 mail folders. Over more than a decade of mutt use, they've always allowed me to find stuff quickly, even when I've no idea where an email ended up. (So I've never had any need to look for anything else.) Neither suffers from the single word restriction, described. Erik -- Remembering is for those who have forgotten. - Chinese proverb
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On Tue, May 07, 2013 at 10:21:49AM -0400, Patrick Shanahan wrote: > * Chris Green [05-07-13 09:55]: > > I currently use mairix to search through my mutt mail, it's OK but has a > > couple of disadvantages:- > > I use mairix, also > > > It's word oriented so one can't search for anything that it doesn't > > recognise as a word, I'd really prefer REs or something like. > > REs would be preferable but it does provide "fuzzy" searchs > Yes, I've used them occasionally, doesn't help with non alpha/number strings though. > > It 'finds' the relevant messages by copying them to a new folder, > > sometimes this is OK but other times I want to know where the > > original E-Mail is. > > Look at the headers, it provides the location of "found" objects. > Oh, I hadn't noticed that, thanks. I need to make that X-source-folder: visible! -- Chris Green
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On Wed, May 08, 2013 at 12:21:58AM +1000, Erik Christiansen wrote: > On 07.05.13 14:53, Chris Green wrote: > > What other search programs work well with mutt? > > Mutt's own body search does the job for me within a mail folder, and > egrep provides full Extended Regular Expressions when searching some set > of my 1106 mail folders. Over more than a decade of mutt use, they've > always allowed me to find stuff quickly, even when I've no idea where an > email ended up. (So I've never had any need to look for anything else.) > > Neither suffers from the single word restriction, described. > Yes, one of the reasons I use mbox rather than maildir is the easier searching, I guess I can make myself a grep script. -- Chris Green
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On Wed, May 08, 2013 at 12:21:58AM +1000, Erik Christiansen wrote: Mutt's own body search does the job for me within a mail folder, and egrep provides full Extended Regular Expressions when searching some set of my 1106 mail folders. What is egrep and how does it work? (OK I guess I could look up the man page.) Biggest question is: Is egrep a vim only thing or can a nano wimp use it too? ;-) -- John
Re: Search utilities for use with mutt - I use mairix but it's not perfect
* John Niendorf [05-07-13 10:37]: [...] > What is egrep and how does it work? (OK I guess I could look up the man page.) > Biggest question is: Is egrep a vim only thing or can a nano wimp use it too? > ;-) Your question will be answered when you do read the man page. -- (paka)Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2 http://en.opensuse.org openSUSE Community Member Registered Linux User #207535@ http://linuxcounter.net
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On 2013-05-07, Chris Green wrote: > On Wed, May 08, 2013 at 12:21:58AM +1000, Erik Christiansen wrote: > > On 07.05.13 14:53, Chris Green wrote: > > > What other search programs work well with mutt? > > > > Mutt's own body search does the job for me within a mail folder, and > > egrep provides full Extended Regular Expressions when searching some set > > of my 1106 mail folders. Over more than a decade of mutt use, they've > > always allowed me to find stuff quickly, even when I've no idea where an > > email ended up. (So I've never had any need to look for anything else.) > > > > Neither suffers from the single word restriction, described. > > > Yes, one of the reasons I use mbox rather than maildir is the easier > searching, I guess I can make myself a grep script. http://grepmail.sourceforge.net/ http://www.barsnick.net/sw/grepm.html Regards, Gary
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On May 07, 2013 at 02:53 PM +0100, Chris Green wrote: What other search programs work well with mutt? I used mairix long ago. I think notmuch [1] and mu [2] are superior. I used to think notmuch had more going for it compared to mu, but I've since settled on mu in the last year or two and have been very happy with it. If you use screen, there is a nice script called muttjump [3] that you can bind to a key combo to find the original message. It's pretty nice. The basic premise is that after you make a folder with your symlinked search results, you can run this script and it will find the original message in the original maildir. Then it will open a new terminal in screen, load mutt, and take you to that maildir and message. As some others have pointed out, I think there a program called grepmail that might be useful. Personally, I have so many messages that running a live search like that would take forever, so I prefer to have my mail pre-indexed by mu. [1]: http://notmuchmail.org [2]: http://www.djcbsoftware.nl/code/mu/ [3]: https://github.com/weisslj/muttjump
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On 07.05.13 15:32, Chris Green wrote: > On Tue, May 07, 2013 at 10:21:49AM -0400, Patrick Shanahan wrote: > > REs would be preferable but it does provide "fuzzy" searchs > > > Yes, I've used them occasionally, doesn't help with non alpha/number > strings though. Maybe I'm missing something, but backslash-escaping allows REs to match non alpha/number characters just fine, I find. The trick is to stick with EREs (egrep, grep -E), because the BREs used by some tools by default require more (and different) escapes. (When you're whacking in a quick regex on the command line, it's handy to be using the same variant as you used last time.) Erik -- Arguing that Java is better than C++ is like arguing that grasshoppers taste better than tree bark. - Thant Tessman
Re: Correct .muttrc format for Maildir - CORRECTED
On Tue May 07, 2013 06:55AM, Trey Sizemore wrote: > On Mon May 06, 2013 02:20PM, Trey Sizemore wrote: > > On Mon, May 6, 2013, at 08:53 AM, Trey Sizemore wrote: > > > I've been connecting to my fastmail.fm account directly via IMAP for a > > > while now with no issues. Recently, I've decided to use offlineimap to > > > mirror the content locally to a Maildir directory. > > > > > > I've been trying to change my .muttrc to reflect the change so that it > > > points to the local files. While I'm seeing the mail in each subscribed > > > folder, some of the expected behavior is not working ('c' prompting to > > > change to the next folder with new messages). > > > > > > The local mail folders are located in ~/.mail/fastmail/ and look like: > > > > > > drwx-- 5 trey staff 170 May 5 21:40 .Drafts/ > > > drwxr-xr-x 3 trey staff 102 May 5 19:12 .notmuch/ > > > drwx-- 5 trey staff 170 May 5 21:38 Drafts/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Apple Mail To Do/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Archive/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.CentOS/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Deleted Messages/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Drafts/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.FreeBSD-Questions/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Junk/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Junk Mail/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.K12OSN/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Queue/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.SLES/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Saved/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Sent/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Sent Items/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.Sent Messages/ > > > drwx-- 5 trey staff 170 May 5 14:28 INBOX.SuSE/ > > > > > > Not sure why I have multiple Drafts folders. > > > > > > In my .muttrc I have this: > > > > > > set mbox_type=Maildir > > > set folder="~/.mail/fastmail/" > > > set mask="!^\\.[^.]" > > > set mbox="~/.mail/fastmail/" > > > set record="+INBOX.Sent Items" > > > set postponed="~/.mail/fastmail/INBOX.Drafts" > > > set spoolfile="~/.mail/fastmail/INBOX" > > > > > > I assume that I've formatted the paths wrong above? Hoping someone can > > > help. > > > > > > Related, what should the format of entries for 'mailboxes' be? > > > mailboxes INBOX.mutt INBOX.Sent > > > > > > Thanks! > > > > > > > To update, I put the full path in for both 'set record' and 'set > > postponed' (such as "~/.mail/fastmail/INBOX.Sent") and both the remote > > Drafts and Send folders get populated as would be expected. > > > > But I'm still not sure what the format should be for the 'mailboxes' > > line in .muttrc. While on IMAP, I can hit 'c' and will be prompted with > > the next folder that contains new mail. I had a line when connecting > > via IMAP like: > > > > mailboxes =INBOX.ale =INBOX.mutt > > > > What should be the syntax for mailboxes entries when pointing to a local > > Maildir? > > > > Thanks. > > > > I found the correct format to be +INBOX.mutt > > This is on Max OSX Mountain Lion, so I used this entry in .muttrc to > populate: > > mailboxes `find ~/.mail/fastmail -maxdepth 1 -type d -name ".*" -exec \ > echo -n "+'{}' " \;` > I should correct the above to be: mailboxes `find ~/.mail.fastmail -maxdepth 1 -type d -name "*" -exec \ echo -n "{} " \;` -- Cheers, Trey Thieves respect property; they merely wish the property to become their property that they may more perfectly respect it. --G.K. Chesterton, "The Man Who Was Thursday" Darwin tbook-2.local 12.3.0 x86_64 11:27 up 6 days, 1:06, 6 users, load averages: 0.59 0.91 1.07
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On 07.05.13 10:39, Patrick Shanahan wrote: > * John Niendorf [05-07-13 10:37]: > [...] > > What is egrep and how does it work? (OK I guess I could look up the man > > page.) > > Biggest question is: Is egrep a vim only thing or can a nano wimp use it > > too? ;-) > > Your question will be answered when you do read the man page. :-)) John, please don't be put off by a bit¹ of learning curve when starting out with REs. Read also "man 7 regex", and google a bit for any intro bumpf that is lying about. E.g. "GAWK: Effective AWK Programming" is a pdf with a useful "Regular Expressions" section immediately following the "Getting Started" section. If you always have a spare xterm or two open, then it is quick to bring one to the foreground, whack in a quick egrep invocation, and pipe its output to "more", or redirect it to a file, e.g: egrep -n 'line *number' /usr/local/src/vim73/runtime/doc/* > /tmp/vim Here I had become impatient with "helpgrep" in vim taking too long to step (via successive :cnext) to what I was hoping to find. That egrep invocation put all matches into /tmp/vim, which I opened with vim, then did a "gf" (go file) on the filename preceding the matching text on the most promising line I could see. If no good, Ctrl-^ whips us back to the egrep-generated file index, and we "gf" on the next likely candidate. Pretty much any text in the filesystem succumbs rather quickly to such searching.) I do agree with "man 7 regex", which says » Regular expressions ("RE"s), as defined in POSIX.2, come in two forms: modern REs (roughly those of egrep; POSIX.2 calls these "extended" REs) and obsolete REs (roughly those of ed(1); POSIX.2 "basic" REs). Obsolete REs mostly exist for backward compatibility in some old programs; they will be discussed at the end. « I've never tried the ubuntu package: txt2regex - A Regular Expression "wizard", written with bash2 builtins but it might be worth a look. Incidentally, mutt essentially uses posix EREs, with GNU regex extensions. Erik ¹ There's a lot of merit in starting with simple expressions, with a lot of literal text, and becoming adventurous by degrees. (The above regex only adds "any number of spaces, including none" between the words. -- Some [people] feel that the best way to improve Perl would be to go back in time and shoot the author before he wrote it. -Larry Wall
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On Tue, May 07, 2013 at 07:47:52AM -0700, Gary Johnson wrote: > On 2013-05-07, Chris Green wrote: > > On Wed, May 08, 2013 at 12:21:58AM +1000, Erik Christiansen wrote: > > > On 07.05.13 14:53, Chris Green wrote: > > > > What other search programs work well with mutt? > > > > > > Mutt's own body search does the job for me within a mail folder, and > > > egrep provides full Extended Regular Expressions when searching some set > > > of my 1106 mail folders. Over more than a decade of mutt use, they've > > > always allowed me to find stuff quickly, even when I've no idea where an > > > email ended up. (So I've never had any need to look for anything else.) > > > > > > Neither suffers from the single word restriction, described. > > > > > Yes, one of the reasons I use mbox rather than maildir is the easier > > searching, I guess I can make myself a grep script. > > http://grepmail.sourceforge.net/ > http://www.barsnick.net/sw/grepm.html > That could well be just the job, thank you. -- Chris Green
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On Wed, May 08, 2013 at 12:51:35AM +1000, Erik Christiansen wrote: > On 07.05.13 15:32, Chris Green wrote: > > On Tue, May 07, 2013 at 10:21:49AM -0400, Patrick Shanahan wrote: > > > REs would be preferable but it does provide "fuzzy" searchs > > > > > Yes, I've used them occasionally, doesn't help with non alpha/number > > strings though. > > Maybe I'm missing something, but backslash-escaping allows REs to match > non alpha/number characters just fine, I find. The trick is to stick with > EREs (egrep, grep -E), because the BREs used by some tools by default require > more (and different) escapes. (When you're whacking in a quick regex on > the command line, it's handy to be using the same variant as you used > last time.) > Yes, REs *do* allow searching for anything. It's mairix's 'fuzzy' search that doesn't. -- Chris Green
Re: OT making ascii tables
On Mon, May 06, 2013 at 02:53:35PM +0200, Jan-Herbert Damm wrote: > from this list (I can't find it anymore) I got a brilliant recipe to > make plaintext-tables like so: > > = > .TS > box tab(|); > cb|cb|cb|cb. If you use "c" instead of "cb", you don't get the annoying escape characters. -- Bernard Massot
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On Tue, May 07, 2013 at 07:47:52AM -0700, Gary Johnson wrote: > On 2013-05-07, Chris Green wrote: > > On Wed, May 08, 2013 at 12:21:58AM +1000, Erik Christiansen wrote: > > > On 07.05.13 14:53, Chris Green wrote: > > > > What other search programs work well with mutt? > > > > > > Mutt's own body search does the job for me within a mail folder, and > > > egrep provides full Extended Regular Expressions when searching some set > > > of my 1106 mail folders. Over more than a decade of mutt use, they've > > > always allowed me to find stuff quickly, even when I've no idea where an > > > email ended up. (So I've never had any need to look for anything else.) > > > > > > Neither suffers from the single word restriction, described. > > > > > Yes, one of the reasons I use mbox rather than maildir is the easier > > searching, I guess I can make myself a grep script. > > http://grepmail.sourceforge.net/ > http://www.barsnick.net/sw/grepm.html Yes, I was just thinking about grepmail which I use all the time with my mbox mail archives. It provides perl type regex functionality along with mbox (and Maildir, I believe) parsing ability which taken together provides very powerful search capability. What I've been using for a long time is a script I wrote that first runs grepmail with the search expression I provide on the specified mboxs and saves the output to a mbox file. Then the script runs mutt on that output file which gives me further searching capability. Highly recommended. -- Will Fiveash
Re: Search utilities for use with mutt - I use mairix but it's not perfect
I use notmuch! Is is perfect! If you are using Debian, apt-get install notmuch do the trick! http://notmuchmail.org/ Marcelo 2013/5/7 Will Fiveash : > On Tue, May 07, 2013 at 07:47:52AM -0700, Gary Johnson wrote: >> On 2013-05-07, Chris Green wrote: >> > On Wed, May 08, 2013 at 12:21:58AM +1000, Erik Christiansen wrote: >> > > On 07.05.13 14:53, Chris Green wrote: >> > > > What other search programs work well with mutt? >> > > >> > > Mutt's own body search does the job for me within a mail folder, and >> > > egrep provides full Extended Regular Expressions when searching some set >> > > of my 1106 mail folders. Over more than a decade of mutt use, they've >> > > always allowed me to find stuff quickly, even when I've no idea where an >> > > email ended up. (So I've never had any need to look for anything else.) >> > > >> > > Neither suffers from the single word restriction, described. >> > > >> > Yes, one of the reasons I use mbox rather than maildir is the easier >> > searching, I guess I can make myself a grep script. >> >> http://grepmail.sourceforge.net/ >> http://www.barsnick.net/sw/grepm.html > > Yes, I was just thinking about grepmail which I use all the time with my > mbox mail archives. It provides perl type regex functionality along > with mbox (and Maildir, I believe) parsing ability which taken together > provides very powerful search capability. What I've been using for a > long time is a script I wrote that first runs grepmail with the search > expression I provide on the specified mboxs and saves the output to a > mbox file. Then the script runs mutt on that output file which gives me > further searching capability. Highly recommended. > > -- > Will Fiveash -- O__ --- Marcelo Luiz de Laia Rodovia MGT 367, Km 583 c/ /' _ -- Dep. de Engenharia Florestal nº 5000, Alto da Jacuba (*) \ (*) - UFVJM, Diamantina, MG, Brasil Ph: (+55) 38 9985-5078 ~~- (www.ufvjm.edu.br/floresta) FAX: (+55) 38 3532-1200 ^^- Linux user number 487797 CEP: 39.100-000 - Brazil
Re: Search utilities for use with mutt - I use mairix but it's not perfect
On 2013-05-08, Erik Christiansen wrote: > If you always have a spare xterm or two open, then it is quick to bring > one to the foreground, whack in a quick egrep invocation, and pipe > its output to "more", or redirect it to a file, e.g: > > egrep -n 'line *number' /usr/local/src/vim73/runtime/doc/* > /tmp/vim > > Here I had become impatient with "helpgrep" in vim taking too long to > step (via successive :cnext) to what I was hoping to find. That egrep > invocation put all matches into /tmp/vim, which I opened with vim, then > did a "gf" (go file) on the filename preceding the matching text on the > most promising line I could see. If no good, Ctrl-^ whips us back to > the egrep-generated file index, and we "gf" on the next likely > candidate. Pretty much any text in the filesystem succumbs rather > quickly to such searching.) You might find this script, which I've named vimgrep, useful. #!/bin/bash tmp=$(mktemp) cat > $tmp exec < /dev/tty vim --cmd 'let &efm=&gfm' -q $tmp "$@" rm $tmp It's invoked like this: grep -Hn | vimgrep All the lines that grep finds will be fed to vim as a quickfix list, which you can traverse with :cn, :cp, etc., or browse with :copen. I have mapped to :cn and to :cp so that I can traverse the quickfix list more easily. Regards, Gary
Re: Using send and reply hooks to set from address and reverse_name
Hi Suvayu, small question: why don't you use "set from=wor...@domain.com" etc? I have the setup as following: each mail is filed to a matching folder, my personal mail go to ~/Maildir, my work email are accessed via imap://work-server/…, some of the other accounts follow the same pattern. Depending on the folder I'm in the correct from address is set with "set from=…" As each IMAP account use different SMTP-Servers these are set via some send-hooks that depend on the from: address. This also matches my workflow that new mails are edited/sent using a second mutt-instance in a new screen-window. Maybe this gives you an idea how to accomplish your setup. If someone wants to read it I can post my current mutt-setup tomorrow. regards, Andre -- Andre Klärner smime.p7s Description: S/MIME cryptographic signature
Re: Any way to speed up regexp based coloring in bodies?
On 07May2013 15:14, hubert depesz lubaczewski wrote: | I have this rule in my muttrc: | color body color163 default "(http|https|ftp)://" | (this is simplified version, I was checking if there are no problems | when using more complicated things). | | And it works fine. | | But - every now and then I get email that is rather large (64kB), and it | contains many urls (~ 900). | And in this case - displaying such mail takes long time (6-8 seconds). Does it take this long with the simplified regexp above, or only your more complicated ones? It is possibly to accidentally write quite expensive regexps. | Strace shows that the time is not spent in any syscall, so I guess it's | internal processing. You should be able to see mutt show up in top; that would be more obviously cpu bound. Just for reference. | Is there any way to speed up such coloring? Regexp efficiency is important. If you're actually using more complex regexps we should see them. Your small regexp above looks pretty good though. | Or, perhaps - make color rule work only for messages smaller than x kB ? Hmm. Maybe. message-hooks run before the display fires, so you could write something like: message-hook . 'uncolor body "(http|https|ftp)://"'' message-hook "~z 1-16384" 'color body color163 default "(http|https|ftp)://"' Note that the "uncolor" must use _exactly_ the same pattern as the "color". Cheers, -- Cameron Simpson ep0: 3c509 in test mode. Erase pencil mark! This means that someone has scribbled with pencil in the test area on the card. Erase the pencil mark and reboot. (This is not a joke). - OpenBSD 2.3 ep(4) ethernet drive manual entry