Re: tell me how to do this (mass tagging of messages)

2018-10-17 Thread Carl Worth
On Wed, Oct 17 2018, Jeff Templon wrote:
> Indeed, as long as I am satisfied that all the messages in the view are
> OK to delete / tag / whatever ... I usually look at such at view to make
> sure that eg. the SPAM filter is doing the right thing.

I have not found any case in the notmuch-emacs UI where this has been an
issue for me, personally. If you do find a use case that's problematic,
let us know and we could certainly expand the interface to accommodate
that in some way.

Meanwhile, at the command line this distinction is made very clear. Try
each of these commands, for example:

notmuch search some-search-pattern

notmuch search --output threads some-search-pattern

notmuch search --output messages some-search-pattern

The second and third options there are very appropriate for generating a
list of threads (or messages) that you could then iterate over and
perform operations on.

And of course, if you're wanting to do an operation such as tagging or
un-tagging, then you can do that at that command-line directly without
needing an external loop over the results:

notmuch tag +some-tag some-search-pattern

notmuch tag -some-tag some-search-pattern

Both of these operations will act on matched messages, (no threads are
involved).

So hopefully playing with the above operations makes it clear how
notmuch itself is operating.

And the notmuch-emacs stuff is a pretty simple layer on top of that, so
again, we could easily improve things as necessary.

> My opinion : the best option would be to have some flag / toggle
> variable / whatever that would cause a search results screen to display
> only matching messages and not the whole thread.

That would certainly be an option.

But again, what operation does notmuch-emacs allow you to do on the
thread that you are really only wanting to do on the matching messages?

For me, a frequent operation is to just _see_ the matching messages. And
for this particular operation, just pressing "Enter" on a thread does
exactly that. It brings up a view of the whole thread, but with only the
matching messages open (and non-matching messages collapsed).

-Carl




signature.asc
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: tell me how to do this (mass tagging of messages)

2018-10-17 Thread Jeff Templon
Hi,

David Bremner  writes:

> David Edmondson  writes:
>
>> On Wednesday, 2018-10-17 at 13:39:10 +02, Jeff Templon wrote:
>
>>> Right.  Poor example.  I guess the better question is, in a screen full
>>> of threads matching a particular query, how do I do a mass action on
>>> only those messages that match the query and not on the threads?
>>
>> There's no easy way to do that now.
>>
>> Maybe we should make it such that a prefix argument to the tag operation
>> affects only matching messages in the affected threads?
>
> A workaround could be to use "c q" to copy the query, then use that on
> the command line with "notmuch tag".

Indeed, as long as I am satisfied that all the messages in the view are
OK to delete / tag / whatever ... I usually look at such at view to make
sure that eg. the SPAM filter is doing the right thing.

My opinion : the best option would be to have some flag / toggle
variable / whatever that would cause a search results screen to display
only matching messages and not the whole thread.

J "am learning to be very careful when hitting keys" T
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: tell me how to do this (mass tagging of messages)

2018-10-17 Thread David Bremner
David Edmondson  writes:

> On Wednesday, 2018-10-17 at 13:39:10 +02, Jeff Templon wrote:

>> Right.  Poor example.  I guess the better question is, in a screen full
>> of threads matching a particular query, how do I do a mass action on
>> only those messages that match the query and not on the threads?
>
> There's no easy way to do that now.
>
> Maybe we should make it such that a prefix argument to the tag operation
> affects only matching messages in the affected threads?

A workaround could be to use "c q" to copy the query, then use that on
the command line with "notmuch tag".

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: tell me how to do this (mass tagging of messages)

2018-10-17 Thread David Edmondson
On Wednesday, 2018-10-17 at 13:39:10 +02, Jeff Templon wrote:

> Hi,
>
> David Edmondson  writes:
>
>> On Wednesday, 2018-10-17 at 10:06:18 +02, Jeff Templon wrote:
>
>>> So how do I make sure that I'm operating on the messages themselves
>>> (only one of the 14 messages is marked 'spam') and not the threads?
>
>> In this context, does it matter? If you remove 'spam' from the entire
>> thread it will affect only that one message, as it's the only one with
>> the tag.
>
> Right.  Poor example.  I guess the better question is, in a screen full
> of threads matching a particular query, how do I do a mass action on
> only those messages that match the query and not on the threads?

There's no easy way to do that now.

Maybe we should make it such that a prefix argument to the tag operation
affects only matching messages in the affected threads?

dme.
-- 
You took the words right out of my mouth.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: tell me how to do this (mass tagging of messages)

2018-10-17 Thread Jeff Templon
Hi,

David Edmondson  writes:

> On Wednesday, 2018-10-17 at 10:06:18 +02, Jeff Templon wrote:

>> So how do I make sure that I'm operating on the messages themselves
>> (only one of the 14 messages is marked 'spam') and not the threads?

> In this context, does it matter? If you remove 'spam' from the entire
> thread it will affect only that one message, as it's the only one with
> the tag.

Right.  Poor example.  I guess the better question is, in a screen full
of threads matching a particular query, how do I do a mass action on
only those messages that match the query and not on the threads?

I had the problem before when I was learning notmuch.  I went to the
inbox, and saw a new message that was a contribution to a thread of
several messages (none of the other ones was tagged 'inbox').  The new
'inbox tagged' message of that thread was not important, so I did a 'k
d' on what I now know to be the thread, thinking it would only apply to
that one message that was actually in the inbox ...

I tried to find an option "turn off related messages in search results"
but could not find it.

> On the button for a part you can hit “. ?” to see the various
> keybindings available there, including opening the part, saving to a
> file, etc.

Thanks to you and to Gregor for this.

JT
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: tell me how to do this (mass tagging of messages)

2018-10-17 Thread David Edmondson
On Wednesday, 2018-10-17 at 10:06:18 +02, Jeff Templon wrote:

> Hi,
>
> So I do a search like this in notmuch emacs:
>
> tag:spam
>
> and what comes up is something like this ...
>
>   2013-07-27 [1/1]   ASN Bank SURF***SPAM***6.8 ASN Bank: 
> Belangrijke update mededeling (lists lists/grid spam)
>   2013-07-27 [1/1]   Overdracht van geld  SURF***SPAM***5.7 Uw account is 
> geactiveerd. (spam)
>   2013-07-26 [1/1]   Full NameSURF***SPAM***6.2 Need (spam)
>   2013-07-16 [1/14]  Carlos Zorraquino... SURF***SPAM***6.2 Re: CHEP2013 
> Proceedings: invitation to submit a full paper for your contribution (spam)
>   2013-07-15 [1/1]   Rabo BankSURF***SPAM***5.8 2013 Rabo Bank 
> Algemene voorwaarden en informatie (spam)
>
> I take a look and decide I want to delete a bunch of messages, but take
> a look at the fourth in the list - this is one where the SURF spam
> filter has decided that one of the messages in the thread is spam, but
> the entire thread has shown up here.  If I take bulk action on such a
> buffer, I've seen before that most commands work on the threads and not
> the messages themselves, like the 'k' command.
>
> So how do I make sure that I'm operating on the messages themselves
> (only one of the 14 messages is marked 'spam') and not the threads?

In this context, does it matter? If you remove 'spam' from the entire
thread it will affect only that one message, as it's the only one with
the tag.

> Thanks.  BTW I like notmuch pretty much.
>
> JT
>
> ps while I'm at it - inline display of attachments or in any case firing
> up an external viewer?  I only know about hitting return on the
> attachment link and having it saved to a file.

On the button for a part you can hit “. ?” to see the various
keybindings available there, including opening the part, saving to a
file, etc.

dme.
-- 
I'm in a backless dress on a pastel ward that's shining.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: tell me how to do this (mass tagging of messages)

2018-10-17 Thread Gregor Zattler
Hi Jeff,
* Jeff Templon  [2018-10-17; 10:06]:
> and what comes up is something like this ...
>
>   2013-07-27 [1/1]   ASN Bank SURF***SPAM***6.8 ASN Bank: 
> Belangrijke update mededeling (lists lists/grid spam)
>   2013-07-27 [1/1]   Overdracht van geld  SURF***SPAM***5.7 Uw account is 
> geactiveerd. (spam)
>   2013-07-26 [1/1]   Full NameSURF***SPAM***6.2 Need (spam)
>   2013-07-16 [1/14]  Carlos Zorraquino... SURF***SPAM***6.2 Re: CHEP2013 
> Proceedings: invitation to submit a full paper for your contribution (spam)
>   2013-07-15 [1/1]   Rabo BankSURF***SPAM***5.8 2013 Rabo Bank 
> Algemene voorwaarden en informatie (spam)
>
> I take a look and decide I want to delete a bunch of messages, but take
> a look at the fourth in the list - this is one where the SURF spam
> filter has decided that one of the messages in the thread is spam, but
> the entire thread has shown up here.  If I take bulk action on such a
> buffer, I've seen before that most commands work on the threads and not
> the messages themselves, like the 'k' command.
>
> So how do I make sure that I'm operating on the messages themselves
> (only one of the 14 messages is marked 'spam') and not the threads?

AFAIK you navigate to this fourth line, hit ENTER, navigate to
the message tagged spam (probably it's the one unfolded) and use
"k" and presumably "D" (or however you configured
notmuch-tagging-keys) to mark this one as to be deleted.

> Thanks.  BTW I like notmuch pretty much.

me too

> ps while I'm at it - inline display of attachments or in any case firing
> up an external viewer?  I only know about hitting return on the
> attachment link and having it saved to a file.

With point on the attachment, hit ".v" in order to see the
attachment in your preferred application.  Hit ".o" instead in
order to choose the right application from a list.

Ciao; Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


tell me how to do this (mass tagging of messages)

2018-10-17 Thread Jeff Templon
Hi,

So I do a search like this in notmuch emacs:

tag:spam

and what comes up is something like this ...

  2013-07-27 [1/1]   ASN Bank SURF***SPAM***6.8 ASN Bank: 
Belangrijke update mededeling (lists lists/grid spam)
  2013-07-27 [1/1]   Overdracht van geld  SURF***SPAM***5.7 Uw account is 
geactiveerd. (spam)
  2013-07-26 [1/1]   Full NameSURF***SPAM***6.2 Need (spam)
  2013-07-16 [1/14]  Carlos Zorraquino... SURF***SPAM***6.2 Re: CHEP2013 
Proceedings: invitation to submit a full paper for your contribution (spam)
  2013-07-15 [1/1]   Rabo BankSURF***SPAM***5.8 2013 Rabo Bank 
Algemene voorwaarden en informatie (spam)

I take a look and decide I want to delete a bunch of messages, but take
a look at the fourth in the list - this is one where the SURF spam
filter has decided that one of the messages in the thread is spam, but
the entire thread has shown up here.  If I take bulk action on such a
buffer, I've seen before that most commands work on the threads and not
the messages themselves, like the 'k' command.

So how do I make sure that I'm operating on the messages themselves
(only one of the 14 messages is marked 'spam') and not the threads?

Thanks.  BTW I like notmuch pretty much.

JT

ps while I'm at it - inline display of attachments or in any case firing
up an external viewer?  I only know about hitting return on the
attachment link and having it saved to a file.


___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch