Re: hide identical mails within the same thread

2018-01-23 Thread Ben Boeckel
On Wed, Jan 24, 2018 at 01:58:04 +0800, Yubin Ruan wrote:
> No, the resulting mailbox can be made to be writable: if you use the
> mutt-notmuch script, just change the  below to
> :

Ah, indeed. I'll keep it readonly for me since it actually doesn't do
much to be read/write anyways.

Thanks,

--Ben


Re: hide identical mails within the same thread

2018-01-22 Thread Cameron Simpson

On 23Jan2018 03:28, Ionel Mugurel Ciobîcă <i.m.ciob...@upcmail.nl> wrote:

On 23-01-2018, at 13h 01'28", Cameron Simpson wrote about "Re: hide identical mails 
within the same thread"

On 22Jan2018 15:48, Ben Boeckel <maths...@gmail.com> wrote:
>On Mon, Jan 22, 2018 at 20:49:13 +0100, Ionel Mugurel Ciobîcă wrote:
>>That would still require to have identical e-mails in more than one
>>mailbox...
>
>It happens with gmail when an email has more than one label.

And to me locally when I crossfile email and/or when I get a personal CC of
a list email (lands in my personal inbox and the list folder).



procmail can help you here. I never get duplicate mails... Add this up
on your .procmailrc file:

| # avoid cross-post (duplicate mails)
|   :0 Wh: msgid.lock
|   | formail -D 32768 msgid.cache


You misunderstand. I _expect_ these duplicates. I could strip them, but I 
don't. I'm just describing normal circumstances in which this can and does 
occur.


Regarding procmail, I experimented with the recipe you describe but decided it 
wasn't for me. And I dropped procmail some years ago and wrote my own filer.


Cheers,
Cameron Simpson <c...@cskk.id.au> (formerly c...@zip.com.au)


Re: hide identical mails within the same thread

2018-01-22 Thread Yubin Ruan
On Mon, Jan 22, 2018 at 11:33:16AM -0500, Ben Boeckel wrote:
> On Mon, Jan 22, 2018 at 15:32:50 +, Grant Edwards wrote:
> > Why not just delete the duplicate e-mails?
> > 
> > That would seem to be a more efficient way of "always hiding them".
> 
> The problem arises when using notmuch to find emails across all
> mailboxes and create a new mailbox with the results. This mailbox is
> read-only.

No, the resulting mailbox can be made to be writable: if you use the
mutt-notmuch script, just change the  below to
:

macro index  \
  "unset wait_keymutt-notmuch 
--prompt search~/.cache/mutt_results" \
  "search mail (using notmuch)"
macro index  \
  "unset wait_keymutt-notmuch 
thread~/.cache/mutt_resultsset
 wait_key" \
  "search and reconstruct owning thread (using notmuch)"

--
Yubin


Re: hide identical mails within the same thread

2018-01-22 Thread Ionel Mugurel Ciobîcă
On 23-01-2018, at 13h 01'28", Cameron Simpson wrote about "Re: hide identical 
mails within the same thread"
> On 22Jan2018 15:48, Ben Boeckel <maths...@gmail.com> wrote:
> >On Mon, Jan 22, 2018 at 20:49:13 +0100, Ionel Mugurel Ciobîcă wrote:
> >>That would still require to have identical e-mails in more than one
> >>mailbox...
> >
> >It happens with gmail when an email has more than one label.
> 
> And to me locally when I crossfile email and/or when I get a personal CC of
> a list email (lands in my personal inbox and the list folder).
> 

procmail can help you here. I never get duplicate mails... Add this up
on your .procmailrc file:


| # avoid cross-post (duplicate mails)
|   :0 Wh: msgid.lock
|   | formail -D 32768 msgid.cache


Ionel



Re: hide identical mails within the same thread

2018-01-22 Thread Cameron Simpson

On 22Jan2018 15:48, Ben Boeckel  wrote:

On Mon, Jan 22, 2018 at 20:49:13 +0100, Ionel Mugurel Ciobîcă wrote:

That would still require to have identical e-mails in more than one
mailbox...


It happens with gmail when an email has more than one label.


And to me locally when I crossfile email and/or when I get a personal CC of a 
list email (lands in my personal inbox and the list folder).


Cheers,
Cameron Simpson  (formerly c...@zip.com.au)


Re: hide identical mails within the same thread

2018-01-22 Thread Cameron Simpson

On 22Jan2018 11:33, Ben Boeckel  wrote:

On Mon, Jan 22, 2018 at 15:32:50 +, Grant Edwards wrote:

Why not just delete the duplicate e-mails?

That would seem to be a more efficient way of "always hiding them".


The problem arises when using notmuch to find emails across all
mailboxes and create a new mailbox with the results. This mailbox is
read-only.


When I search for email I look for it using my notmuch wrapper notmuch-search:

 https://bitbucket.org/cameron_simpson/css/src/tip/bin/notmuch-search

Once the result mailbox has been made it pulls up mutt on it like this:

 mutt -e 'unset header_cache' -e 'push ",D$"' -f "$mdir"

i.e. it disables the header cache (pointless for a transient folder) and runs 
my ,D macro, which deletes all duplicates.


Of course such a script name is painful to type, so since I have "+" aliased to 
opening mutt, I have ++ aliased to "notmuch-search -S". So less pain. I've got 
a "++" macro inside mutt too for the same thing.


Hoping this is helpful,
Cameron Simpson  (formerly c...@zip.com.au)


Re: hide identical mails within the same thread

2018-01-22 Thread Ben Boeckel
On Mon, Jan 22, 2018 at 20:49:13 +0100, Ionel Mugurel Ciobîcă wrote:
> That would still require to have identical e-mails in more than one
> mailbox...

It happens with gmail when an email has more than one label.

--Ben


Re: hide identical mails within the same thread

2018-01-22 Thread Ionel Mugurel Ciobîcă
On 22-01-2018, at 16h 37'04", Grant Edwards wrote about "Re: hide identical 
mails within the same thread"
> On 2018-01-22, Ben Boeckel <maths...@gmail.com> wrote:
> > On Mon, Jan 22, 2018 at 15:32:50 +, Grant Edwards wrote:
> >> Why not just delete the duplicate e-mails?
> >> 
> >> That would seem to be a more efficient way of "always hiding them".
> >
> > The problem arises when using notmuch to find emails across all
> > mailboxes and create a new mailbox with the results. This mailbox is
> > read-only.
> 
> Good to know -- I've been wondering about the reason for such a
> request for days (off-and-on).  Really.
> 

That would still require to have identical e-mails in more than one
mailbox...


Ionel


Re: hide identical mails within the same thread

2018-01-22 Thread Grant Edwards
On 2018-01-22, Ben Boeckel  wrote:
> On Mon, Jan 22, 2018 at 15:32:50 +, Grant Edwards wrote:
>> Why not just delete the duplicate e-mails?
>> 
>> That would seem to be a more efficient way of "always hiding them".
>
> The problem arises when using notmuch to find emails across all
> mailboxes and create a new mailbox with the results. This mailbox is
> read-only.

Good to know -- I've been wondering about the reason for such a
request for days (off-and-on).  Really.

-- 
Grant Edwards   grant.b.edwardsYow! I love ROCK 'N ROLL!
  at   I memorized the all WORDS
  gmail.comto "WIPE-OUT" in 1965!!



Re: hide identical mails within the same thread

2018-01-22 Thread Ben Boeckel
On Mon, Jan 22, 2018 at 15:32:50 +, Grant Edwards wrote:
> Why not just delete the duplicate e-mails?
> 
> That would seem to be a more efficient way of "always hiding them".

The problem arises when using notmuch to find emails across all
mailboxes and create a new mailbox with the results. This mailbox is
read-only.

--Ben


Re: hide identical mails within the same thread

2018-01-22 Thread Grant Edwards
On 2018-01-21, Tim Chase  wrote:
> On 2018-01-21 12:18, Ionel Mugurel Ciobîcă wrote:
>> You can tag duplicates (defaults are T~=) and do something with it,
>> for example delete them (defaults ;d). You can't hide e-mails in
>> mutt.
>
> Should be able to use the ~= "duplicate message" and invert it, then
> use that to  (by default "l") the display.
>
>   l!~=
>
> Should be able to wrap that in a folder-hook if you want it to always
> take place.

Why not just delete the duplicate e-mails?

That would seem to be a more efficient way of "always hiding them".

-- 
Grant Edwards   grant.b.edwardsYow! HUMAN REPLICAS are
  at   inserted into VATS of
  gmail.comNUTRITIONAL YEAST ...



Re: hide identical mails within the same thread

2018-01-22 Thread Ionel Mugurel Ciobîcă
On 21-01-2018, at 12h 18'48", Ionel Mugurel Ciobîcă wrote about "Re: hide 
identical mails within the same thread"

> [...] You can't hide e-mails in mutt.

I stand corrected! Everyday you learn something new... :-)

Ionel


Re: hide identical mails within the same thread

2018-01-21 Thread Tim Chase
On 2018-01-21 17:27, Tim Chase wrote:
>   folder-hook . 'push ~!='

Sorry, mistyped

  folder-hook . 'push !~='

(the adjacency of "~" and "!" on the keyboard didn't help. The "!"
negates the "~=" duplicate functionality).

And as the message says, if later on you do want to see those dupes,
use the "l"imit function and specify "all".

This does assume that

1) you have `duplicate_threads` set to "yes" as should be the
default, and

2) your display is sorted to group by thread

-tkc





Re: hide identical mails within the same thread

2018-01-21 Thread Tim Chase
On 2018-01-21 07:01, Tim Chase wrote:
> On 2018-01-21 12:18, Ionel Mugurel Ciobîcă wrote:
> > You can tag duplicates (defaults are T~=) and do something with
> > it, for example delete them (defaults ;d). You can't hide e-mails
> > in mutt.  
> 
> Should be able to use the ~= "duplicate message" and invert it, then
> use that to  (by default "l") the display.
> 
>   l!~=
> 
> Should be able to wrap that in a folder-hook if you want it to
> always take place.

Went ahead and tested:

  folder-hook . 'push ~!='

which hides duplicates.

-tkc





Re: hide identical mails within the same thread

2018-01-21 Thread Tim Chase
On 2018-01-21 12:18, Ionel Mugurel Ciobîcă wrote:
> You can tag duplicates (defaults are T~=) and do something with it,
> for example delete them (defaults ;d). You can't hide e-mails in
> mutt.

Should be able to use the ~= "duplicate message" and invert it, then
use that to  (by default "l") the display.

  l!~=

Should be able to wrap that in a folder-hook if you want it to always
take place.

-tkc





Re: hide identical mails within the same thread

2018-01-21 Thread Ionel Mugurel Ciobîcă
On 22-01-2018, at 03h 33'03", Yubin Ruan wrote about "hide identical mails 
within the same thread"
> 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


You can tag duplicates (defaults are T~=) and do something with it,
for example delete them (defaults ;d). You can't hide e-mails in mutt.


Ionel




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