hide identical mails within the same thread

2018-01-20 Thread Yubin Ruan
Is there any configuration for mutt that can hide identical mails within the
same thread? I indexed all the mails and sometime I re-construct the whole
thread from one specific mail. However because some identical mails (with the
same Message-ID, I guess) scatter in several mailbox, within the same thread I
see lots of =>, which indicate identical mails.

Thanks,
Yubin


Re: [SOLVED] Re: Quote multiple messages in new message

2018-01-20 Thread steve

Le 20-01-2018, à 14:35:03 +0100, Simon Ruderich a écrit :


Note that this will add in-reply-to headers which you might not
expect if you want to create a new message.


Right. But it's that of a hassle to modify the headers. Including text
is much more.

Have a nice Sunday,
Steve



Re: [SOLVED] Re: Quote multiple messages in new message

2018-01-20 Thread Simon Ruderich
On Fri, Jan 19, 2018 at 06:11:44PM +0100, steve wrote:
> Le 17-01-2018, à 16:42:53 -0800, Claus Assmann a écrit :
>
>> On Wed, Jan 17, 2018, steve wrote:
>>
>>>  I tried to tag some messages
>>> with T then type ;m but this create an empty new message.
>>
>> Did you try "reply"?  ;r
>
> Stupidly (or so), I didn't…
>
> And it does exactly what I wanted. Thank you.
>
> And thanks for the others for their input.

Note that this will add in-reply-to headers which you might not
expect if you want to create a new message.

Regards
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9


signature.asc
Description: PGP signature


Re: maildir-utils vs notmuch

2018-01-20 Thread Yubin Ruan
On Fri, Jan 19, 2018 at 11:03:18AM +0100, Till Smejkal wrote:
> Hi,
> 
> I am using notmuch to index my mails for years now and I am very happy with 
> its
> performance and functionality.
> 
> On Fri, 19 Jan 2018, Bastian wrote:
> > I really love and depend on mu's feature to track mail adresses of all 
> > indexed mails. I use 
> > 
> >   set query_command="mu cfind --format mutt-ab %s"
> > 
> > as an address book replacement for mutt.
> 
> Recent versions of notmuch have 'notmuch address'. This can be used to query 
> for
> addresses in all indexed mails. Another possibility is to directly use the 
> notmuch
> library to run queries on the indexed mails and write your own script. That's 
> what I
> do, since I don't really like the output of 'notmuch address'. If you want, I 
> can
> share the code with you.

Can you make your code public? I would love to give it a try.

Yubin


Re: find matched message in all mailboxes and put them into a separate mailbox

2018-01-20 Thread Yubin Ruan
On Thu, Jan 18, 2018 at 09:12:36AM -0500, Ben Boeckel wrote:
> On Thu, Jan 18, 2018 at 17:29:38 +0800, Yubin Ruan wrote:
> > I know one can hit / or l (i.e., limit) and then apply a search pattern to
> > search for messages in the current mailbox. But can we apply this to 
> > multiple
> > mailboxes? I would like to search for matched messages in all mailboxes and
> > then put them into a separate mailbox. For example, I have 10 mailboxes and
> > now I want to search in these 10 mailboxes for messages that have me in the
> > "To: " field and then put them into a separate mailbox.
> 
> I use notmuch for this (using Maildir):
> 
> https://notmuchmail.org/

Thanks Ben and all others in this thread,

I have taken a look at notmuch and it work well. 

> with these bindings:
> 
> macro index \Cn "\
>  set my_wait_key = \$wait_key\
>  unset wait_key\
> notmuch-mutt --prompt search\
> ~/.cache/notmuch/mutt/results\
>  set wait_key = \$my_wait_key\
>  unset my_wait_key\
> " "search mail (using notmuch)"
> macro index  "\
>  set my_wait_key = \$wait_key\
>  unset wait_key\
> notmuch-mutt thread\
> ~/.cache/notmuch/mutt/results\
>  set wait_key = \$my_wait_key\
>  unset my_wait_key\
> " "search and reconstruct owning thread (using notmuch)"
> 
> Notmuch reindexing is triggered by offlineimap, but whatever fetches
> email for you should also be able to trigger a reindex.

Ben, I believe this is from a script from Stefano Zacchiroli at

https://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/

right? That works well, except for the bug below.

[added Stefano Zacchiroli to the Cc: ...]

Hi Stefano,

how about the patch below? I believe it is safer to escape special character
such as whitespace when passing filename through bash pipe (e.g., Gmail has
the "Sent Mail" folder)

--- /tmp/mutt-notmuch-old   2018-01-21 17:52:11.946415454 +0800
+++ /tmp/mutt-notmuch-new   2018-01-21 17:40:12.926430126 +0800
@@ -35,6 +35,7 @@
 
 empty_maildir($maildir);
 system("notmuch search --output=files $query"
+  . " | sed -e \'s/ / /\' "
. " | xargs --no-run-if-empty ln -s -t $maildir/cur/");
 }

Another thing I find sorry is that modifications in the search results listing
do not carry over (i.e., modifications in ~/.cache/mutt_result do not carry
over to the original mail, even though mails in ~/.cache/mutt_results/ are
symlinked to their origins). I can change  to
, but it doesn't work. I don't know what a modification should
be for the Maildir format, so hopefully anyone can help here...

Yubin