* converting from nmh: how to?
@ 2022-12-05 4:06 Greg Minshall
2022-12-05 8:10 ` inwit
2022-12-05 14:42 ` David Bremner
0 siblings, 2 replies; 6+ messages in thread
From: Greg Minshall @ 2022-12-05 4:06 UTC (permalink / raw)
To: notmuch
hi. apologies if this is an FAQ.
i'm exploring notmuch (via the emacs front-end). i have 1.2M e-mail
messages sorted into 200 or so nmh folders. (*)
after running `notmuch new`, i end up with 1.2M "unread" messages, all
in "inbox".
i would like to end up with the "inbox" tag applied only to messages
actually in my nmh +inbox folder; messages from *other* nmh folders
should end up with a tag derived from that folder name.
and, i would like to have the "unread" tag only apply to messages that
nmh thinks are unseen.
(iiuc, nmh keeps track of unseen messages in ".mh_sequences" local to
each nmh folder; i don't think i care about any other sequences,
including "cur", in any of the ".mh_sequences" files.)
is there a known procedure for accomplishing this? or, thoughts on
same?
cheers, Greg
(*) for the record, i use mpop and msmtp to receive and send e-mail, and
run things through procmail to sort mail into folders. (and, another
procmail script to refile messages from, e.g., +inbox to some other
folder.)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: converting from nmh: how to?
2022-12-05 4:06 converting from nmh: how to? Greg Minshall
@ 2022-12-05 8:10 ` inwit
2022-12-05 13:54 ` Greg Minshall
2022-12-05 14:42 ` David Bremner
1 sibling, 1 reply; 6+ messages in thread
From: inwit @ 2022-12-05 8:10 UTC (permalink / raw)
To: Greg Minshall, notmuch
Maybe afew [0] is what you're looking for.
[0] https://github.com/afewmail/afew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: converting from nmh: how to?
2022-12-05 8:10 ` inwit
@ 2022-12-05 13:54 ` Greg Minshall
0 siblings, 0 replies; 6+ messages in thread
From: Greg Minshall @ 2022-12-05 13:54 UTC (permalink / raw)
To: inwit; +Cc: notmuch
> Maybe afew [0] is what you're looking for.
thanks, that certainly gives me something to chew over.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: converting from nmh: how to?
2022-12-05 4:06 converting from nmh: how to? Greg Minshall
2022-12-05 8:10 ` inwit
@ 2022-12-05 14:42 ` David Bremner
2022-12-06 0:59 ` Greg Minshall
1 sibling, 1 reply; 6+ messages in thread
From: David Bremner @ 2022-12-05 14:42 UTC (permalink / raw)
To: Greg Minshall, notmuch
Greg Minshall <minshall@umich.edu> writes:
> hi. apologies if this is an FAQ.
>
> i'm exploring notmuch (via the emacs front-end). i have 1.2M e-mail
> messages sorted into 200 or so nmh folders. (*)
>
> after running `notmuch new`, i end up with 1.2M "unread" messages, all
> in "inbox".
>
> i would like to end up with the "inbox" tag applied only to messages
> actually in my nmh +inbox folder; messages from *other* nmh folders
> should end up with a tag derived from that folder name.
If I remember how mh works you should be able to use something like
notmuch tag -inbox '*'
notmuch tag +inbox path:relative/path/to/inbox/folder
you may want to use "notmuch dump > backup.tags" before some bold experiments.
> and, i would like to have the "unread" tag only apply to messages that
> nmh thinks are unseen.
>
> (iiuc, nmh keeps track of unseen messages in ".mh_sequences" local to
> each nmh folder; i don't think i care about any other sequences,
> including "cur", in any of the ".mh_sequences" files.)
>
> is there a known procedure for accomplishing this? or, thoughts on
> same?
notmuch does not index filenames, so that makes things a bit more
challenging. With a little scripting, you could extract the message-id
for message 'n' and pass that to notmuch. I'd probably write a python
script (and use the 'notmuch2' module), but it's doable as a shell
script also (given some hack to extract the message-id).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: converting from nmh: how to?
2022-12-05 14:42 ` David Bremner
@ 2022-12-06 0:59 ` Greg Minshall
2022-12-06 1:11 ` David Bremner
0 siblings, 1 reply; 6+ messages in thread
From: Greg Minshall @ 2022-12-06 0:59 UTC (permalink / raw)
To: David Bremner; +Cc: notmuch
David,
> notmuch tag -inbox '*'
> notmuch tag +inbox path:relative/path/to/inbox/folder
also, thanks. i need to spend more time with =man
notmuch-search-terms=.
> you may want to use "notmuch dump > backup.tags" before some bold
> experiments.
a question: i'm still starting, experimenting, and i assume at some
point i will throw my accumulated notmuch database away, and do a "new"
to re-build from scratch. given that, are there any dangers i should
worry about while experimenting boldly?
cheers, Greg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: converting from nmh: how to?
2022-12-06 0:59 ` Greg Minshall
@ 2022-12-06 1:11 ` David Bremner
0 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2022-12-06 1:11 UTC (permalink / raw)
To: Greg Minshall; +Cc: notmuch
Greg Minshall <minshall@umich.edu> writes:
> David,
>
>> notmuch tag -inbox '*'
>> notmuch tag +inbox path:relative/path/to/inbox/folder
>
> also, thanks. i need to spend more time with =man
> notmuch-search-terms=.
>
>> you may want to use "notmuch dump > backup.tags" before some bold
>> experiments.
>
> a question: i'm still starting, experimenting, and i assume at some
> point i will throw my accumulated notmuch database away, and do a "new"
> to re-build from scratch. given that, are there any dangers i should
> worry about while experimenting boldly?
Not that I can think of. But it's nice if throwing everything away is a
choice, rather than something forced upon you.
d
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-12-06 1:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-05 4:06 converting from nmh: how to? Greg Minshall
2022-12-05 8:10 ` inwit
2022-12-05 13:54 ` Greg Minshall
2022-12-05 14:42 ` David Bremner
2022-12-06 0:59 ` Greg Minshall
2022-12-06 1:11 ` David Bremner
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).