[emacs] getting the text part of the body programmatically

2024-05-07 Thread Alan Schmitt
Hello,

The emacs interface to notmuch is great in helping me collect messages
from a public mailing list for a newsletter. I’m trying to automate more
of it, and I wonder if there is a way to get the text of the message
body programmatically in notmuch-show-mode. This is what I am doing
currently:

(defun as/notmuch-get-body ()
  (let* ((msg (notmuch-show-get-message-properties))
 (part (notmuch-show-get-part-properties)))
(notmuch-get-bodypart-text msg part nil)))

It works, but I first have to put the cursor in the part for the
`notmuch-show-get-part-properties' to work. Is there a way to get the
text part of the body without moving the cursor (i.e., when it is still
in the headers)?

Thanks,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Tag notmuch email based on header values?

2022-10-04 Thread Alan Schmitt
Hello,

On 2022-10-04 14:04, Petter Reinholdtsen  writes:

> I would like to tag all emails with a specific header, but fail to find
> a way to do this.  Is this a missing feature in notmuch?
>
> To be specific, I want to filter out emails related to request tracker
> tickets owned by me at the time of the email.  These emails get a simple
> RFC 822 style header in each email, that look like this:
>
>   RT-Owner: myusername
>
> I tried searching for 'RT-Owner' without any success, and have read the
> normuch-search-terms(7) dokucmentation trying to find a clue.  Is there
> something obvious I am missing.

I use afew for that, with rules like this:

[HeaderMatchingFilter.1]
header = List-Id
pattern = discuss.ocaml.org|caml-list.inria.fr
tags = +caml;+lists

I only run it on new mail. If you run afew without the --new flag, I
think it applies it to all mail.

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Change notmuch-show-elide-non-matching-messages on the fly

2022-05-12 Thread Alan Schmitt
On 2022-05-12 07:44, David Bremner  writes:

>> I often do searches in long threads with
>> notmuch-show-elide-non-matching-messages locally set to t. Sometimes I
>> need to show the whole thread. Is there a function to do that, or
>> should I write my own?
>>
>
> There is notmuch-show-toggle-elide-non-matching, bound to ! in
> notmuch-show-mode.

This is perfect, thanks a lot!

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Change notmuch-show-elide-non-matching-messages on the fly

2022-05-10 Thread alan . schmitt
Hello,

I often do searches in long threads with
notmuch-show-elide-non-matching-messages locally set to t. Sometimes I
need to show the whole thread. Is there a function to do that, or should
I write my own?

Thanks,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: changing smtp server and signature depending on from address

2022-04-26 Thread Alan Schmitt
Hi,

On 2022-04-25 19:14, João Pedro  writes:

> I myself have come up with my own system, which gets the information for
> the addresses from auth-source [2]. It basically consists on an alist
> that assigns an "alias" for each address and holds its information as a
> plist.

This looks very nice, thank you for sharing. I’ll experiment with it.

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: changing smtp server and signature depending on from address

2022-04-20 Thread Alan Schmitt
Hi Dan,

On 2022-04-20 10:15, Dan Čermák  writes:

> I use gnus-alias for something like that:

Thank you for suggesting gnus-alias, it looks like a great fit.

Best,

Alan

-- 
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'INRIA.


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


changing smtp server and signature depending on from address

2022-04-20 Thread alan . schmitt
Hello,

I use several email addresses, and I would like to customize the smtp
server and the signature I use for each of them. Is there a notmuch way
of doing this? I’ve looked at
https://www.emacswiki.org/emacs/SendingMail#SmtpMail and I see that I
can set a particular header to set the smtp server, but I don’t know if
there is a feature like gnus posting styles in notmuch.

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: performance in emacs displaying a huge thread

2021-10-06 Thread Alan Schmitt
Hello,

On 2021-09-25 10:26, David Bremner  writes:

> I think it is a bug in doom or straight, or at least an assumption that
> turns out to be wrong. They are assuming the elisp is runnable from git,
> but in fact it needs to run make to create notmuch-version.el. I think
> the straight recipe could specify a ":pre-build" step to build
> notmuch-version.el. I attach a Makefile snippet that shows how to build
> the file without running configure. You'd still need make, git, and sed. 

For the record, this was fixed in doom in this commit:
https://github.com/hlissner/doom-emacs/commit/473eda795a1fcfd5562798bab6f79f72b0cebb6f

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: performance in emacs displaying a huge thread

2021-09-25 Thread Alan Schmitt
Hello,

On 2021-09-24 20:33, David Bremner  writes:

> That will teach me not to ask people to check M-x notmuch-version!

I did at the time, and it reported "0.33.1". So I investigated a bit.

If I search for the `notmuch-version' function, I find it in 
~/.emacs-configs/doom-emacs/.local/straight/repos/notmuch/emacs/notmuch-lib.el
as expected

