unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Flat search and threaded views
@ 2016-08-04 15:39 Yuri D'Elia
  2016-08-04 16:33 ` Jani Nikula
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Yuri D'Elia @ 2016-08-04 15:39 UTC (permalink / raw)
  To: notmuch

Hi everyone, I'm experimenting with notmuch-emacs.el (straight from
git), and I have a few questions after a few days of testing.

The search buffer packs messages in threads by default. Is there a way
to have a flat list of strictly matching messages when needed?

For example, for a query like "tag:unread AND date:24h..now", I'm shown
all threads containing unread messages within the last day, which is
perfect. But when I select a thread (with RET), I'm shown the thread
from the start.

I'd like to jump directly to the first unread message (and in detail, to
the first message that actually matches the query!). It's really not
great to have to find what message matched the query, especially for
long-running threads.

Another odd behavior I get as a result is that you obviously need to
select the unread message explicitly to remove the unread tag. Applying
tags to _individual_ messages is similarly weird, as you cannot do that
from the search view (they would apply to the entire thread). Maybe I'm
missing a better way here.

Tree view is only marginally better in both scenarios.

You can start a tree search with 'z', but is there a way to make
searches from the notmuch-hello box into tree by default?

Is there a way to sort the search (either tree/search) by subject or
by author? Rarely useful, but it doesn't seem possible.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Flat search and threaded views
  2016-08-04 15:39 Flat search and threaded views Yuri D'Elia
@ 2016-08-04 16:33 ` Jani Nikula
  2016-08-04 17:21   ` Yuri D'Elia
  2016-08-04 16:37 ` Jani Nikula
  2016-08-04 17:33 ` Matt Armstrong
  2 siblings, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2016-08-04 16:33 UTC (permalink / raw)
  To: Yuri D'Elia, notmuch

On Thu, 04 Aug 2016, Yuri D'Elia <wavexx@thregr.org> wrote:
> Hi everyone, I'm experimenting with notmuch-emacs.el (straight from
> git), and I have a few questions after a few days of testing.
>
> The search buffer packs messages in threads by default. Is there a way
> to have a flat list of strictly matching messages when needed?

Just the command-line interface, AFAIK.

> For example, for a query like "tag:unread AND date:24h..now", I'm shown
> all threads containing unread messages within the last day, which is
> perfect. But when I select a thread (with RET), I'm shown the thread
> from the start.
>
> I'd like to jump directly to the first unread message (and in detail, to
> the first message that actually matches the query!). It's really not
> great to have to find what message matched the query, especially for
> long-running threads.

For me, hitting RET in search does show the first matching message in
the thread.

> Another odd behavior I get as a result is that you obviously need to
> select the unread message explicitly to remove the unread tag.

The idea is that the unread tag gets dropped when the cursor visits the
region of an expanded message, in an approximation of when the user has
actually read the message. We spent quite a bit of time on this, and at
least I like this behaviour very much, especially with the red
overstrike on the unread tag in the buffer.

If you want to remove unread tags without actually reading the messages
(why would you want to do that?), you should probably tag the messages
some other way.

> Applying tags to _individual_ messages is similarly weird, as you
> cannot do that from the search view (they would apply to the entire
> thread). Maybe I'm missing a better way here.

I suppose we could use a feature to tag matching messages from the
search view and expanded messages from the show view. You can of course
do this on the command-line.

> Tree view is only marginally better in both scenarios.
>
> You can start a tree search with 'z', but is there a way to make
> searches from the notmuch-hello box into tree by default?

Click [edit] on the saved searches, customize Search Type for each query
you want to use non-default search for. You can also hit 'Z' in both the
search buffer and the show buffer to display them in the tree view.

In general, '?' will display nice help in almost all notmuch buffers.

> Is there a way to sort the search (either tree/search) by subject or
> by author? Rarely useful, but it doesn't seem possible.

I don't think so.


BR,
Jani.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Flat search and threaded views
  2016-08-04 15:39 Flat search and threaded views Yuri D'Elia
  2016-08-04 16:33 ` Jani Nikula
@ 2016-08-04 16:37 ` Jani Nikula
  2016-08-04 17:33 ` Matt Armstrong
  2 siblings, 0 replies; 6+ messages in thread
From: Jani Nikula @ 2016-08-04 16:37 UTC (permalink / raw)
  To: Yuri D'Elia, notmuch

On Thu, 04 Aug 2016, Yuri D'Elia <wavexx@thregr.org> wrote:
> For example, for a query like "tag:unread AND date:24h..now"

BTW the "now" part is redundant, you can use an open ended range
"tag:unread AND date:24h..".

BR,
Jani.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Flat search and threaded views
  2016-08-04 16:33 ` Jani Nikula
@ 2016-08-04 17:21   ` Yuri D'Elia
  2016-08-11 15:54     ` Yuri D'Elia
  0 siblings, 1 reply; 6+ messages in thread
From: Yuri D'Elia @ 2016-08-04 17:21 UTC (permalink / raw)
  To: Jani Nikula, notmuch

On Thu, Aug 04 2016, Jani Nikula <jani@nikula.org> wrote:
>> I'd like to jump directly to the first unread message (and in detail, to
>> the first message that actually matches the query!). It's really not
>> great to have to find what message matched the query, especially for
>> long-running threads.
>
> For me, hitting RET in search does show the first matching message in
> the thread.

Ok, I see now.

The problem is that the search I've built includes both existing
messages and unread ones (with a buffer of a day). So even though I get
a new (unread) message, some existing messages in the thread also match.
When reading a new thread started within the day, all messages match.

So I have a different question:

Can I customize how to jump within a thread? I understand 'unread' is
nothing special and I'd like to keep it that way. So I'd like a quick
way to navigate within a thread to skip to messages matching a certain
tag (ie: unread).

With that, I could setup a hook in notmuch-show to improve the behavior
without making unread special.

> The idea is that the unread tag gets dropped when the cursor visits the
> region of an expanded message, in an approximation of when the user has
> actually read the message. We spent quite a bit of time on this, and at
> least I like this behaviour very much, especially with the red
> overstrike on the unread tag in the buffer.

I've seen this, but it wasn't clear how it was working. I see now the
mechanism, but I need a convenient way to jump to tags in a show buffer.

I have to say, as Matt experienced, I wasn't sure how messages where
expanded until I read that message.

> I suppose we could use a feature to tag matching messages from the
> search view and expanded messages from the show view. You can of course
> do this on the command-line.

You mean 'notmuch tag'? Isn't this what '*' would do?

>> Is there a way to sort the search (either tree/search) by subject or
>> by author? Rarely useful, but it doesn't seem possible.
>
> I don't think so.

I also didn't see a way to do that from the command line.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Flat search and threaded views
  2016-08-04 15:39 Flat search and threaded views Yuri D'Elia
  2016-08-04 16:33 ` Jani Nikula
  2016-08-04 16:37 ` Jani Nikula
@ 2016-08-04 17:33 ` Matt Armstrong
  2 siblings, 0 replies; 6+ messages in thread
From: Matt Armstrong @ 2016-08-04 17:33 UTC (permalink / raw)
  To: Yuri D'Elia, notmuch

Yuri D'Elia <wavexx@thregr.org> writes:

> For example, for a query like "tag:unread AND date:24h..now", I'm shown
> all threads containing unread messages within the last day, which is
> perfect. But when I select a thread (with RET), I'm shown the thread
> from the start.

Yuri, I see you're running into issues similar to what I raised today in
id:qf57fbw4fx4.fsf@marmstrong-linux.kir.corp.google.com

So far I think notmuch attemps to give you a useful
https://en.wikipedia.org/wiki/DWIM default behavior with respect to how
it handles threads, but both you and I find it to be surprising or even
undesirable in certain situations.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Flat search and threaded views
  2016-08-04 17:21   ` Yuri D'Elia
@ 2016-08-11 15:54     ` Yuri D'Elia
  0 siblings, 0 replies; 6+ messages in thread
From: Yuri D'Elia @ 2016-08-11 15:54 UTC (permalink / raw)
  To: notmuch

On Thu, Aug 04 2016, Yuri D'Elia <wavexx@thregr.org> wrote:
> The problem is that the search I've built includes both existing
> messages and unread ones (with a buffer of a day). So even though I get
> a new (unread) message, some existing messages in the thread also match.
> When reading a new thread started within the day, all messages match.

I've tried to change my workflow to fit notmuch's, for example by
narrowing my default searches only to only match unread messages.

I'm feeling a bit mixed about the interface. This is not my first
approach to tag-based email management (I actually still use mu4e). I
wanted to give notmuch a try, mostly due to the way tags can be
processed easily with afew.

I like how the tagging workflow works, actually. I customized afew and
the way default tags are assigned/managed. Batch-processing with afew is
a breeze. I wrote my own plugin to implement MailMove the way I wanted
in a few hours and overridden a few others. I'm quite happy about this.

I just find the emacs interface a bit confusing.

- Showing search results in threads, even after narrowing queries, is
  not optimal. I'm shown a list of threads which contain tag:unread
  messages, *but* the count is the number of messages in the thread
  itself. I've been tripped multiple times by this.

  I still think a flat search result would be better. I would like to
  jump into the show buffer as it's being done currently (with the whole
  thread) for additional context, but not for the direct search results.

- Tagging individual messages is just cumbersome because of this. I
  often flag individual ids that contain things that I need to act on
  later. I cannot do this straight from the search results. I need to
  read the thread and move the cursor to the appropriate message.

- Even after reconsidering, I find that '*' will  never do what I expect.
  I'd like to tag matching ids (that is, what I'm seeing), not threads.
  
  People often hijack old threads just to find your address. I'm being
  shown huge threads, but in reality I'm just getting a new message and
  I don't really want to manage threads as well as messages. When
  tagging, I almost always tag individual messages. When I tag threads,
  generally is to 'kill' them using afew's KillThreadsFilter.

- The unread mechanism itself is nice, but it doesn't work as you might
  expect if you match also read messages. Easier navigation between tags
  (such as "jump to the next unread message") is something I'm looking
  for.

- I patched notmuch to sync the TRASHED flag. Yes, deleting is a thing
  if you use multiple clients. Would you consider accepting a patch for
  this?

- gnus-alias actually works better than mu4e's "current focus" (which
  it's current identity mechanism). mu4e is a bit more comprehensive on
  that front, but gnus-alias is smoother, which I didn't expect.

I didn't still look at the notmuch-search sources. Do you think it would
be hard to support showing individual ids only? Looks like it's easy to
do from the cli, but might require too many conditions in the source.

mu4e on the other hand offers a guile interface that can be used for
filtering, so I'm not sure which is easier to do :P (implementing afew
with guile, or tweaking notmuch search results).

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-11 15:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-04 15:39 Flat search and threaded views Yuri D'Elia
2016-08-04 16:33 ` Jani Nikula
2016-08-04 17:21   ` Yuri D'Elia
2016-08-11 15:54     ` Yuri D'Elia
2016-08-04 16:37 ` Jani Nikula
2016-08-04 17:33 ` Matt Armstrong

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).