unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* notmuch-search not excluding excluded tags
@ 2024-04-15 17:59 Richard Stanton
  2024-04-16 14:23 ` David Bremner
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Stanton @ 2024-04-15 17:59 UTC (permalink / raw)
  To: notmuch

I have spam and trash defined as excluded tags for notmuch searches and when I run (at the command line) the command

notmuch search tag:unread

I get a list of unread messages that does *not* include unread spam or trash emails. But when I put the following into my *scratch* buffer and execute it:

(notmuch-search “tag:unread”)

I now get ALL unread messages, including those tagged as spam or trash. Am I missing something?

Thanks.

Richard Stanton
\r

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

* Re: notmuch-search not excluding excluded tags
  2024-04-15 17:59 notmuch-search not excluding excluded tags Richard Stanton
@ 2024-04-16 14:23 ` David Bremner
  2024-04-16 19:00   ` Richard H. Stanton
  2024-05-20 19:24   ` erik colson
  0 siblings, 2 replies; 13+ messages in thread
From: David Bremner @ 2024-04-16 14:23 UTC (permalink / raw)
  To: Richard Stanton, notmuch

Richard Stanton <rhstanton@berkeley.edu> writes:

> I have spam and trash defined as excluded tags for notmuch searches and when I run (at the command line) the command
>
> notmuch search tag:unread
>
> I get a list of unread messages that does *not* include unread spam or trash emails. But when I put the following into my *scratch* buffer and execute it:
>
> (notmuch-search “tag:unread”)
>
> I now get ALL unread messages, including those tagged as spam or trash. Am I missing something?

Hi Richard;

As for as I know it _should_ work (modulo the curly quotes being invalid
syntax). I don't have any real hypothesis for what is going wrong, but a
few ideas for gather data.

1) As a start, maybe try evaluating

        (notmuch-config-get "search.exclude_tags")

in emacs and make sure it matches the corresponding

   notmuch config get search.exclude_tags

2) If possible, run notmuch with a minimal configuration (i.e. just loading
notmuch, no personal configuration or other packages). There is a script
./devel/try-emacs-mua in the source if you have a self-built notmuch.\r

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

* Re: notmuch-search not excluding excluded tags
  2024-04-16 14:23 ` David Bremner
@ 2024-04-16 19:00   ` Richard H. Stanton
  2024-04-16 22:15     ` Richard H. Stanton
  2024-05-20 19:24   ` erik colson
  1 sibling, 1 reply; 13+ messages in thread
From: Richard H. Stanton @ 2024-04-16 19:00 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

Thanks, David.

It all seems to be working fine on my work machine! 

I can’t decide if that’s good or bad news… I suspect it’ll take me longer to track down what’s going on than if the behavior were consistent on my two machines.

> On Apr 16, 2024, at 7:23 AM, David Bremner <david@tethera.net> wrote:
> 
> Richard Stanton <rhstanton@berkeley.edu> writes:
> 
>> I have spam and trash defined as excluded tags for notmuch searches and when I run (at the command line) the command
>> 
>> notmuch search tag:unread
>> 
>> I get a list of unread messages that does *not* include unread spam or trash emails. But when I put the following into my *scratch* buffer and execute it:
>> 
>> (notmuch-search “tag:unread”)
>> 
>> I now get ALL unread messages, including those tagged as spam or trash. Am I missing something?
> 
> Hi Richard;
> 
> As for as I know it _should_ work (modulo the curly quotes being invalid
> syntax). I don't have any real hypothesis for what is going wrong, but a
> few ideas for gather data.
> 
> 1) As a start, maybe try evaluating
> 
>        (notmuch-config-get "search.exclude_tags")
> 
> in emacs and make sure it matches the corresponding
> 
>   notmuch config get search.exclude_tags
> 
> 2) If possible, run notmuch with a minimal configuration (i.e. just loading
> notmuch, no personal configuration or other packages). There is a script
> ./devel/try-emacs-mua in the source if you have a self-built notmuch.
\r

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

* Re: notmuch-search not excluding excluded tags
  2024-04-16 19:00   ` Richard H. Stanton
@ 2024-04-16 22:15     ` Richard H. Stanton
  2024-04-16 22:22       ` Richard H. Stanton
  0 siblings, 1 reply; 13+ messages in thread
From: Richard H. Stanton @ 2024-04-16 22:15 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

Oh, wait… It's not working on my office machine either. I’ll start tracing things and see what happens.

By the way,

(notmuch-config-get "search.exclude_tags”)

returns

"spam
trash"

which is what it should be returning.

> On Apr 16, 2024, at 12:00 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
> 
> Thanks, David.
> 
> It all seems to be working fine on my work machine! 
> 
> I can’t decide if that’s good or bad news… I suspect it’ll take me longer to track down what’s going on than if the behavior were consistent on my two machines.
> 
>> On Apr 16, 2024, at 7:23 AM, David Bremner <david@tethera.net> wrote:
>> 
>> Richard Stanton <rhstanton@berkeley.edu> writes:
>> 
>>> I have spam and trash defined as excluded tags for notmuch searches and when I run (at the command line) the command
>>> 
>>> notmuch search tag:unread
>>> 
>>> I get a list of unread messages that does *not* include unread spam or trash emails. But when I put the following into my *scratch* buffer and execute it:
>>> 
>>> (notmuch-search “tag:unread”)
>>> 
>>> I now get ALL unread messages, including those tagged as spam or trash. Am I missing something?
>> 
>> Hi Richard;
>> 
>> As for as I know it _should_ work (modulo the curly quotes being invalid
>> syntax). I don't have any real hypothesis for what is going wrong, but a
>> few ideas for gather data.
>> 
>> 1) As a start, maybe try evaluating
>> 
>>       (notmuch-config-get "search.exclude_tags")
>> 
>> in emacs and make sure it matches the corresponding
>> 
>>  notmuch config get search.exclude_tags
>> 
>> 2) If possible, run notmuch with a minimal configuration (i.e. just loading
>> notmuch, no personal configuration or other packages). There is a script
>> ./devel/try-emacs-mua in the source if you have a self-built notmuch.
> 
\r

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

* Re: notmuch-search not excluding excluded tags
  2024-04-16 22:15     ` Richard H. Stanton
@ 2024-04-16 22:22       ` Richard H. Stanton
  2024-04-16 22:40         ` Richard H. Stanton
  0 siblings, 1 reply; 13+ messages in thread
From: Richard H. Stanton @ 2024-04-16 22:22 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

Running 

(notmuch-search "tag:unread" t t)

gives the correct results, so it looks like notmuch-search-hide-excluded is not getting set to the correct default value.

> On Apr 16, 2024, at 3:15 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
> 
> Oh, wait… It's not working on my office machine either. I’ll start tracing things and see what happens.
> 
> By the way,
> 
> (notmuch-config-get "search.exclude_tags”)
> 
> returns
> 
> "spam
> trash"
> 
> which is what it should be returning.
> 
>> On Apr 16, 2024, at 12:00 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
>> 
>> Thanks, David.
>> 
>> It all seems to be working fine on my work machine! 
>> 
>> I can’t decide if that’s good or bad news… I suspect it’ll take me longer to track down what’s going on than if the behavior were consistent on my two machines.
>> 
>>> On Apr 16, 2024, at 7:23 AM, David Bremner <david@tethera.net> wrote:
>>> 
>>> Richard Stanton <rhstanton@berkeley.edu> writes:
>>> 
>>>> I have spam and trash defined as excluded tags for notmuch searches and when I run (at the command line) the command
>>>> 
>>>> notmuch search tag:unread
>>>> 
>>>> I get a list of unread messages that does *not* include unread spam or trash emails. But when I put the following into my *scratch* buffer and execute it:
>>>> 
>>>> (notmuch-search “tag:unread”)
>>>> 
>>>> I now get ALL unread messages, including those tagged as spam or trash. Am I missing something?
>>> 
>>> Hi Richard;
>>> 
>>> As for as I know it _should_ work (modulo the curly quotes being invalid
>>> syntax). I don't have any real hypothesis for what is going wrong, but a
>>> few ideas for gather data.
>>> 
>>> 1) As a start, maybe try evaluating
>>> 
>>>      (notmuch-config-get "search.exclude_tags")
>>> 
>>> in emacs and make sure it matches the corresponding
>>> 
>>> notmuch config get search.exclude_tags
>>> 
>>> 2) If possible, run notmuch with a minimal configuration (i.e. just loading
>>> notmuch, no personal configuration or other packages). There is a script
>>> ./devel/try-emacs-mua in the source if you have a self-built notmuch.
>> 
> 
\r

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

* Re: notmuch-search not excluding excluded tags
  2024-04-16 22:22       ` Richard H. Stanton
@ 2024-04-16 22:40         ` Richard H. Stanton
  2024-04-16 22:53           ` Richard H. Stanton
  0 siblings, 1 reply; 13+ messages in thread
From: Richard H. Stanton @ 2024-04-16 22:40 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

I used edebug to trace through the execution of notmuch-search in notmuch.el.

At line 1096, we have the code

	(let ((proc (notmuch-start-notmuch
		     "notmuch-search" buffer #'notmuch-search-process-sentinel
		     "search" "--format=sexp" "--format-version=5"
		     (if oldest-first
			 "--sort=oldest-first"
		       "--sort=newest-first")
		     (if hide-excluded
			 "--exclude=true"
		       "--exclude=false")
		     query)))

I think the problem is the line

(If hide-excluded

This is the (optional) argument passed to notmuch-search. If it was not passed, this test fails and “—exclude=false” gets selected. I think we’re testing the wrong variable here. It looks like it should be 

(If  notmuch-search-hide-excluded

instead, since this variable is set to its default value if no argument is passed to notmuch-search.

[Similarly with the preceding test for oldest-first, I think.]





> On Apr 16, 2024, at 3:22 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
> 
> Running 
> 
> (notmuch-search "tag:unread" t t)
> 
> gives the correct results, so it looks like notmuch-search-hide-excluded is not getting set to the correct default value.
> 
>> On Apr 16, 2024, at 3:15 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
>> 
>> Oh, wait… It's not working on my office machine either. I’ll start tracing things and see what happens.
>> 
>> By the way,
>> 
>> (notmuch-config-get "search.exclude_tags”)
>> 
>> returns
>> 
>> "spam
>> trash"
>> 
>> which is what it should be returning.
>> 
>>> On Apr 16, 2024, at 12:00 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
>>> 
>>> Thanks, David.
>>> 
>>> It all seems to be working fine on my work machine! 
>>> 
>>> I can’t decide if that’s good or bad news… I suspect it’ll take me longer to track down what’s going on than if the behavior were consistent on my two machines.
>>> 
>>>> On Apr 16, 2024, at 7:23 AM, David Bremner <david@tethera.net> wrote:
>>>> 
>>>> Richard Stanton <rhstanton@berkeley.edu> writes:
>>>> 
>>>>> I have spam and trash defined as excluded tags for notmuch searches and when I run (at the command line) the command
>>>>> 
>>>>> notmuch search tag:unread
>>>>> 
>>>>> I get a list of unread messages that does *not* include unread spam or trash emails. But when I put the following into my *scratch* buffer and execute it:
>>>>> 
>>>>> (notmuch-search “tag:unread”)
>>>>> 
>>>>> I now get ALL unread messages, including those tagged as spam or trash. Am I missing something?
>>>> 
>>>> Hi Richard;
>>>> 
>>>> As for as I know it _should_ work (modulo the curly quotes being invalid
>>>> syntax). I don't have any real hypothesis for what is going wrong, but a
>>>> few ideas for gather data.
>>>> 
>>>> 1) As a start, maybe try evaluating
>>>> 
>>>>     (notmuch-config-get "search.exclude_tags")
>>>> 
>>>> in emacs and make sure it matches the corresponding
>>>> 
>>>> notmuch config get search.exclude_tags
>>>> 
>>>> 2) If possible, run notmuch with a minimal configuration (i.e. just loading
>>>> notmuch, no personal configuration or other packages). There is a script
>>>> ./devel/try-emacs-mua in the source if you have a self-built notmuch.
>>> 
>> 
> 
\r

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

* Re: notmuch-search not excluding excluded tags
  2024-04-16 22:40         ` Richard H. Stanton
@ 2024-04-16 22:53           ` Richard H. Stanton
  2024-04-17  8:33             ` Richard Stanton
  0 siblings, 1 reply; 13+ messages in thread
From: Richard H. Stanton @ 2024-04-16 22:53 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

Actually, I think the code might be working as intended. Calling notmuch-search interactively things work just fine, and in the comments I see the note 

"When called interactively, this will prompt for a query and use the configured default sort order.”

This sounds like it deliberately ignores the default settings when the function is called non-interactively, but why…?





> On Apr 16, 2024, at 3:40 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
> 
> I used edebug to trace through the execution of notmuch-search in notmuch.el.
> 
> At line 1096, we have the code
> 
> (let ((proc (notmuch-start-notmuch
>     "notmuch-search" buffer #'notmuch-search-process-sentinel
>     "search" "--format=sexp" "--format-version=5"
>     (if oldest-first
> "--sort=oldest-first"
>       "--sort=newest-first")
>     (if hide-excluded
> "--exclude=true"
>       "--exclude=false")
>     query)))
> 
> I think the problem is the line
> 
> (If hide-excluded
> 
> This is the (optional) argument passed to notmuch-search. If it was not passed, this test fails and “—exclude=false” gets selected. I think we’re testing the wrong variable here. It looks like it should be 
> 
> (If  notmuch-search-hide-excluded
> 
> instead, since this variable is set to its default value if no argument is passed to notmuch-search.
> 
> [Similarly with the preceding test for oldest-first, I think.]
> 
> 
> 
> 
> 
>> On Apr 16, 2024, at 3:22 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
>> 
>> Running 
>> 
>> (notmuch-search "tag:unread" t t)
>> 
>> gives the correct results, so it looks like notmuch-search-hide-excluded is not getting set to the correct default value.
>> 
>>> On Apr 16, 2024, at 3:15 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
>>> 
>>> Oh, wait… It's not working on my office machine either. I’ll start tracing things and see what happens.
>>> 
>>> By the way,
>>> 
>>> (notmuch-config-get "search.exclude_tags”)
>>> 
>>> returns
>>> 
>>> "spam
>>> trash"
>>> 
>>> which is what it should be returning.
>>> 
>>>> On Apr 16, 2024, at 12:00 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
>>>> 
>>>> Thanks, David.
>>>> 
>>>> It all seems to be working fine on my work machine! 
>>>> 
>>>> I can’t decide if that’s good or bad news… I suspect it’ll take me longer to track down what’s going on than if the behavior were consistent on my two machines.
>>>> 
>>>>> On Apr 16, 2024, at 7:23 AM, David Bremner <david@tethera.net> wrote:
>>>>> 
>>>>> Richard Stanton <rhstanton@berkeley.edu> writes:
>>>>> 
>>>>>> I have spam and trash defined as excluded tags for notmuch searches and when I run (at the command line) the command
>>>>>> 
>>>>>> notmuch search tag:unread
>>>>>> 
>>>>>> I get a list of unread messages that does *not* include unread spam or trash emails. But when I put the following into my *scratch* buffer and execute it:
>>>>>> 
>>>>>> (notmuch-search “tag:unread”)
>>>>>> 
>>>>>> I now get ALL unread messages, including those tagged as spam or trash. Am I missing something?
>>>>> 
>>>>> Hi Richard;
>>>>> 
>>>>> As for as I know it _should_ work (modulo the curly quotes being invalid
>>>>> syntax). I don't have any real hypothesis for what is going wrong, but a
>>>>> few ideas for gather data.
>>>>> 
>>>>> 1) As a start, maybe try evaluating
>>>>> 
>>>>>    (notmuch-config-get "search.exclude_tags")
>>>>> 
>>>>> in emacs and make sure it matches the corresponding
>>>>> 
>>>>> notmuch config get search.exclude_tags
>>>>> 
>>>>> 2) If possible, run notmuch with a minimal configuration (i.e. just loading
>>>>> notmuch, no personal configuration or other packages). There is a script
>>>>> ./devel/try-emacs-mua in the source if you have a self-built notmuch.
>>>> 
>>> 
>> 
> 
\r

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

* Re: notmuch-search not excluding excluded tags
  2024-04-16 22:53           ` Richard H. Stanton
@ 2024-04-17  8:33             ` Richard Stanton
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Stanton @ 2024-04-17  8:33 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

In case anyone else is affected by this, the problem I was having was that notmuch-search org links (defined in ol-notmuch.el) were returning results that included spam and trash messages even though I had asked to exclude these. To get around this, redefine org-notmuch-search-open to explicitly pass some additional options to notmuch-search:

(defun org-notmuch-search-open (path _)
  "Follow a notmuch search link specified by PATH."
  (notmuch-search path notmuch-search-oldest-first notmuch-search-hide-excluded))


> On Apr 16, 2024, at 3:53 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
> 
> Actually, I think the code might be working as intended. Calling notmuch-search interactively things work just fine, and in the comments I see the note 
> 
> "When called interactively, this will prompt for a query and use the configured default sort order.”
> 
> This sounds like it deliberately ignores the default settings when the function is called non-interactively, but why…?
> 
> 
> 
> 
> 
>> On Apr 16, 2024, at 3:40 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
>> 
>> I used edebug to trace through the execution of notmuch-search in notmuch.el.
>> 
>> At line 1096, we have the code
>> 
>> (let ((proc (notmuch-start-notmuch
>>    "notmuch-search" buffer #'notmuch-search-process-sentinel
>>    "search" "--format=sexp" "--format-version=5"
>>    (if oldest-first
>> "--sort=oldest-first"
>>      "--sort=newest-first")
>>    (if hide-excluded
>> "--exclude=true"
>>      "--exclude=false")
>>    query)))
>> 
>> I think the problem is the line
>> 
>> (If hide-excluded
>> 
>> This is the (optional) argument passed to notmuch-search. If it was not passed, this test fails and “—exclude=false” gets selected. I think we’re testing the wrong variable here. It looks like it should be 
>> 
>> (If  notmuch-search-hide-excluded
>> 
>> instead, since this variable is set to its default value if no argument is passed to notmuch-search.
>> 
>> [Similarly with the preceding test for oldest-first, I think.]
>> 
>> 
>> 
>> 
>> 
>>> On Apr 16, 2024, at 3:22 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
>>> 
>>> Running 
>>> 
>>> (notmuch-search "tag:unread" t t)
>>> 
>>> gives the correct results, so it looks like notmuch-search-hide-excluded is not getting set to the correct default value.
>>> 
>>>> On Apr 16, 2024, at 3:15 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
>>>> 
>>>> Oh, wait… It's not working on my office machine either. I’ll start tracing things and see what happens.
>>>> 
>>>> By the way,
>>>> 
>>>> (notmuch-config-get "search.exclude_tags”)
>>>> 
>>>> returns
>>>> 
>>>> "spam
>>>> trash"
>>>> 
>>>> which is what it should be returning.
>>>> 
>>>>> On Apr 16, 2024, at 12:00 PM, Richard H. Stanton <rhstanton@berkeley.edu> wrote:
>>>>> 
>>>>> Thanks, David.
>>>>> 
>>>>> It all seems to be working fine on my work machine! 
>>>>> 
>>>>> I can’t decide if that’s good or bad news… I suspect it’ll take me longer to track down what’s going on than if the behavior were consistent on my two machines.
>>>>> 
>>>>>> On Apr 16, 2024, at 7:23 AM, David Bremner <david@tethera.net> wrote:
>>>>>> 
>>>>>> Richard Stanton <rhstanton@berkeley.edu> writes:
>>>>>> 
>>>>>>> I have spam and trash defined as excluded tags for notmuch searches and when I run (at the command line) the command
>>>>>>> 
>>>>>>> notmuch search tag:unread
>>>>>>> 
>>>>>>> I get a list of unread messages that does *not* include unread spam or trash emails. But when I put the following into my *scratch* buffer and execute it:
>>>>>>> 
>>>>>>> (notmuch-search “tag:unread”)
>>>>>>> 
>>>>>>> I now get ALL unread messages, including those tagged as spam or trash. Am I missing something?
>>>>>> 
>>>>>> Hi Richard;
>>>>>> 
>>>>>> As for as I know it _should_ work (modulo the curly quotes being invalid
>>>>>> syntax). I don't have any real hypothesis for what is going wrong, but a
>>>>>> few ideas for gather data.
>>>>>> 
>>>>>> 1) As a start, maybe try evaluating
>>>>>> 
>>>>>>   (notmuch-config-get "search.exclude_tags")
>>>>>> 
>>>>>> in emacs and make sure it matches the corresponding
>>>>>> 
>>>>>> notmuch config get search.exclude_tags
>>>>>> 
>>>>>> 2) If possible, run notmuch with a minimal configuration (i.e. just loading
>>>>>> notmuch, no personal configuration or other packages). There is a script
>>>>>> ./devel/try-emacs-mua in the source if you have a self-built notmuch.
>>>>> 
>>>> 
>>> 
>> 
> 
\r

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

* Re: notmuch-search not excluding excluded tags
  2024-04-16 14:23 ` David Bremner
  2024-04-16 19:00   ` Richard H. Stanton
@ 2024-05-20 19:24   ` erik colson
  2024-05-21  0:51     ` David Bremner
  1 sibling, 1 reply; 13+ messages in thread
From: erik colson @ 2024-05-20 19:24 UTC (permalink / raw)
  To: notmuch

David Bremner <david@tethera.net> writes:

> Richard Stanton <rhstanton@berkeley.edu> writes:
>
>> I have spam and trash defined as excluded tags for notmuch searches and when I run (at the command line) the command
>>
>> notmuch search tag:unread
>>
>> I get a list of unread messages that does *not* include unread spam or trash emails. But when I put the following into my *scratch* buffer and execute it:
>>
>> (notmuch-search “tag:unread”)
>>
>> I now get ALL unread messages, including those tagged as spam or trash. Am I missing something?

Hi,

I recently upgraded from an older version in which excluded tags in the
notmuch config were nicely hidden.  Now I have exactly the same problem
as Stanton described.  I can see notmuch-search-hide-excluded is set
globally to t, but in every search buffer it seems to be set to nil.  I
can't figure what code I should change for thi to work as before..

thx
-- 
erik colson - T:0475.83.75.66
BEAVER NV/SA - BE0417.279.944
Woluwelaan 8 - 1831 Diegem\r

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

* Re: notmuch-search not excluding excluded tags
  2024-05-20 19:24   ` erik colson
@ 2024-05-21  0:51     ` David Bremner
  2024-05-21  8:22       ` erik colson
  0 siblings, 1 reply; 13+ messages in thread
From: David Bremner @ 2024-05-21  0:51 UTC (permalink / raw)
  To: erik colson, notmuch

erik colson <erik.colson@beavernet.be> writes:
> Hi,
>
> I recently upgraded from an older version in which excluded tags in the
> notmuch config were nicely hidden.  Now I have exactly the same problem
> as Stanton described.  I can see notmuch-search-hide-excluded is set
> globally to t, but in every search buffer it seems to be set to nil.  I
> can't figure what code I should change for thi to work as before..

It might matter how you are setting notmuch-search-hide-excluded. It
is buffer-local (that changed recently, I think) so you need to either
use customize or setq-default.

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

* Re: notmuch-search not excluding excluded tags
  2024-05-21  0:51     ` David Bremner
@ 2024-05-21  8:22       ` erik colson
  2024-05-21 13:32         ` David Bremner
  0 siblings, 1 reply; 13+ messages in thread
From: erik colson @ 2024-05-21  8:22 UTC (permalink / raw)
  To: David Bremner, notmuch

David Bremner <david@tethera.net> writes:

> It might matter how you are setting notmuch-search-hide-excluded. It
> is buffer-local (that changed recently, I think) so you need to either
> use customize or setq-default.

Hi,

Thanks for the hint, but tried setting the var with setq-default, but
still same issue.. :

  notmuch-search-hide-excluded is a variable defined in ‘notmuch-lib.el’.
  
  Its value is nil
  Original value was t
  Local in buffer *notmuch-saved-tree-1week and unread*; global value is t
  
  Hide mail tagged with a excluded tag.

-- 
erik colson - T:0475.83.75.66
BEAVER NV/SA - BE0417.279.944
Woluwelaan 8 - 1831 Diegem\r

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

* Re: notmuch-search not excluding excluded tags
  2024-05-21  8:22       ` erik colson
@ 2024-05-21 13:32         ` David Bremner
  2024-05-21 16:22           ` richardhstanton
  0 siblings, 1 reply; 13+ messages in thread
From: David Bremner @ 2024-05-21 13:32 UTC (permalink / raw)
  To: erik colson, notmuch

erik colson <erik.colson@beavernet.be> writes:

>
> Thanks for the hint, but tried setting the var with setq-default, but
> still same issue.. :
>
>   notmuch-search-hide-excluded is a variable defined in ‘notmuch-lib.el’.
>   
>   Its value is nil
>   Original value was t
>   Local in buffer *notmuch-saved-tree-1week and unread*; global value is t
>   
>   Hide mail tagged with a excluded tag.
>

Hmm. I can't duplicate that here. Can you try with a minimal
configuration? If you have the source you can run "./devel/try-emacs-mua
-q" to run without any personal configuration.

Another thing to try is to hit "i" in a search view and see if it
toggles properly.
\r

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

* Re: notmuch-search not excluding excluded tags
  2024-05-21 13:32         ` David Bremner
@ 2024-05-21 16:22           ` richardhstanton
  0 siblings, 0 replies; 13+ messages in thread
From: richardhstanton @ 2024-05-21 16:22 UTC (permalink / raw)
  To: David Bremner; +Cc: erik colson, notmuch

I added the following definitions to my init.el file, which seems to solve the problem:

(defun org-notmuch-search-open (path _)
  "Follow a notmuch search link specified by PATH."
  (notmuch-search path notmuch-search-oldest-first notmuch-search-hide-excluded))


(defun notmuch-search-default(path)
  "Add default options to notmuch-search"
  (notmuch-search path notmuch-search-oldest-first notmuch-search-hide-excluded))


> On May 21, 2024, at 6:32 AM, David Bremner <david@tethera.net> wrote:
> 
> erik colson <erik.colson@beavernet.be> writes:
> 
>> 
>> Thanks for the hint, but tried setting the var with setq-default, but
>> still same issue.. :
>> 
>>  notmuch-search-hide-excluded is a variable defined in ‘notmuch-lib.el’.
>> 
>>  Its value is nil
>>  Original value was t
>>  Local in buffer *notmuch-saved-tree-1week and unread*; global value is t
>> 
>>  Hide mail tagged with a excluded tag.
>> 
> 
> Hmm. I can't duplicate that here. Can you try with a minimal
> configuration? If you have the source you can run "./devel/try-emacs-mua
> -q" to run without any personal configuration.
> 
> Another thing to try is to hit "i" in a search view and see if it
> toggles properly.
> 
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
\r

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

end of thread, other threads:[~2024-05-21 16:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-15 17:59 notmuch-search not excluding excluded tags Richard Stanton
2024-04-16 14:23 ` David Bremner
2024-04-16 19:00   ` Richard H. Stanton
2024-04-16 22:15     ` Richard H. Stanton
2024-04-16 22:22       ` Richard H. Stanton
2024-04-16 22:40         ` Richard H. Stanton
2024-04-16 22:53           ` Richard H. Stanton
2024-04-17  8:33             ` Richard Stanton
2024-05-20 19:24   ` erik colson
2024-05-21  0:51     ` David Bremner
2024-05-21  8:22       ` erik colson
2024-05-21 13:32         ` David Bremner
2024-05-21 16:22           ` richardhstanton

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).