But then, if I look up the variable `notmuch-emacs-version', it is
picked up from
/usr/share/emacs/site-lisp/notmuch-version.el

so this is why the discrepancy was not reported.

The surprising thing is that there is not file 
~/.emacs-configs/doom-emacs/.local/straight/repos/notmuch/emacs/notmuch-version.el,
just a file
~/.emacs-configs/doom-emacs/.local/straight/repos/notmuch/emacs/notmuch-version.el.tmpl
so this is probably why the global file is chosen.

I have no idea why this is happening… It could be a doom or straight
bug… If you think so as well, I will report it.

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: performance in emacs displaying a huge thread

2021-09-24 Thread Alan Schmitt
Hello David,

I found the source of the issue, and I would like to apologize because
it’s fully my fault. I’ve realized I was not using the elisp code from
the package installed using my package manager, but one installed using
straight that was pinned to an old version. I simply switched to the
release branch, and now everything works out of the box.

I’m very sorry for the time lost.

Best regards,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: performance in emacs displaying a huge thread

2021-09-22 Thread Alan Schmitt
Hello,

On 2021-09-22 11:25, Tomi Ollila  writes:

>>> e.g (set max-lisp-eval-depth 1600)
>>
>> Thank you for the suggestion. I tried with 1600, and I get a different
>> error (and the numbers are larger now).
>>
>> Debugger entered--Lisp error: (error "Variable binding depth exceeds
>> max-specpdl-size")
>
> Now it failed due to exceeding max-specpdl-size (which seems to be 1600
> by default)
>
> W/o knowing better I'd try (setq max-specpdl-size 3200) now...
>
> (further tries could be enlarging the values discussed 10-fold...)

Thank you for the suggestion!

Setting both to 3200 work for this particular thread (and it’s quite
fast too…). I’m really curious why there is that many recursive calls,
though.

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: performance in emacs displaying a huge thread

2021-09-22 Thread Alan Schmitt
On 2021-09-21 21:27, Tomi Ollila  writes:

> I'd be interested to know if changing max-lisp-eval-depth to a larger value
> made difference.
> 
> e.g (set max-lisp-eval-depth 1600)

Thank you for the suggestion. I tried with 1600, and I get a different
error (and the numbers are larger now).

Debugger entered--Lisp error: (error "Variable binding depth exceeds 
max-specpdl-size")
  notmuch-show-insert-tree((nil ((nil ((nil ((nil ...))) 394)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (...
  notmuch-show-insert-thread(((nil ((nil ((nil (...))) 394)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil ...))) 393)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (...
  notmuch-show-insert-thread(((nil ((nil ((nil (...))) 393)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil ...))) 392)

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: performance in emacs displaying a huge thread

2021-09-21 Thread Alan Schmitt
Hello,

On 2021-09-21 12:38, David Bremner  writes:

> Alan Schmitt  writes:
>
>> Thank you for bearing with me. I confirm that I can see messages at the
>> beginning of the thread using both an unthreaded search and
>> notmuch-show-only-matching-messages set to t. Unfortunately, messages
>> later in the thread still result in an error:
>>
>> Debugger entered--Lisp error: (error "Lisp nesting exceeds 
>> ‘max-lisp-eval-depth’")
>>   mapc(#f(compiled-function (tree) #) ((nil ((nil 
>> ((nil (...)) (nil ((nil ((nil nil)))
>>   notmuch-show-insert-thread(((nil ((nil ((nil (...)) (nil ((nil ((nil 
>> nil)) 197)
>>   notmuch-show-insert-tree((nil ((nil ((nil ((nil ...) (nil ((nil ((nil 
>> nil))) 196)
>
> I don't really understand how you got here. For me, if I type U from
> notmuch-search to get an unthreaded view, then  just shows the
> single message, and "notmuch-show-insert-tree" is not called.
>
> In this way I can view arbitrary messages threads of up to 1024 in
> length. I didn't test with encrypted messages, maybe that changes
> something.

I can view a thread with more than 7000 messages (with
show-only-matching-messages to t) if they are not encrypted. In fact I
already could with 0.32 if I remember correctly. The fact that messages
are encrypted seems to matter here.

If it matters, here is the bottom of the debug stack:

  notmuch-show-insert-thread(((nil ((nil ((nil nil) (nil (... ...))) 1)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil nil) (nil ...))) 0)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil nil) (nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (... ...
  notmuch-show-insert-thread(((nil ((nil ((nil (... ...))) 0)
  #f(compiled-function (thread) #)(((nil ((nil ((nil 
(... ...
  mapc(#f(compiled-function (thread) #) (((nil ((nil 
((nil ...
  notmuch-show-insert-forestnil ((nil ((nil ...
  notmuch-show--build-buffer()
  notmuch-show("id:mr.ye1axfhsd2e.vd_os17a...@polytechnique.org")
  notmuch-tree-show-message-out()
  notmuch-tree-show-message(nil)
  funcall-interactively(notmuch-tree-show-message nil)
  call-interactively(notmuch-tree-show-message nil nil)
  command-execute(notmuch-tree-show-message)

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: performance in emacs displaying a huge thread

2021-09-21 Thread Alan Schmitt
On 2021-09-21 09:42, David Bremner  writes:

> That's not completely unexpected. The change in question only really fixes it 
> for
> unthreaded view. Try notmuch-unthreaded-from-search-current-query (bound
> to 'U' by default).

Thank you for bearing with me. I confirm that I can see messages at the
beginning of the thread using both an unthreaded search and
notmuch-show-only-matching-messages set to t. Unfortunately, messages
later in the thread still result in an error:

Debugger entered--Lisp error: (error "Lisp nesting exceeds 
‘max-lisp-eval-depth’")
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (...)) (nil ((nil ((nil nil)))
  notmuch-show-insert-thread(((nil ((nil ((nil (...)) (nil ((nil ((nil 
nil)) 197)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil ...) (nil ((nil ((nil 
nil))) 196)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil ...) (nil ((nil ((nil nil
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (... (nil ((nil (...
  notmuch-show-insert-thread(((nil ((nil ((nil (... (nil ((nil (...))) 
196)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil ...))) (nil ((nil ...))) 
195)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil ...))) (nil ((nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (...)) (nil (...
  notmuch-show-insert-thread(((nil ((nil ((nil (...)) (nil (...))) 195)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil ...) (nil ...))) 194)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil ...) (nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (... ...
  notmuch-show-insert-thread(((nil ((nil ((nil (... ...))) 194)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil ...))) 193)

I searched through our conversations and I found references to
notmuch-show-single-message, but I don’t seem to find how to set it
(it’s not known when I search for it). Has it been renamed?

Thanks,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: performance in emacs displaying a huge thread

2021-09-21 Thread Alan Schmitt
Hello,

I’m on notmuch 0.33.1 and I’m still having issues displaying messages in
long threads when the messages are encrypted. I have such a thread with
more than 600 messages, and when I do the following:
- search for the messages
- run notmuch-tree-from-search-current-query

I get an error (I only show the top of the backtrace, it’s really huge):

Debugger entered--Lisp error: (error "Lisp nesting exceeds 
‘max-lisp-eval-depth’")
  apply(concat "...")
  replace-regexp-in-string("^\\([Rr]e: *\\)+" "" "...")
  notmuch-show-strip-re("...")
  notmuch-tree-format-field("subject" "%s" (:id 
"mr.isfiqdkyzxd.glhhrezi...@polytechnique.org" :match t :excluded nil :filename 
("/home/schmitta/.Maildir/o2switch/.INBOX.DeltaChat/...") :timestamp 1629630478 
:date_relative "August 22" :tags ("encrypted") :crypto nil :headers (:Subject 
"..." :From "" :To "***" :Date "Sun, 22 Aug 
2021 11:07:58 +") :first nil :tree-status ("┬►" "╰" " " " " " " " " " " " " 
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " 
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " 
" " " " ...) :orig-tags ("encrypted")))
  notmuch-tree-format-field-list((("tree" . "%s") ("subject" . "%s")) (:id 
"mr.isfiqdkyzxd.glhhrezi...@polytechnique.org" :match t :excluded nil :filename 
("/home/schmitta/.Maildir/o2switch/.INBOX.DeltaChat/...") :timestamp 1629630478 
:date_relative "August 22" :tags ("encrypted") :crypto nil :headers (:Subject 
"..." :From "" :To "***" :Date "Sun, 22 Aug 
2021 11:07:58 +") :first nil :tree-status ("┬►" "╰" " " " " " " " " " " " " 
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " 
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " 
" " " " ...) :orig-tags ("encrypted")))
  notmuch-tree-format-field((("tree" . "%s") ("subject" . "%s")) " %-54s " (:id 
"mr.isfiqdkyzxd.glhhrezi...@polytechnique.org" :match t :excluded nil :filename 
("/home/schmitta/.Maildir/o2switch/.INBOX.DeltaChat/...") :timestamp 1629630478 
:date_relative "August 22" :tags ("encrypted") :crypto nil :headers (:Subject 
"..." :From "" :To "***" :Date "Sun, 22 Aug 
2021 11:07:58 +") :first nil :tree-status ("┬►" "╰" " " " " " " " " " " " " 
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " 
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " 
" " " " ...) :orig-tags ("encrypted")))

I can see the earlier messages in the thread, but the later ones cannot
be shown.

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: performance in emacs displaying a huge thread

2021-08-21 Thread Alan Schmitt
On 2021-08-20 09:55, David Bremner  writes:

> The commit I mentioned is not in 0.32.3.

Ah, sorry, I thought a release included what was in master at that time.
I guess I should wait for 0.33?

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: performance in emacs displaying a huge thread

2021-08-20 Thread Alan Schmitt
Hello,

On 2021-08-01 23:11, David Bremner  writes:

> With commit 37f84d6d2 (only in master currently), much larger threads
> should be displayable in unthreaded view, e.g using M-x
> notmuch-unthreaded

I just updated to 0.32.3, and I confirm a message is displayed quite
fast (if I set notmuch-show-only-matching-messages to t). However, if I
choose a message too deep in the thread, I get an error 

show-insert-thread: Lisp nesting exceeds ‘max-lisp-eval-depth’

and the message is not displayed.

After experimenting a bit, it seems this is happening when the messages
in the thread are encrypted. I don’t seem to be able to reproduce this
error with messages that are not encrypted.

Could something special be happening with long threads of encrypted
messages?

Thanks,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: notmuch-tag failing on trailing space

2021-08-16 Thread Alan Schmitt
Hello,

On 2021-07-27 10:24, alan.schm...@polytechnique.org writes:

> I have an issue when using the vertico completion system to add tags to
> messages that boils down to the following: the notmuch-tag function is
> called like this:
>   notmuch-tag("id:CA+b3G33ad9PX5SuOwqaWS8TWBTtZcdguKtcQ3XmPvzSCsU..." ("+cwn 
> "))
> and it fails because of the extra space at the end.
>
> Could notmuch-tag be modified to accept trailing spaces?

Someone on the doom discord suggested the following workaround.

#+begin_src emacs-lisp
  (defun trim-tag-changes (args)
(list (car args) (mapcar #'s-trim-right (cadr args
  (advice-add 'notmuch-tag :filter-args #'trim-tag-changes)
#+end_src

Could it be integrated directly in the notmuch-tag function?

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


notmuch-tag failing on trailing space

2021-07-27 Thread alan . schmitt
Hello,

I have an issue when using the vertico completion system to add tags to
messages that boils down to the following: the notmuch-tag function is
called like this:
  notmuch-tag("id:CA+b3G33ad9PX5SuOwqaWS8TWBTtZcdguKtcQ3XmPvzSCsU..." ("+cwn "))
and it fails because of the extra space at the end.

Could notmuch-tag be modified to accept trailing spaces?

Thanks,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: show a single message in a huge thread

2021-06-03 Thread Alan Schmitt
Hello,

On 2021-06-02 09:18, David Bremner  writes:

> The code I posted worked fine for me for one message from a thread of
> 323 messages.

The thread that used to crash (before your patch) was from DeltaChat,
which is an email-based chat app. The thread it produces are like lists
more than trees. So I guess the depth of the tree is what matters.

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: First attempt at a fix for single message display deep in thread

2021-06-03 Thread Alan Schmitt
Hello,

On 2021-06-02 20:31, David Bremner  writes:

> Alan, if you can test this, it would be great. You just need a copy of
> the source, and to apply the following two patches. You can use
> devel/try-emacs-mua to run the patched emacs front-end.

Since the changes are small, I tested it the following way: I copied and
manually applied the patch to the two functions modified, and I
evaluated them. And it works! Thanks a lot.

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: show a single message in a huge thread

2021-06-02 Thread Alan Schmitt
Hello,

On 2021-06-01 15:33, David Bremner  writes:

>> Is this a bug of notmuch-emacs? Is there a way to display a single
>> message independently of its context?
>>
>
> I'm not sure what the best UI is, but here is a start:
>
> (defun notmuch-show-single-message (query)
>   (interactive "sQuery: ")
>   (message query)
>   (let ((notmuch-show-indent-messages-width 0)
> (notmuch-show-only-matching-messages t))
> (notmuch-show query)))

Thank you for the suggestion, unfortunately I get a very similar error.
I found the id of the message I want, and when I run this function, I
get this backtrace.

Debugger entered--Lisp error: (error "Lisp nesting exceeds 
‘max-lisp-eval-depth’")
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil ...))) (nil ((nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (...)) (nil (...
  notmuch-show-insert-thread(((nil ((nil ((nil (...)) (nil (...))) 195)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil ...) (nil ...))) 194)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil ...) (nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (... ...
  notmuch-show-insert-thread(((nil ((nil ((nil (... ...))) 194)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil ...))) 193)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (...
  notmuch-show-insert-thread(((nil ((nil ((nil (...))) 193)

  …many line elided…

  notmuch-show-insert-tree((nil ((nil ((nil nil) (nil ((nil ...) (nil 
nil))) 1)
  #f(compiled-function (tree) #)((nil ((nil ((nil nil) 
(nil ((nil ...) (nil nil
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil nil) (nil (... ...
  notmuch-show-insert-thread(((nil ((nil ((nil nil) (nil (... ...))) 1)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil nil) (nil ...))) 0)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil nil) (nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (... ...
  notmuch-show-insert-thread(((nil ((nil ((nil (... ...))) 0)
  #f(compiled-function (thread) #)(((nil ((nil ((nil 
(... ...
  mapc(#f(compiled-function (thread) #) (((nil ((nil 
((nil ...
  notmuch-show-insert-forestnil ((nil ((nil ...
  notmuch-show--build-buffer()
  notmuch-show("id:mr.mcs31ym4nf_.pqmximnh...@petitepomme.net")
  (let ((notmuch-show-indent-messages-width 0) 
(notmuch-show-only-matching-messages t)) (notmuch-show query))
  notmuch-show-single-message("id:mr.mcs31ym4nf_.pqmximnh...@petitepomme.net")
  funcall-interactively(notmuch-show-single-message 
"id:mr.mcs31ym4nf_.pqmximnh...@petitepomme.net")
  call-interactively(notmuch-show-single-message record nil)
  command-execute(notmuch-show-single-message record)

This seems to be the same problem as when hitting RET on a tree-view
buffer. Some huge forest is built, instead of showing the single
message. (Or maybe the forest is built before deciding to show only the
message, but there is a stack overflow before that.)

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: show a single message in a huge thread

2021-06-01 Thread Alan Schmitt
Hello,

On 2021-05-28 16:16, Alan Schmitt  writes:

> Thank you for the suggestion. Here is what I did:
> - run the search
> - execute notmuch-tree-from-search-current-query
> - hit RET on a message deep in the thread
> - I get this error
>
> Debugger entered--Lisp error: (error "Lisp nesting exceeds 
> ‘max-lisp-eval-depth’")

Is this a bug of notmuch-emacs? Is there a way to display a single
message independently of its context?

Thanks,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: show a single message in a huge thread

2021-05-28 Thread Alan Schmitt
Hello,

On 2021-05-28 09:37, David Bremner  writes:

> Did you try M-x notuch-tree ?
>
> It displays messages one at a time.
>
> Starting from notmuch-search-mode, you could
>
> - use Z to switch to tree mode, then select the message you
>   want.
>
> - If that is too tedious, use 'z' to search for something more precise,
>   and report the results in tree-mode.

Thank you for the suggestion. Here is what I did:
- run the search
- execute notmuch-tree-from-search-current-query
- hit RET on a message deep in the thread
- I get this error

Debugger entered--Lisp error: (error "Lisp nesting exceeds 
‘max-lisp-eval-depth’")
  mapc(#f(compiled-function (tree) #) ((nil nil)))
  notmuch-show-insert-thread(((nil nil)) 247)
  notmuch-show-insert-tree((nil ((nil nil))) 246)
  #f(compiled-function (tree) #)((nil ((nil nil
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
nil))) (nil ((nil ((nil nil) (nil (... ...
  notmuch-show-insert-thread(((nil ((nil nil))) (nil ((nil ((nil nil) (nil (... 
...))) 246)
  notmuch-show-insert-tree((nil ((nil ((nil nil))) (nil ((nil ((nil nil) (nil 
...))) 245)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
nil))) (nil ((nil ((nil nil) (nil ...
  mapc(#f(compiled-function (tree) #) ((nil nil) (nil 
((nil ((nil nil))) (nil ((nil (... ...
  notmuch-show-insert-thread(((nil nil) (nil ((nil ((nil nil))) (nil ((nil (... 
...))) 245)
  ...many lines elided...
  notmuch-show-insert-tree((nil ((nil nil) (nil ((nil ((nil ...))) (nil 
nil) 2)
  #f(compiled-function (tree) #)((nil ((nil nil) (nil 
((nil ((nil ...))) (nil nil))
  mapc(#f(compiled-function (tree) #) ((nil ((nil nil) 
(nil ((nil (...)) (nil nil)))
  notmuch-show-insert-thread(((nil ((nil nil) (nil ((nil (...)) (nil nil)) 
2)
  notmuch-show-insert-tree((nil ((nil ((nil nil) (nil ((nil ...) (nil 
nil))) 1)
  #f(compiled-function (tree) #)((nil ((nil ((nil nil) 
(nil ((nil ...) (nil nil
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil nil) (nil (... ...
  notmuch-show-insert-thread(((nil ((nil ((nil nil) (nil (... ...))) 1)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil nil) (nil ...))) 0)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil nil) (nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (... ...
  notmuch-show-insert-thread(((nil ((nil ((nil (... ...))) 0)
  #f(compiled-function (thread) #)(((nil ((nil ((nil 
(... ...
  mapc(#f(compiled-function (thread) #) (((nil ((nil 
((nil ...
  notmuch-show-insert-forestnil ((nil ((nil ...
  notmuch-show--build-buffer()
  notmuch-show("id:mr.mcs31ym4nf_.pqmximnh...@petitepomme.net")
  notmuch-tree-show-message-in()
  notmuch-tree-show-message(nil)
  funcall-interactively(notmuch-tree-show-message nil)
  call-interactively(notmuch-tree-show-message nil nil)
  command-execute(notmuch-tree-show-message)

I’m afraid I may have an option asking for the context (as a big forest
is built), but I don’t know which one or how to disable it.

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


show a single message in a huge thread

2021-05-28 Thread alan . schmitt
Hello,

I want to see a message in a huge thread (too big for notmuch to
display). To find it, I switch to unthreaded mode, I select the message
(I hit RET), but then notmuch tries to show all the other messages as
well (which makes it hang as the thread is too big, and one of the
message results in an error "symbolp: Lisp nesting exceeds
‘max-lisp-eval-depth’", which prevents later messages from being
displayed).

I tried doing C-u RET, but I immediately get a similar error:
"notmuch-show-insert-thread: Lisp nesting exceeds
‘max-lisp-eval-depth’".

Is there a way to view a single message from a thread?

Thanks,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: backing up tags

2021-03-26 Thread Alan Schmitt
Hello,

On 2021-03-26 15:31, Martin Jambor  writes:

> On Fri, Mar 26 2021, Alan Schmitt wrote:
>> Hello,
>>
>> I do not include my (huge, more than 5GB) notmuch database in backups,
>> as it can be recreated from the email files… with one exception: tags.
>> So I’m wondering if there is a way to backup these tags (and only the
>> tags) with the hope it would be much smaller. Do you know ways to do it?
>>
>
> I believe that "notmuch dump" is supposed to do exactly that.  At least
> I hope so because that is how I am backing up my email tags :-)

Thank you for the suggestion, I’ll have a look. Someone also privately
suggested https://framagit.org/manu/notmuch-tools, which can be used for
tags synchronization.

Thanks again,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


backing up tags

2021-03-26 Thread Alan Schmitt
Hello,

I do not include my (huge, more than 5GB) notmuch database in backups,
as it can be recreated from the email files… with one exception: tags.
So I’m wondering if there is a way to backup these tags (and only the
tags) with the hope it would be much smaller. Do you know ways to do it?

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Folder+tags

2020-12-24 Thread Alan Schmitt
On 2020-12-23 12:53, "inwit"  writes:

> What I would like to, then, is to use notmuch-el to read and classify my
> mail. And the functionality I'm missing at the moment is a way to move
> an email from the inbox to its corresponding folder, hopefully updating
> its folder tags at the same time. That is: I would (mb)sync my mail from
> my company's IMAP server to my Maildir folder structure, then I'd go to
> the Inbox tag/folder, I'd read my mail and then, by hitting Shift+m, for
> example, I'd be able to move that precise email, both in files and tags,
> to its corresponding Maildir folder, so my next call to mbsync actually
> moves the message in the IMAP server folders as well.  Does that make
> sense?  Does anyone know how would I get to something like that?

To move mail I use afew in move mode
(https://afew.readthedocs.io/en/latest/move_mode.html). I use it to move
deleted messages to the trash, and old email to an archive folder. I
guess it could work in your case.

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: listing all the tags I've been using

2020-11-20 Thread Alan Schmitt
On 2020-11-20 15:33, Kim Minh Kaplan  writes:

> Alan Schmitt writes:
>
>> I would like to list all
>> the tags I've used. Is there a way to do it?
>
> notmuch search --output=tags '*'

Thanks a lot Ralph and Kim. For the record, I refined Ralph's solution
to:

notmuch dump | tail -n +2 | gawk -F '--' '{print $1}' | gawk -F ' ' '{ for(i=1; 
i<=NF; i+=1) {printf "%s\n", $i;}}' | sort -u

which I can now happily throw away ;)

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


listing all the tags I've been using

2020-11-20 Thread Alan Schmitt
Hello,

I'm trying to document the tags I'm using for notmuch and make sure I
have not introduced duplication or typos. So I would like to list all
the tags I've used. Is there a way to do it?

Thanks,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Signing messages with emacs 27.1

2020-08-13 Thread Alan Schmitt
On 2020-08-13 08:52, David Bremner  writes:

> I _think_ it's a change in message-mode. Does it work for you if you set
> mml-secure-openpgp-sign-with-sender?
>
> (or smime, if using smime)

I had changed smime, as it was suggested by the error message, so I now
just set openpgp (as it's what I'm using). And I can report that it
works. I don't know why I need this additional variable, but it's great
news.

Thanks a lot for the help!

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Signing messages with emacs 27.1

2020-08-13 Thread Alan Schmitt
Hello,

I just updated to emacs 27.1, and I'm wondering if this is why I no
longer can sign messages. I get the error "Couldn’t find any signer
names."

I tried debugging it, and it seems that the problem is that
`mml-secure-epg-encrypt' cannot find the name of the sender
((message-options-get 'message-sender) returns nil).

Is it a problem with notmuch, or should I looks elsewhere?

Thanks,

Alan
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: performance in emacs displaying a huge thread

2020-02-15 Thread Alan Schmitt
Hello,

On 2020-01-15 21:15, Örjan Ekeberg  writes:

> I have a vague recollection that someone pointed out that it is the
> indentation that takes most of the time and that turning off indentation
> speeds up the display of huge threads.

I've been trying this by setting:

  (setq notmuch-show-indent-messages-width 0)
  (setq-default notmuch-show-indent-content nil)

but huge threads still take forever to show. Are there other settings
I should try?

Thanks,

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


Re: performance in emacs displaying a huge thread

2020-01-15 Thread Alan Schmitt
Hi Örjan,

On 2020-01-15 21:15, Örjan Ekeberg  writes:

> I think opening the thread with C-U RET instead of RET does exactly
> that, i.e. only shows the matching messages.
>
> In less extreme cases, using tree view (ALT-RET) may be an option since
> it does not have to format the contents of the entire thread.

Both work great, thanks. I did not think of using a universal argument.

> I have a vague recollection that someone pointed out that it is the
> indentation that takes most of the time and that turning off indentation
> speeds up the display of huge threads.

I'll give it a try. Thanks again,

Alan

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


performance in emacs displaying a huge thread

2020-01-15 Thread Alan Schmitt
Hello,

I have some performance issues when displaying a huge thread, like this:

September 07 [13/5767] 

It takes forever to display (I've waited a few minutes and it was still
stuck). I know it's a lot of messages, so is there a way to just display
the 13 that match? Or to limit the total number of messages displayed?

Thanks,

Alan

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


Re: email recipient not taken into account when replying?

2020-01-11 Thread Alan Schmitt
On 2020-01-08 08:59, Carl Worth  writes:

> On Wed, Jan 08 2020, Alan Schmitt wrote:
>> Is there another way to tell notmuch to use as From address the address
>> the email was sent to, if it's one of my emails?
>
> Yes. The user.other_email configuration entry should do that.
>
> For example, in ~/.notmuch-config:
>
> [user]
> name=Alan Schmitt
> primary_email=alan.schm...@polytechnique.org
> other_email=alan.schm...@inria.fr,alan.schm...@irisa.fr,presid...@lemondedujeu.org"

It works great, thanks a lot.

Best,

Alan

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


email recipient not taken into account when replying?

2020-01-08 Thread Alan Schmitt
Hello,

I sometimes receive some emails at the address
presid...@lemondedujeu.org. This email is declared as part of my
alternate emails (I do not consider this private information so I'm
posting it):

(setq message-alternative-emails
  (regexp-opt '("alan.schm...@polytechnique.org"
"alan.schm...@inria.fr"
"alan.schm...@irisa.fr"
"presid...@lemondedujeu.org")))

When I reply in emacs, notmuch uses my email in polytechnique.org. The
surprising thing is that this does not cause a problem for the email in
inria.fr (replies are sent from that address), but only for
lemondedujeu.org (I did not test irisa.fr).

Is there another way to tell notmuch to use as From address the address
the email was sent to, if it's one of my emails?

Thanks,

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


Re: Accessing the body a message programatically

2019-12-17 Thread Alan Schmitt
On 2019-12-17 09:34, David Bremner  writes:
>
> If you mean interactively for a currently displayed message, have a look
> at the function notmuch-show-current-part-handle, and the way it uses
> notmuch-show-get-{message,part}-properties.

This is great, thanks. Here is what I did:

(defun as/notmuch-get-body ()
  (let* ((msg (notmuch-show-get-message-properties))
 (part (notmuch-show-get-part-properties)))
(notmuch-get-bodypart-text msg part nil)))

>> In addition, can I get access to the List-Archive header? I could do it
>> by spawning an external process to get the raw message, but it seems a
>> bit heavy handed.
>
> there is a couple of patches by Johan Parin currently under review
> to provide a configurable set of headers. You can find them via
>
> https://nmbug.notmuchmail.org/status/#Review

I'll have a look.

Thanks again,

Alan


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


Accessing the body a message programatically

2019-12-16 Thread Alan Schmitt
Hello,

I need to extract some information from a message that is shown in
notmuch-mode, and I was able to easily get the from and subject of the
message. I now need to use the body, but I cannot find how to get it. I
assume I should use notmuch-get-bodypart-text, but I don't know how to
obtain the msg or part argument.

In addition, can I get access to the List-Archive header? I could do it
by spawning an external process to get the raw message, but it seems a
bit heavy handed.

Thanks,

Alan


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


Re: script to move messages according to tags

2019-12-11 Thread Alan Schmitt

On 2019-12-11 16:33, David Edmondson  writes:

How you decide to deal with multiple results is really up to you 
- in my
case I move/delete all of them (except that I don't actually 
delete

anything).


This is probably the key: I'm used to file-based MUA that will 
show me
duplicates. If notmuch hides them from me, I could just ignore 
that they

exist (it's not like it's taking too much space anyway…)

Best,

Alan


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


Re: script to move messages according to tags

2019-12-11 Thread Alan Schmitt

Hello Örjan,

On 2019-12-11 13:58, Örjan Ekeberg  writes:

Below is the script that I use which does more-or-less what you 
are

asking for.


Thank you very much, this is most helpful.

I do have one small question: how do you deal with mails that have
duplicates? For instance, when I send a mail to a mailing list, I 
end up
with both the sent email and the one I later receive from the 
list. If I
tag the send one with deleted (no need to keep it), won't I run 
the risk

to delete both mails?

(Maybe I'm dealing with sent mails in a wrong way… I don't know 
what

notmuch best practice is in that case.)

Thanks,

Alan


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


script to move messages according to tags

2019-12-10 Thread Alan Schmitt

Hello,

I'm considering switching to notmuch, but there are two use cases 
for
which I need to move messages around between folders. After 
reading
https://notmuchmail.org/excluding/, it seems the recommended 
approach is
to use a tag to flag such messages, then to use a script to move 
the
messages. Has someone written such a script that I could copy and 
adapt?


My use cases are:
- find files with a deleted flag not in the Trash and move them to 
 the

Trash
- find files with an archive flag in my active mail store and move 
 them

to my local mail store

I think this should not be too complicated, but I'm worried about
searches returning related messages that should not be moved 
(especially

when deleting messages).

Best,

Alan


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


Re: using notmuch programmatically from emacs

2014-07-21 Thread Alan Schmitt
On 2014-07-18 21:40, David Bremner da...@tethera.net writes:

 Alan Schmitt alan.schm...@polytechnique.org writes:

 Hello,

 I sometimes have to find a message knowing only its message id. I know
 how to use a notmuch search in emacs to find the message, then use
 another function to display it in gnus, but I would like to do it
 directly without going through the *notmuch-search* buffer.

 Right now I'm doing the following:

 #+begin_src emacs-lisp
   (defun as/msgid-to-gnus (msgid)
 Search for the MSGID using notmuch, then open the message with
   gnus.
 (let ((file (shell-command-to-string (concat notmuch search 
 --output=files 'id: msgid '

 The structured output formats (sexp, json) include file names, so you
 should be able to use something like the following

 (defun notmuch-query-get-message-filenames (rest search-terms)
   Return a list of message-ids of messages that match SEARCH-TERMS
   (notmuch-query-map-threads
(lambda (msg) (plist-get msg :filename))
(notmuch-query-get-threads search-terms)))

 This is based on the example at the bottom of notmuch-query.el

Thanks a lot, this put me on the right track. I had to slightly modify
your example as it returns every message in the thread (and not just
the matching one). So I first test for id, and the filter the list to
return only the matching message. Here is the code I wrote.

#+begin_src emacs-lisp
  (defun notmuch-query-get-message-filenames (msgid)
Return the message filename where the message id matches MSGID
  and `nil' if no such message is found
(car (remove nil
 (notmuch-query-map-threads
  (lambda (msg) (if (equal (plist-get msg :id) msgid)
(plist-get msg :filename)
  nil))
  (notmuch-query-get-threads (list (concat id: msgid)))
#+end_src

Thanks again,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


pgp1Rehx6kQ73.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


using notmuch programmatically from emacs

2014-07-18 Thread Alan Schmitt
Hello,

I sometimes have to find a message knowing only its message id. I know
how to use a notmuch search in emacs to find the message, then use
another function to display it in gnus, but I would like to do it
directly without going through the *notmuch-search* buffer.

Right now I'm doing the following:

#+begin_src emacs-lisp
  (defun as/msgid-to-gnus (msgid)
"Search for the MSGID using notmuch, then open the message with
  gnus."
(let ((file (shell-command-to-string (concat "notmuch search --output=files 
'id:" msgid "'"
  (gnus-summary-read-group (notmuch-file-to-group file))
  (gnus-summary-refer-article msgid)))
#+end_src

(the `notmuch-file-to-group' function takes a file name and finds the
corresponding gnus group).

Is there a way to do the same thing using notmuch.el functionality
(i.e., without having to do the `shell-command-to-string' myself)?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: 



using notmuch programmatically from emacs

2014-07-18 Thread Alan Schmitt
Hello,

I sometimes have to find a message knowing only its message id. I know
how to use a notmuch search in emacs to find the message, then use
another function to display it in gnus, but I would like to do it
directly without going through the *notmuch-search* buffer.

Right now I'm doing the following:

#+begin_src emacs-lisp
  (defun as/msgid-to-gnus (msgid)
Search for the MSGID using notmuch, then open the message with
  gnus.
(let ((file (shell-command-to-string (concat notmuch search --output=files 
'id: msgid '
  (gnus-summary-read-group (notmuch-file-to-group file))
  (gnus-summary-refer-article msgid)))
#+end_src

(the `notmuch-file-to-group' function takes a file name and finds the
corresponding gnus group).

Is there a way to do the same thing using notmuch.el functionality
(i.e., without having to do the `shell-command-to-string' myself)?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


pgpjBiH0lJEsG.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


excluding files from a folder for searches

2014-07-17 Thread Alan Schmitt
On 2014-07-17 11:38, David Bremner  writes:

> Alan Schmitt  writes:
>
>> By the way, how will notmuch realize that the messages are no longer
>> there? Does it still scan the directory when it's in new.ignore?
>
> No, I think you'll have to do something manual like remove the directory
> from the ignore list, move the directory out of the way, an re-run
> notmuch new.

That worked great, thanks a lot!

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20140717/82ecf0f6/attachment.pgp>


excluding files from a folder for searches

2014-07-17 Thread Alan Schmitt
On 2014-07-16 21:10, David Bremner  writes:

>> I'm trying to configure notmuch such that it never searches for files in
>> my Trash folder. I have found in the configuration how to exclude some
>> tags from every search, but not how to exclude a folder.
>>
>> Is it possible?
>
> One thing you can do is mark the trash folder to be ignored by 
> notmuch new. See the new.ignore setting in man notmuch-config(1).

Thank you for the suggestion, I've added ".Trash" to this list. As the
current messages will be deleted in about a week, it should be fine.

By the way, how will notmuch realize that the messages are no longer
there? Does it still scan the directory when it's in new.ignore?

Thanks again,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: 



Re: excluding files from a folder for searches

2014-07-17 Thread Alan Schmitt
On 2014-07-16 21:10, David Bremner da...@tethera.net writes:

 I'm trying to configure notmuch such that it never searches for files in
 my Trash folder. I have found in the configuration how to exclude some
 tags from every search, but not how to exclude a folder.

 Is it possible?

 One thing you can do is mark the trash folder to be ignored by 
 notmuch new. See the new.ignore setting in man notmuch-config(1).

Thank you for the suggestion, I've added .Trash to this list. As the
current messages will be deleted in about a week, it should be fine.

By the way, how will notmuch realize that the messages are no longer
there? Does it still scan the directory when it's in new.ignore?

Thanks again,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


pgpqxn4H0ZOOV.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: excluding files from a folder for searches

2014-07-17 Thread Alan Schmitt
On 2014-07-17 11:38, David Bremner da...@tethera.net writes:

 Alan Schmitt alan.schm...@polytechnique.org writes:

 By the way, how will notmuch realize that the messages are no longer
 there? Does it still scan the directory when it's in new.ignore?

 No, I think you'll have to do something manual like remove the directory
 from the ignore list, move the directory out of the way, an re-run
 notmuch new.

That worked great, thanks a lot!

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


pgpsafrubK_Tc.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


excluding files from a folder for searches

2014-07-16 Thread Alan Schmitt
Hello,

I'm trying to configure notmuch such that it never searches for files in
my Trash folder. I have found in the configuration how to exclude some
tags from every search, but not how to exclude a folder.

Is it possible?

Thanks a lot,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


pgpK3fyn_sF6D.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch