~rjarry/aerc#160: 
Aerc incorrectly handles notmuch queries

  1. Do tag: +foo on one of your messages in Aerc.

  2. Put

    [query]
    foo = tag:foo
    

    in your notmuch config file.

  3. Run (expected results are shown)

    $ notmuch count tag:foo
    1
    $ notmuch count query:foo
    1
    
  4. Do :cf tag:foo in Aerc. This will show the tagged message from step 1 (as expected).

  5. Do :cf query:foo in Aerc. This doesn't display the message, but I exptected it to, since the same Notmuch query does match the message.

Clearly, the behaviour of notmuch command and seach in Aerc with :cf differ. Is this a bug?

Status
REPORTED
Submitter
~ph14nix
Assigned to
No-one
Submitted
1 year, 9 months ago
Updated
9 months ago
Labels
bug notmuch

~rockorager 1 year, 8 months ago

This is because aerc is not loading your notmuch config. A notmuch config is strictly a configuration for use with the notmuch CLI, which aerc doesn't interact with at all.

There are basically only two benefits we'd have by loading the config: we'd get saved queries and we'd get excluded tags. I'm not sure if people would prefer doing that or not.

~ph14nix 1 year, 8 months ago

It makes sense now, thanks for clarifying!

There are basically only two benefits we'd have by loading the config: we'd get saved queries and we'd get excluded tags. I'm not sure if people would prefer doing that or not.

One argument for doing this is that multiple programs that use notmuch as a backend will have the same view of it. Say, if a Neomutt + Notmuch user is just trying out Aerc + Notmuch while still maintaining her old Neomutt setup. And Neomutt's notmuch backend already respects notmuch config.

Many people use notmuch cli for sorting and automaticall tagging emails. So making sure queries between Aerc and cli work identically can help their workflow a lot (alternative: is there a way to make notmuch cli ignore the config and make it work like Aerc?). It will reduce their debugging effort, and allow to carefully craft a query in Aerc and then copy-paste it into their notmuch tag invocation.

What are the arguments against supporting notmuch config?

If we're not loading notmuch config (or while we are discussing this) would it make sense to document the current behavior somewhere? I feel that there's more people like me who will expect all programs that use notmuch to behave exactly like notmuch cli does. I've never seen either aerc or notmuch configs say that.

~ferdinandyb 9 months ago

I'm actually unsure what is against supporting it. Also unsure why this issue has gone without comments for a year ...

And I think the only way to make notmuch behave like aerc would be to create an alternative config file, that only specifies the database path, without the other stuff.

Register here or Log in to comment, or comment via email.