On 21/02/09 12:23PM, Cameron Simpson wrote:
On 08Feb2021 17:17, boB Stepp <robertvst...@gmail.com> wrote:
My online research into "notmuch" does not seem to be giving my expected
results.  My _expectations_ going into this were that with "notmuch" I
could:

1) Open an email in Mutt.

2) Based on that email and its contents assign relevant tags to the email
via notmuch.  These tags would prove useful in the future when searching
for tagged content.

3) From within Mutt I could initiate a notmuch search across _all_ of my
mail directories.  After notmuch returns the search results I could open
any of these emails from within Mutt.

4) Et cetera.  Meaning similar types of actions initiated from *within*
Mutt.  That seems to be key.

Hmm.  I've installed notmuch and notmuch-mutt, both version 0.29.3 dated
2019-11-27 from my package manager.  I was concerned that they wouldn't
properly work with my more current Mutt 2.0.5, but so far I have not
detected any issues.  I used the macros suggested on the ArchLinux wiki I
mentioned in my earlier response to Cameron.  F8 allows me to search all
mailboxes from within Mutt.  The results show up inside a (I guess)
temporary mailbox.  I can open these and do usual Mutt-like stuff.  F9
supposedly reconstructs threads from emails scattered over multiple
mailboxes.  I haven't tested this one yet.  F6 did not do what I thought it
would do from the description.  Apparently all it does is remove the inbox
tag from all emails is the current search results.  In the man pages for
notmuch-mutt it suggests that the portion of the macro "-inbox" can be
replaced with a different tag.

I don't have a good understanding of this macro.  I will paste it in below:

macro index <F6> \
"<enter-command>set my_old_pipe_decode=\$pipe_decode
my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
<pipe-message>notmuch-mutt tag -- -inbox<enter>\
<enter-command>set pipe_decode=\$my_old_pipe_decode
wait_key=\$my_old_wait_key<enter>" \
"notmuch: remove message from inbox"

I have a question:  Can this be modified so that the user is prompted to
enter a tag name which can then be applied to all of the search results?
If yes, then that would be wonderful for what I have in mind.  Even better
would be the ability to enter multiple tags after pressing F6.

To finish up I have modified my crontab entry to run "notmuch new --quiet"
after it runs the "mbsync -a -qq" command at five minute intervals.  So far
things seem to be running well.

A perhaps better way of doing this scheduling would be the recommendations
at the ArchLinux wiki at
https://wiki.archlinux.org/index.php/Isync#Integration_with_notmuch_or_mu4e
However, this would require me to do some research on systemd, configuring
and starting services, etc.  Perhaps I'll investigate this later, but
perhaps someone more knowledgeable than me will find this link useful.

--
Wishing you only the best,

boB Stepp

Reply via email to