* ANNOUNCE: nottoomuch-addresses.pl
@ 2011-12-01 15:36 Tomi Ollila
2011-12-01 18:38 ` Bart Bunting
` (5 more replies)
0 siblings, 6 replies; 23+ messages in thread
From: Tomi Ollila @ 2011-12-01 15:36 UTC (permalink / raw)
To: notmuch
In addition to http://notmuchmail.org/emacstips/#index11h2
and Jani's 'goobook' in id:"87zkfuh3i0.fsf@nikula.org"
you can now also use
http://www.iki.fi/too/nottoomuch/nottoomuch-addresses.pl
for your address completion needs when composing mail/reply.
This program is 1) easy to install and 2) pretty fast to use
when completing.
How to install
1) Download the program from above url on the machine you're running
notmuch and find suitable location to it.
2) Verify it's sha1 checksum is 125f3917b3f2dc68bdf30af04ab623d53321e50c
3) chmod 755 /path/to/nottoomuch-addresses.pl
4) Run /path/to/nottoomuch-addresses.pl --update
When run first time this gathers email addresses from all of your mail.
This may take a long while to complete -- depends on the amount of email
you have. Further --updates are much faster as those just take addresses
from new mail.
5) Test that it works: Run /path/to/nottoomuch-addresses.pl notmuchmail
6) In case you're using emacs mua with notmuch, edit your notmuch
configuration for emacs with the following content:
(require 'notmuch-address)
(setq notmuch-address-command "/path/to/nottoomuch-addresses.pl")
(notmuch-address-message-insinuate)
7) Restart emacs notmuch mua (or eval above lines) and start composing
new mail. When adding recipient to To: field. press <TAB> after 3
or more characters have been added. In case you get 2 or more address
matches, use arrow keys in minibuffer to choose desired recipient...
8) Enjoy!
/path/to/nottoomuch-addresses.pl --help provides more detailed information.
BR,
Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: ANNOUNCE: nottoomuch-addresses.pl
2011-12-01 15:36 ANNOUNCE: nottoomuch-addresses.pl Tomi Ollila
@ 2011-12-01 18:38 ` Bart Bunting
2011-12-02 7:37 ` Tomi Ollila
2012-01-18 7:14 ` ANNOUNCE: nottoomuch-addresses.sh 2.0 Tomi Ollila
` (4 subsequent siblings)
5 siblings, 1 reply; 23+ messages in thread
From: Bart Bunting @ 2011-12-01 18:38 UTC (permalink / raw)
To: Tomi Ollila, notmuch
Hi Tomi,
I have had a quick try of setting up nottoomuch-addresses addresses.
Here are a couple of issues I have hit and I think it's still not quite
right.
I attach the shell output from emacs below.
- firstly it appears that if the term is set to DUMB then the script
assumes it's being called from emacs and exits if there is no search
string. This is problematic for me as I run all my stuff including the
--update command from a shell.
- The instructions don't tell you to create the .config/nottoomuch
directory. Perhaps you could check for it's existance and create if
required?
- Even when I got this far I had an odd result when running the script
as shown below. First time I got a strange error. Second run it added
900 or so addresses. Subsiquent runs added no more addresses. I find
this strange as I have over 180k emails.
Anyway great work. Heading in a cool direction. Hope this somewhat
rambling report helps.
Bart
bart@bit:~$
bart@bit:~$shasum ~/bin/nottoomuch-addresses.pl
125f3917b3f2dc68bdf30af04ab623d53321e50c /Users/bart/bin/nottoomuch-addresses.pl
bart@bit:~$chmod 755 ~/bin/nottoomuch-addresses.pl
bart@bit:~$~/bin/nottoomuch-addresses.pl --update
Cannot open database, maybe not created yet.
run /Users/bart/bin/nottoomuch-addresses.pl --update from command line first.
bart@bit:~$cd
bart@bit:~$cd .config
bash: cd: .config: No such file or directory
bart@bit:~$
bart@bit:~$mkdir .config
bart@bit:~$nottoomuch --update
bash: nottoomuch: command not found
bart@bit:~$~/bin/nottoomuch-addresses.pl --update
Cannot open database, maybe not created yet.
run /Users/bart/bin/nottoomuch-addresses.pl --update from command line first.
bart@bit:~$
bart@bit:~$cd
bart@bit:~$cd .config
bart@bit:~/.config$mkdir nottoomuch
bart@bit:~/.config$
bart@bit:~/.config$~/bin/nottoomuch-addresses.pl --update
Cannot open database, maybe not created yet.
run /Users/bart/bin/nottoomuch-addresses.pl --update from command line first.
bart@bit:~/.config$cd nottoomuch/
bart@bit:~/.config/nottoomuch$touch addresses
bart@bit:~/.config/nottoomuch$~/bin/nottoomuch-addresses.pl --update
bart@bit:~/.config/nottoomuch$ls
addresses
bart@bit:~/.config/nottoomuch$ls -s addresses
0 addresses
bart@bit:~/.config/nottoomuch$echo $TERM
dumb
bart@bit:~/.config/nottoomuch$export TERM=emacs
bart@bit:~/.config/nottoomuch$ls -s addresses
0 addresses
bart@bit:~/.config/nottoomuch$~/bin/nottoomuch-addresses.pl --update
Updating '/Users/bart/.config/nottoomuch/addresses', since -604800.
Unrecognized option: -604800..
Added 0 addresses in 0 seconds. Total number of addresses: 0.
bart@bit:~/.config/nottoomuch$~/bin/nottoomuch-addresses.pl --update
Updating '/Users/bart/.config/nottoomuch/addresses', since 1322159542.
Added 993 addresses in 4 seconds. Total number of addresses: 993.
bart@bit:~/.config/nottoomuch$~/bin/nottoomuch-addresses.pl --update
Updating '/Users/bart/.config/nottoomuch/addresses', since 1322159560.
Added 0 addresses in 1 seconds. Total number of addresses: 993.
bart@bit:~/.config/nottoomuch$ On Thu, 01 Dec 2011 17:36:24 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: ANNOUNCE: nottoomuch-addresses.pl
2011-12-01 18:38 ` Bart Bunting
@ 2011-12-02 7:37 ` Tomi Ollila
2011-12-05 11:51 ` Tomi Ollila
0 siblings, 1 reply; 23+ messages in thread
From: Tomi Ollila @ 2011-12-02 7:37 UTC (permalink / raw)
To: Bart Bunting, Tomi Ollila, notmuch
On Fri, 02 Dec 2011 05:38:01 +1100, Bart Bunting <bart@ursys.com.au> wrote:
> Hi Tomi,
>
> I have had a quick try of setting up nottoomuch-addresses addresses.
>
> Here are a couple of issues I have hit and I think it's still not quite
> right.
>
> I attach the shell output from emacs below.
>
> - firstly it appears that if the term is set to DUMB then the script
> assumes it's being called from emacs and exits if there is no search
> string. This is problematic for me as I run all my stuff including the
> --update command from a shell.
Good point. I'll remove that 'optimization' -- mysterious are the ways
users run commands :) (Well, I occasionally run commands from emacs
myself, too).
You could try removing part '''$ENV{TERM} eq 'dumb' or ''' in line 25
> - The instructions don't tell you to create the .config/nottoomuch
> directory. Perhaps you could check for it's existance and create if
> required?
It does that (in line 91):
mv .config .xconfig
~/mail/nottoomuch/nottoomuch-addresses.pl --update
Creating '/home/too/.config/nottoomuch/addresses'. This may take some time...
Added 3335 addresses in 14 seconds. Total number of addresses: 3335.
It seems your other problems make it seem the directories are not created,
however I check this...
> - Even when I got this far I had an odd result when running the script
> as shown below. First time I got a strange error. Second run it added
> 900 or so addresses. Subsiquent runs added no more addresses. I find
> this strange as I have over 180k emails.
Haa, the ls output '0 addresses' tells me something:
rm .config/nottoomuch/addresses
touch .config/nottoomuch/addresses
guru$ ~/mail/nottoomuch/nottoomuch-addresses.pl --update
Updating '/home/too/.config/nottoomuch/addresses', since -604800.
Unrecognized option: -604800..
Added 0 addresses in 0 seconds. Total number of addresses: 0.
> Anyway great work. Heading in a cool direction. Hope this somewhat
> rambling report helps.
Thanks a lot for your bug report, it's been very helpful. please retry
doing the following:
TERM=emacs /Users/bart/bin/nottoomuch-addresses.pl --update --rebuild
And report if you get more problems.
> Bart
Tomi
>
> bart@bit:~$
> bart@bit:~$shasum ~/bin/nottoomuch-addresses.pl
> 125f3917b3f2dc68bdf30af04ab623d53321e50c /Users/bart/bin/nottoomuch-addresses.pl
> bart@bit:~$chmod 755 ~/bin/nottoomuch-addresses.pl
> bart@bit:~$~/bin/nottoomuch-addresses.pl --update
> Cannot open database, maybe not created yet.
> run /Users/bart/bin/nottoomuch-addresses.pl --update from command line first.
> bart@bit:~$cd
> bart@bit:~$cd .config
> bash: cd: .config: No such file or directory
> bart@bit:~$
> bart@bit:~$mkdir .config
> bart@bit:~$nottoomuch --update
> bash: nottoomuch: command not found
> bart@bit:~$~/bin/nottoomuch-addresses.pl --update
> Cannot open database, maybe not created yet.
> run /Users/bart/bin/nottoomuch-addresses.pl --update from command line first.
> bart@bit:~$
> bart@bit:~$cd
> bart@bit:~$cd .config
> bart@bit:~/.config$mkdir nottoomuch
> bart@bit:~/.config$
> bart@bit:~/.config$~/bin/nottoomuch-addresses.pl --update
> Cannot open database, maybe not created yet.
> run /Users/bart/bin/nottoomuch-addresses.pl --update from command line first.
> bart@bit:~/.config$cd nottoomuch/
> bart@bit:~/.config/nottoomuch$touch addresses
> bart@bit:~/.config/nottoomuch$~/bin/nottoomuch-addresses.pl --update
> bart@bit:~/.config/nottoomuch$ls
> addresses
> bart@bit:~/.config/nottoomuch$ls -s addresses
> 0 addresses
> bart@bit:~/.config/nottoomuch$echo $TERM
> dumb
> bart@bit:~/.config/nottoomuch$export TERM=emacs
> bart@bit:~/.config/nottoomuch$ls -s addresses
> 0 addresses
> bart@bit:~/.config/nottoomuch$~/bin/nottoomuch-addresses.pl --update
> Updating '/Users/bart/.config/nottoomuch/addresses', since -604800.
> Unrecognized option: -604800..
> Added 0 addresses in 0 seconds. Total number of addresses: 0.
> bart@bit:~/.config/nottoomuch$~/bin/nottoomuch-addresses.pl --update
> Updating '/Users/bart/.config/nottoomuch/addresses', since 1322159542.
> Added 993 addresses in 4 seconds. Total number of addresses: 993.
> bart@bit:~/.config/nottoomuch$~/bin/nottoomuch-addresses.pl --update
> Updating '/Users/bart/.config/nottoomuch/addresses', since 1322159560.
> Added 0 addresses in 1 seconds. Total number of addresses: 993.
> bart@bit:~/.config/nottoomuch$ On Thu, 01 Dec 2011 17:36:24 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: ANNOUNCE: nottoomuch-addresses.pl
2011-12-02 7:37 ` Tomi Ollila
@ 2011-12-05 11:51 ` Tomi Ollila
2011-12-05 12:04 ` Bart Bunting
0 siblings, 1 reply; 23+ messages in thread
From: Tomi Ollila @ 2011-12-05 11:51 UTC (permalink / raw)
To: Bart Bunting, notmuch
Hi
Thanks to Bart's findings those things are now fixed in
version 1.1 of nottoomuch-addresses.pl
Get it:
(wget) http://www.iki.fi/too/nottoomuch/nottoomuch-addresses.pl
Sha1 digest is now 4ed74ef9eaabb73804e55caa2c29682e643d2b78
Installation instructions & some other info now available at:
http://www.iki.fi/too/nottoomuch/nottoomuch-addresses/
Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: ANNOUNCE: nottoomuch-addresses.pl
2011-12-05 11:51 ` Tomi Ollila
@ 2011-12-05 12:04 ` Bart Bunting
2011-12-05 12:35 ` Tomi Ollila
0 siblings, 1 reply; 23+ messages in thread
From: Bart Bunting @ 2011-12-05 12:04 UTC (permalink / raw)
To: Tomi Ollila, notmuch
Hi Tomi,
Another observation. Not sure if this is a bug or a design decision:
I have the address:
"Zac Hamed" <zhamed@xxxxxxxxxx.xxx.au>
a serch like:
./nottoomuch-addresses.pl zham
shows it up as expected.
However if I search on the name part like:
./nottoomuch-addresses.pl zac
It doesn't find the match.
Is this expected behaviour?
Kind regards
Bart
On Mon, 05 Dec 2011 13:51:16 +0200, Tomi Ollila <tomi.ollila@nixu.com> wrote:
> Hi
>
> Thanks to Bart's findings those things are now fixed in
> version 1.1 of nottoomuch-addresses.pl
>
> Get it:
>
> (wget) http://www.iki.fi/too/nottoomuch/nottoomuch-addresses.pl
>
> Sha1 digest is now 4ed74ef9eaabb73804e55caa2c29682e643d2b78
>
> Installation instructions & some other info now available at:
>
> http://www.iki.fi/too/nottoomuch/nottoomuch-addresses/
>
>
> Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: ANNOUNCE: nottoomuch-addresses.pl
2011-12-05 12:04 ` Bart Bunting
@ 2011-12-05 12:35 ` Tomi Ollila
2011-12-05 12:55 ` Jameson Graef Rollins
0 siblings, 1 reply; 23+ messages in thread
From: Tomi Ollila @ 2011-12-05 12:35 UTC (permalink / raw)
To: Bart Bunting, notmuch
On Mon, 05 Dec 2011 23:04:43 +1100, Bart Bunting <bart@ursys.com.au> wrote:
> Hi Tomi,
>
> Another observation. Not sure if this is a bug or a design decision:
> I have the address:
> "Zac Hamed" <zhamed@xxxxxxxxxx.xxx.au>
> a serch like:
> ./nottoomuch-addresses.pl zham
>
> shows it up as expected.
>
> However if I search on the name part like:
> ./nottoomuch-addresses.pl zac
>
> It doesn't find the match.
>
> Is this expected behaviour?
Yes, the search is deliberately case sensitive. Note, however, that
email address part is (also deliberately) lowercased before address line
is added to the list...
This has suited me good so far... (maybe I need to add this to the doc)...
...(or change the behaviour it if is too confusing / more inconvenient
that convenient).
If you want to experiment with case insensitive search you could check the
line 35:
print grep { index($_, $search_str) >= 0 } <I>;
Change this to
print grep { /\Q$search_str\E/oi } <I>;
(without \Q and \E you also get regular expression matches)
>
> Kind regards
Thanks... actually I put the above change into use; let's see if it
work better for me than the other :)
>
> Bart
Tomi
>
>
>
>
> On Mon, 05 Dec 2011 13:51:16 +0200, Tomi Ollila <tomi.ollila@nixu.com> wrote:
> > Hi
> >
> > Thanks to Bart's findings those things are now fixed in
> > version 1.1 of nottoomuch-addresses.pl
> >
> > Get it:
> >
> > (wget) http://www.iki.fi/too/nottoomuch/nottoomuch-addresses.pl
> >
> > Sha1 digest is now 4ed74ef9eaabb73804e55caa2c29682e643d2b78
> >
> > Installation instructions & some other info now available at:
> >
> > http://www.iki.fi/too/nottoomuch/nottoomuch-addresses/
> >
> >
> > Tomi
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: ANNOUNCE: nottoomuch-addresses.pl
2011-12-05 12:35 ` Tomi Ollila
@ 2011-12-05 12:55 ` Jameson Graef Rollins
2011-12-05 21:45 ` Bart Bunting
0 siblings, 1 reply; 23+ messages in thread
From: Jameson Graef Rollins @ 2011-12-05 12:55 UTC (permalink / raw)
To: Tomi Ollila, Bart Bunting, notmuch
[-- Attachment #1: Type: text/plain, Size: 429 bytes --]
On Mon, 05 Dec 2011 14:35:03 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> Yes, the search is deliberately case sensitive.
I haven't had a chance to play around with this but I will say that it
makes more sense to me that this kind of search should deliberately be
case *in*sensitive. Case sensitivity seems fairly detrimental here,
actually, considering there is no consistency in case in names or email
addresses.
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: ANNOUNCE: nottoomuch-addresses.pl
2011-12-05 12:55 ` Jameson Graef Rollins
@ 2011-12-05 21:45 ` Bart Bunting
2011-12-06 4:43 ` Bart Bunting
2011-12-06 22:03 ` Tomi Ollila
0 siblings, 2 replies; 23+ messages in thread
From: Bart Bunting @ 2011-12-05 21:45 UTC (permalink / raw)
To: Jameson Graef Rollins, Tomi Ollila, notmuch
Hi,
I agree with Jamie on this one.
The case sensitivity appears to get in the way of searching. I also
think that enabling the regular expression searching is a good idea.
All in all though this is great.
The only other idea I have, which is only half formed, is that it would
be nice to prioritize emails that are more important than others.
I'm not sure exactly how this would work but something like:
- Addresses I have actualy sent email to rather than jjust received from
get a high priority in the result.
- Addresses that have sent me email directly rather than just to a list
get next priority.
- All other emails after that.
Also some sort of weighting within the groups to do with frequency of
emails sent or something.
Does that make sense? Would it be hard to implement?
Cheers
Bart
> On Mon, 05 Dec 2011 14:35:03 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> > Yes, the search is deliberately case sensitive.
>
> I haven't had a chance to play around with this but I will say that it
> makes more sense to me that this kind of search should deliberately be
> case *in*sensitive. Case sensitivity seems fairly detrimental here,
> actually, considering there is no consistency in case in names or email
> addresses.
>
> jamie.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: ANNOUNCE: nottoomuch-addresses.pl
2011-12-05 21:45 ` Bart Bunting
@ 2011-12-06 4:43 ` Bart Bunting
2011-12-06 22:03 ` Tomi Ollila
1 sibling, 0 replies; 23+ messages in thread
From: Bart Bunting @ 2011-12-06 4:43 UTC (permalink / raw)
To: Tomi Ollila, notmuch
Hi Tomi,
I made the changes for case insensitivity and I much prefer that.
Perhaps it could be an option if you like it the other way around.
Kind regards
Bart
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: ANNOUNCE: nottoomuch-addresses.pl
2011-12-05 21:45 ` Bart Bunting
2011-12-06 4:43 ` Bart Bunting
@ 2011-12-06 22:03 ` Tomi Ollila
2011-12-12 16:05 ` ANNOUNCE: nottoomuch-addresses.pl version 1.3 Tomi Ollila
1 sibling, 1 reply; 23+ messages in thread
From: Tomi Ollila @ 2011-12-06 22:03 UTC (permalink / raw)
To: Bart Bunting, Jameson Graef Rollins, notmuch
On Tue, 06 Dec 2011 08:45:49 +1100, Bart Bunting <bart@ursys.com.au> wrote:
> Hi,
>
> I agree with Jamie on this one.
>
> The case sensitivity appears to get in the way of searching. I also
> think that enabling the regular expression searching is a good idea.
>
> All in all though this is great.
I did version 1.2 of nottoomuch-addresses.sh which does case insensitive
searches. Note the renaming to .sh -- it is now shell script wrapper
which runs 'exec grep -aiF "$*" <addresses-file> -- grep is locale-aware
which makes case insensitivity work outside of ASCII range. The perl code
to create/update addresses file is exactly the same as in version 1.1
So, the current version (1.2) is available at
http://www.iki.fi/too/nottoomuch/nottoomuch-addresses.sh
sha1sum is 03aa8bcf4e32d47e453fc081376843ef03a427ad and doc page is at
http://www.iki.fi/too/nottoomuch/nottoomuch-addresses/
> The only other idea I have, which is only half formed, is that it would
> be nice to prioritize emails that are more important than others.
>
> I'm not sure exactly how this would work but something like:
> - Addresses I have actualy sent email to rather than jjust received from
> get a high priority in the result.
> - Addresses that have sent me email directly rather than just to a list
> get next priority.
> - All other emails after that.
>
> Also some sort of weighting within the groups to do with frequency of
> emails sent or something.
>
> Does that make sense? Would it be hard to implement?
Neat idea. To implement the feature into program is not too hard.
Somehow determine weight for each email address, store that into
hash (key address, value weight).
Then, when writing addresses file, sort first by weight and then
ascii order. The hash is also stored to disk (using tie()) and used
when address file updated.
Now, how to determine good (generic) rules for weights (and maybe
some user-defined rules as well) is the question.
>
> Cheers
>
> Bart
Thanks,
Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* ANNOUNCE: nottoomuch-addresses.pl version 1.3
2011-12-06 22:03 ` Tomi Ollila
@ 2011-12-12 16:05 ` Tomi Ollila
2011-12-14 20:10 ` ANNOUNCE: nottoomuch-addresses.pl version 1.4 Tomi Ollila
0 siblings, 1 reply; 23+ messages in thread
From: Tomi Ollila @ 2011-12-12 16:05 UTC (permalink / raw)
To: Bart Bunting, notmuch
On Wed, 07 Dec 2011 00:03:19 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> On Tue, 06 Dec 2011 08:45:49 +1100, Bart Bunting <bart@ursys.com.au> wrote:
> > Hi,
...
>
> > The only other idea I have, which is only half formed, is that it would
> > be nice to prioritize emails that are more important than others.
> >
> > I'm not sure exactly how this would work but something like:
> > - Addresses I have actualy sent email to rather than jjust received from
> > get a high priority in the result.
> > - Addresses that have sent me email directly rather than just to a list
> > get next priority.
> > - All other emails after that.
> >
> > Also some sort of weighting within the groups to do with frequency of
> > emails sent or something.
> >
> > Does that make sense? Would it be hard to implement?
>
> Neat idea. To implement the feature into program is not too hard.
> Somehow determine weight for each email address, store that into
> hash (key address, value weight).
> Then, when writing addresses file, sort first by weight and then
> ascii order. The hash is also stored to disk (using tie()) and used
> when address file updated.
>
> Now, how to determine good (generic) rules for weights (and maybe
> some user-defined rules as well) is the question.
The latest version (1.3) now stores addresses in 'newest-first'
order to the "address file" -- the fgrep printing matches will
therefore also output the lines in this order.
For me this seems to work pretty nicely.
This version (1.3) relies notmuch show ... to output emails in
this order (which it seems to do now). If this changes I'll
have to check how to "fix" my implementation...
The program is located at the same address:
http://www.iki.fi/too/nottoomuch/nottoomuch-addresses.sh
sha1sum is f9289ed4bf9034d99e390aaf3d5fcac3d815ea20 and doc page is at
http://www.iki.fi/too/nottoomuch/nottoomuch-addresses/
> > Cheers
> >
> > Bart
>
> Thanks,
>
> Tomi
Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* ANNOUNCE: nottoomuch-addresses.pl version 1.4
2011-12-12 16:05 ` ANNOUNCE: nottoomuch-addresses.pl version 1.3 Tomi Ollila
@ 2011-12-14 20:10 ` Tomi Ollila
[not found] ` <20111216130128.E918211BC52@karen.lavabit.com>
2011-12-23 9:37 ` ANNOUNCE: nottoomuch-addresses.sh version 1.5 Tomi Ollila
0 siblings, 2 replies; 23+ messages in thread
From: Tomi Ollila @ 2011-12-14 20:10 UTC (permalink / raw)
To: notmuch
notmuch-addresses.sh -- email address substring matcher -- completion
helper version 1.4 is available.
This version uses 'notmuch search --sort=newest-first --output=files ...'
(instead of notmuch show ...) to retrieve message information from notmuch
... and now scans headers from mail files itself.
* This is now somewhat faster as the whole emails are not read.
* The sort order is better guaranteed.
* Current memory consumption of 'notmuch show --format=text' does not
hit users.
Addresses file header format is same as in 1.3 so upgrading from that
version does not cause addresses file rebuild.
Location: http://www.iki.fi/too/nottoomuch/nottoomuch-addresses.sh
Sha1sum: 871f481a229a6e3295c02fa80270a7a318d226c
Web page: http://www.iki.fi/too/nottoomuch/nottoomuch-addresses/
Note to upgraders: this version may not find as many addreses as older
ones -- those also scanned From:, To: and Cc: in message bodies.
Current version seldom leaks to the body of the message...
So, don't get alarmed if --update --rebuild finds less addresses.
Enjoy!
Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: ANNOUNCE: nottoomuch-addresses.pl version 1.4
[not found] ` <20111216130128.E918211BC52@karen.lavabit.com>
@ 2011-12-16 14:18 ` Tomi Ollila
0 siblings, 0 replies; 23+ messages in thread
From: Tomi Ollila @ 2011-12-16 14:18 UTC (permalink / raw)
To: Philipp Überbacher, Tomi Ollila, notmuch
On Fri, 16 Dec 2011 14:01:26 +0100, Philipp Überbacher <murks@lavabit.com> wrote:
> Quoting Tomi Ollila (2011-12-14 21:10:28)
>
> Hi Tomi,
> can this be used to automatically populate abook?
> I wonder because alot uses abook for addresses, and this could be handy.
Converter from 'flat list of email-addresses' in
$HOME/.config/nottoomuch/addresses to abook format is probably pretty
trivial (unless it is binary which lessens triviality...)... But there
could be (updating) issues.
Alternative would be to run something like
notmuch search --sort=newest-first --output=files '*' |
while read file; do abook --add-email "$file"; done
initially. then register current date using date=`$date +%s`
and, in following rounds run
notmuch search --sort=newest-first --output=files $(($date - 604800)).. |
while read file; do abook --add-email "$file"; done
(604800 == 86400 * 7 -- 7 days -- just analogous what nottoomuch-addresses.sh
does)
Note that this is just untested example (read abook.1 a bit)
An alternative would be to make 'abook' run nottoomuch-addresses.sh for
address completion (then get it's output order for matches (email addresses
from recent messages first)) -- or even just run
grep -aiF "$string" "${XDG_CONFIG_HOME:-$HOME/.config}/nottoomuch/addresses"
(this is what nottoomuch-addresses.sh does when finding matches for given
search string. One can imagine how fast this approach is...)
> Regards,
> Philipp
Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* ANNOUNCE: nottoomuch-addresses.sh version 1.5
2011-12-14 20:10 ` ANNOUNCE: nottoomuch-addresses.pl version 1.4 Tomi Ollila
[not found] ` <20111216130128.E918211BC52@karen.lavabit.com>
@ 2011-12-23 9:37 ` Tomi Ollila
2011-12-30 16:42 ` ANNOUNCE: nottoomuch-addresses.sh version 1.6 Tomi Ollila
1 sibling, 1 reply; 23+ messages in thread
From: Tomi Ollila @ 2011-12-23 9:37 UTC (permalink / raw)
To: notmuch
nottoomuch-addresses.sh -- email address substring matcher -- completion
helper version 1.5 is available.
This version exits with return value 0 in case matches were not
found (previous returned with 1).
Location: http://www.iki.fi/too/nottoomuch/nottoomuch-addresses.sh
Sha1sum: 49ac32568142bf50c7b33de9a70086fd871a1e9e
Web page: http://www.iki.fi/too/nottoomuch/nottoomuch-addresses/
Enjoy!
Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* ANNOUNCE: nottoomuch-addresses.sh version 1.6
2011-12-23 9:37 ` ANNOUNCE: nottoomuch-addresses.sh version 1.5 Tomi Ollila
@ 2011-12-30 16:42 ` Tomi Ollila
0 siblings, 0 replies; 23+ messages in thread
From: Tomi Ollila @ 2011-12-30 16:42 UTC (permalink / raw)
To: notmuch
nottoomuch-addresses.sh -- email address substring matcher -- completion
helper version 1.6 is available.
This version fixes some 'encoded-text' (=?encoding?type?text?=)
handling.
Header version was not changed so rebuilding of address cache
is not enforced. However running
/path/to/nottoomuch-addresses.sh --update --rebuild
is recommended.
Location: http://www.iki.fi/too/nottoomuch/nottoomuch-addresses.sh
Sha1sum: 2e8be738baffbad3d1e15dea75106a683d62ecec
Web page: http://www.iki.fi/too/nottoomuch/nottoomuch-addresses/
Enjoy!
Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* ANNOUNCE: nottoomuch-addresses.sh 2.0
2011-12-01 15:36 ANNOUNCE: nottoomuch-addresses.pl Tomi Ollila
2011-12-01 18:38 ` Bart Bunting
@ 2012-01-18 7:14 ` Tomi Ollila
2012-02-22 19:53 ` ANNOUNCE: nottoomuch-addresses.sh 2.1 Tomi Ollila
` (3 subsequent siblings)
5 siblings, 0 replies; 23+ messages in thread
From: Tomi Ollila @ 2012-01-18 7:14 UTC (permalink / raw)
To: notmuch
nottoomuch-addresses.sh -- email address substring matcher
-- completion helper version 2.0 is available.
Note to 1.92 prerelease tester(s): ignore regexp "indicator"
has changed from ^re:... to ^/.../[i]. This allows this 'i'
flag and trailing whitespace in re.
Changes:
* Added regexp-based ignores using /regexp/[i] syntax in ignore file.
* Addresses 'cache' now contains all addresses and filreted (by ignore)
are now in separate file. This way changes in ignore filters can be
propagated to active address list.
* Encoded address content is now recursively decoded.
Header version was changed but this version supports "importing"
data from older versions. In case you had ignore filters defined
(or recursively encoded mailbox/comment names) it is recommended
to rebuils address cache with
/path/to/nottoomuch-addresses.sh --update --rebuild
Location: http://www.iki.fi/too/nottoomuch/nottoomuch-addresses.sh
Sha1sum (not md5sum): 343833fce0a30ddae859eff4a31d6153fa9c81f9
Web page: http://www.iki.fi/too/nottoomuch/nottoomuch-addresses/
Enjoy!
Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* ANNOUNCE: nottoomuch-addresses.sh 2.1
2011-12-01 15:36 ANNOUNCE: nottoomuch-addresses.pl Tomi Ollila
2011-12-01 18:38 ` Bart Bunting
2012-01-18 7:14 ` ANNOUNCE: nottoomuch-addresses.sh 2.0 Tomi Ollila
@ 2012-02-22 19:53 ` Tomi Ollila
2014-03-29 16:07 ` ANNOUNCE: nottoomuch-addresses.sh 2.2 Tomi Ollila
` (2 subsequent siblings)
5 siblings, 0 replies; 23+ messages in thread
From: Tomi Ollila @ 2012-02-22 19:53 UTC (permalink / raw)
To: notmuch
nottoomuch-addresses.sh -- email address substring matcher
-- completion helper version 2.1 is available.
*** ¡¡¡ This is a bugfix release !!! ***
(No wonder as this is fixing "point zero" release ;/)
Changes:
* Fixed a bug where decoding matching but unknown or malformed =?...?=-
encoded parts in email addresses lead to infinite loop.
Location: http://www.iki.fi/too/nottoomuch/nottoomuch-addresses.sh
Sha1sum (not md5sum): e5cd24ff0f0f5dd63e9136ea35d99e4d90b91513
Web page: http://www.iki.fi/too/nottoomuch/nottoomuch-addresses/
Enjoy!
Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* ANNOUNCE: nottoomuch-addresses.sh 2.2
2011-12-01 15:36 ANNOUNCE: nottoomuch-addresses.pl Tomi Ollila
` (2 preceding siblings ...)
2012-02-22 19:53 ` ANNOUNCE: nottoomuch-addresses.sh 2.1 Tomi Ollila
@ 2014-03-29 16:07 ` Tomi Ollila
2014-09-17 19:02 ` ANNOUNCE: nottoomuch-addresses.sh 2.3 Tomi Ollila
2020-10-03 12:07 ` ANNOUNCE: nottoomuch-addresses.sh 2.5 Tomi Ollila
5 siblings, 0 replies; 23+ messages in thread
From: Tomi Ollila @ 2014-03-29 16:07 UTC (permalink / raw)
To: notmuch
Hi all
Here is a new version of nottoomuch-addresses.sh, after a while of
dogfooding...
nottoomuch-addresses.sh
=======================
*Nottoomuch-addresses.sh* is an email address completion/matching tool
to be used with `notmuch <http://notmuchmail.org>`_ mail user agents.
*Nottoomuch-addresses.sh* works by caching the email addresses from users'
email files and then doing (fgrep) matching against that cache when
requested.
The matching part is very fast.
above from:
https://github.com/domo141/nottoomuch/blob/master/nottoomuch-addresses.rst
For those who have been using version 2.1, the changes are:
# Version 2.2 2014-03-29 15:12:14 UTC
# * In case there is both {phrase} and (comment) in an email address,
# append comment to the phrase. This will make more duplicates to be
# removed. Now there can be:
# <user@host>
# "phrase" <user@host>
# "phrase (comment)" <user@host>
# <user@host> (comment)
# * In case email address is in form "someuser@somehost" <someuser@somehost>
# i.e. the phrase is exactly the same as <address>, phrase is dropped.
I planned to do some more combining of emails, but it proved to be a bit
more challenging that I thought of. The Bar, Foo -> Foo Bar conversion
looks like an interesting thing to do next which I will investigate in
future...
The new version is available at
https://raw.githubusercontent.com/domo141/nottoomuch/master/nottoomuch-addresses.sh
or git clone https://github.com:domo141/nottoomuch.git
and then by picking nottoomuch-addresses.sh from there.
How to install (also written in that nottoomuch-addresses.rst link above):
1) Download the program from above url on the machine you're running
notmuch and find suitable location to it.
2) Verify it's sha1 checksum is 3855dd7b07490c0440deb7984633893b1847879d
3) chmod 755 /path/to/nottoomuch-addresses.sh
4) Run /path/to/nottoomuch-addresses.sh --update
When run first time this gathers email addresses from all of your mail.
This may take a long while to complete -- depends on the amount of email
you have. Further --updates are much faster as those just take addresses
from new mail.
5) Test that it works: Run /path/to/nottoomuch-addresses.sh notmuchmail
6) In case you're using emacs mua with notmuch, edit your notmuch
configuration for emacs with the following content:
(require 'notmuch-address)
(setq notmuch-address-command "/path/to/nottoomuch-addresses.sh")
(notmuch-address-message-insinuate)
7) Restart emacs notmuch mua (or eval above lines) and start composing
new mail. When adding recipient to To: field. press <TAB> after 3
or more characters have been added. In case you get 2 or more address
matches, use arrow keys in minibuffer to choose desired recipient...
8) Enjoy!
/path/to/nottoomuch-addresses.sh --help provides more detailed information.
BR,
Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* ANNOUNCE: nottoomuch-addresses.sh 2.3
2011-12-01 15:36 ANNOUNCE: nottoomuch-addresses.pl Tomi Ollila
` (3 preceding siblings ...)
2014-03-29 16:07 ` ANNOUNCE: nottoomuch-addresses.sh 2.2 Tomi Ollila
@ 2014-09-17 19:02 ` Tomi Ollila
2014-09-17 19:14 ` ANNOUNCE: notmuch-abook v1.6 [Was: Re: ANNOUNCE: nottoomuch-addresses.sh 2.3] guyzmo
2020-10-03 12:07 ` ANNOUNCE: nottoomuch-addresses.sh 2.5 Tomi Ollila
5 siblings, 1 reply; 23+ messages in thread
From: Tomi Ollila @ 2014-09-17 19:02 UTC (permalink / raw)
To: notmuch
Hello again
I'm pleased to announce new version of my caching address completer
system for notmuch, version 2.3 (2014-09-17).
You can get it from
https://raw.githubusercontent.com/domo141/nottoomuch/master/nottoomuch-addresses.sh
and a bit more usage documentation at
https://github.com/domo141/nottoomuch/blob/master/nottoomuch-addresses.rst
This new version provides 3 new options for address cache --(re)build
functionality:
--since=YYYY-MM-DD: cache addresses from emails dated since year-mo-dy.
--exclude-path-re=...: directory paths (as regular expressions) to ignore
when looking for email files.
--name-conversion=lcf2flem: when used email addresses in format
"Last, First <first.last@example.org>" are converted to
"First Last <first.last@example.org>" in case either 'first' or 'last'
part matches in phrase and address. non-ascii characters are ignored
in comparison.
It took like an hour to get this 'name conversion' functionality to work,
and it works very well when doing it to my email address list. To figure
out good (or at least tolerable, which it is now ;) option for it was quite
a challenge...
... but that teached me a lot about http://en.wikipedia.org/wiki/Personal_name
in the world (and why everyone would not want to use this feature).
If you are happy with your current nottoomuch address cache this brings
no changes in how search is done and cache updated, but if you find use
for some of the above options then you need to give those with --rebuild
after updating nottoomuch-addresses.sh. You can of course update
nottoomuch-addresses.sh even you don't need the new features, it will
work fine with older address cache (and will update cache file format
from v4 to v5).
Enjoy,
Tomi
^ permalink raw reply [flat|nested] 23+ messages in thread
* ANNOUNCE: notmuch-abook v1.6 [Was: Re: ANNOUNCE: nottoomuch-addresses.sh 2.3]
2014-09-17 19:02 ` ANNOUNCE: nottoomuch-addresses.sh 2.3 Tomi Ollila
@ 2014-09-17 19:14 ` guyzmo
2014-09-18 6:54 ` Rainer M Krug
0 siblings, 1 reply; 23+ messages in thread
From: guyzmo @ 2014-09-17 19:14 UTC (permalink / raw)
To: notmuch
Hello there,
On Wed, Sep 17, 2014 at 10:02:57PM +0300, Tomi Ollila wrote:
> I'm pleased to announce new version of my caching address completer
> system for notmuch, version 2.3 (2014-09-17).
I have also developed something similar a while ago, which has been
greatly improved by the community:
https://github.com/guyzmo/notmuch-abook
It's written in python, integrates nicely as a vim plugin, for the vim
users around. It stores email addresses in a sqlite database, and the
configuration lies in the `~/.notmuch-config`.
It can be installed using `pip install notmuch_abook` (slap me if I
forget to update the pipy package!).
For the occasion, I'd like to thank a lot the contributors (github
usernames):
* foobacca,
* jkr,
* Tomas Tomecek,
* dme
Of course, don't hesitate to troll^Wdiscuss about the pros and cons of
both solutions, which may help improve both in the end!
Cheers and a lots of thank to all notmuch contributors!
--
Guyzmo
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: ANNOUNCE: notmuch-abook v1.6 [Was: Re: ANNOUNCE: nottoomuch-addresses.sh 2.3]
2014-09-17 19:14 ` ANNOUNCE: notmuch-abook v1.6 [Was: Re: ANNOUNCE: nottoomuch-addresses.sh 2.3] guyzmo
@ 2014-09-18 6:54 ` Rainer M Krug
[not found] ` <20140918085411.GD1079@vilya.online.net>
0 siblings, 1 reply; 23+ messages in thread
From: Rainer M Krug @ 2014-09-18 6:54 UTC (permalink / raw)
To: guyzmo; +Cc: public-notmuch-gxuj+Tv9EO5zyzON3hdc1g
[-- Attachment #1: Type: text/plain, Size: 4749 bytes --]
guyzmo <guyzmo-kMjww5mZloE@public.gmane.org> writes:
> Hello there,
>
> On Wed, Sep 17, 2014 at 10:02:57PM +0300, Tomi Ollila wrote:
>> I'm pleased to announce new version of my caching address completer
>> system for notmuch, version 2.3 (2014-09-17).
>
> I have also developed something similar a while ago, which has been
> greatly improved by the community:
>
> https://github.com/guyzmo/notmuch-abook
>
> It's written in python, integrates nicely as a vim plugin, for the vim
> users around. It stores email addresses in a sqlite database, and the
> configuration lies in the `~/.notmuch-config`.
>
> It can be installed using `pip install notmuch_abook` (slap me if I
> forget to update the pipy package!).
I am trying this, but I am getting the following error (I am new to python!):
,----
| 08:51:59 ~/bin$ pip install notmuch_abook
| Downloading/unpacking notmuch-abook
| Downloading notmuch_abook-v1.6.tar.gz
| Running setup.py (path:/private/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/pip_build_rainerkrug/notmuch-abook/setup.py) egg_info for package notmuch-abook
|
| package init file 'pylibs/__init__.py' not found (or not a regular file)
| Requirement already satisfied (use --upgrade to upgrade): pysqlite in /usr/local/lib/python2.7/site-packages (from notmuch-abook)
| Requirement already satisfied (use --upgrade to upgrade): docopt in /usr/local/lib/python2.7/site-packages (from notmuch-abook)
| Installing collected packages: notmuch-abook
| Running setup.py install for notmuch-abook
| package init file 'pylibs/__init__.py' not found (or not a regular file)
|
| error: can't copy 'plugin/notmuch_abook.vim': doesn't exist or not a regular file
| Complete output from command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/pip_build_rainerkrug/notmuch-abook/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/pip-EwAEJ5-record/install-record.txt --single-version-externally-managed --compile:
| running install
|
| running build
|
| running build_py
|
| package init file 'pylibs/__init__.py' not found (or not a regular file)
|
| creating build
|
| creating build/lib
|
| creating build/lib/notmuch_abook
|
| copying pylibs/notmuch_abook.py -> build/lib/notmuch_abook
|
| running egg_info
|
| writing requirements to notmuch_abook.egg-info/requires.txt
|
| writing notmuch_abook.egg-info/PKG-INFO
|
| writing namespace_packages to notmuch_abook.egg-info/namespace_packages.txt
|
| writing top-level names to notmuch_abook.egg-info/top_level.txt
|
| writing dependency_links to notmuch_abook.egg-info/dependency_links.txt
|
| writing entry points to notmuch_abook.egg-info/entry_points.txt
|
| warning: manifest_maker: standard file '-c' not found
|
|
|
| reading manifest file 'notmuch_abook.egg-info/SOURCES.txt'
|
| writing manifest file 'notmuch_abook.egg-info/SOURCES.txt'
|
| running install_lib
|
| copying build/lib/notmuch_abook/notmuch_abook.py -> /usr/local/lib/python2.7/site-packages/notmuch_abook
|
| byte-compiling /usr/local/lib/python2.7/site-packages/notmuch_abook/notmuch_abook.py to notmuch_abook.pyc
|
| running install_data
|
| error: can't copy 'plugin/notmuch_abook.vim': doesn't exist or not a regular file
|
| ----------------------------------------
| Cleaning up...
| Command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/pip_build_rainerkrug/notmuch-abook/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/pip-EwAEJ5-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/pip_build_rainerkrug/notmuch-abook
| Storing debug log for failure in /Users/rainerkrug/.pip/pip.log
| 08:52:22 ~/bin$
`----
I am using Python 2.7.8 on a Mac, installed via homebrew.
Any suggestions?
>
> For the occasion, I'd like to thank a lot the contributors (github
> usernames):
>
> * foobacca,
> * jkr,
> * Tomas Tomecek,
> * dme
>
> Of course, don't hesitate to troll^Wdiscuss about the pros and cons of
> both solutions, which may help improve both in the end!
>
> Cheers and a lots of thank to all notmuch contributors!
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: ANNOUNCE: notmuch-abook v1.6 [Was: Re: ANNOUNCE: nottoomuch-addresses.sh 2.3]
[not found] ` <20140918085411.GD1079@vilya.online.net>
@ 2014-09-18 10:26 ` Rainer M Krug
0 siblings, 0 replies; 23+ messages in thread
From: Rainer M Krug @ 2014-09-18 10:26 UTC (permalink / raw)
To: notmuch; +Cc: guyzmo, public-notmuch-gxuj+Tv9EO5zyzON3hdc1g
[-- Attachment #1: Type: text/plain, Size: 945 bytes --]
Guyzmo <guyzmo@m0g.net> writes:
> Hi Rainer and the ML,
>
> On Thu, Sep 18, 2014 at 08:54:43AM +0200, Rainer M Krug wrote:
>> guyzmo <guyzmo@m0g.net> writes:
>> > On Wed, Sep 17, 2014 at 10:02:57PM +0300, Tomi Ollila wrote:
>> I am trying this, but I am getting the following error (I am new to python!):
>> | 08:51:59 ~/bin$ pip install notmuch_abook
>
> well, thank you for reporting this, I actually did not build
> lorrectly the package for the pipy submission (there was one file
> missing because I forgot to write a `MANIFEST.in` file...).
>
> I hope it'll work well for you this time ;-)
Yes, it does. Thanks.
>
> N.B.: You may need to do it as root if you're geting it installed in
> your `/Library` python installation
As I installed it using the python installed under homebrew, it installs
somewhere under /usr/local/
Cheers,
Rainer
--
Rainer M. Krug
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
* ANNOUNCE: nottoomuch-addresses.sh 2.5
2011-12-01 15:36 ANNOUNCE: nottoomuch-addresses.pl Tomi Ollila
` (4 preceding siblings ...)
2014-09-17 19:02 ` ANNOUNCE: nottoomuch-addresses.sh 2.3 Tomi Ollila
@ 2020-10-03 12:07 ` Tomi Ollila
5 siblings, 0 replies; 23+ messages in thread
From: Tomi Ollila @ 2020-10-03 12:07 UTC (permalink / raw)
To: notmuch
ANNOUNCE: nottoomuch-addresses.sh 2.5
What is New in Version 2.5 (Sat 2020-10-03):
Added reading of user-controlled file 'addresses.top'
-- addresses to be matched first when searches done.
Get it from
https://github.com/domo141/nottoomuch/blob/master/nottoomuch-addresses.rst
https://github.com/domo141/nottoomuch/blob/master/nottoomuch-addresses.sh
Nottoomuch-addresses is an external address completion solution for notmuch.
Notmuch has good internal address completion solution, which is
automatically up to date all the time.
If you're happy with it, there is no need to look elsewhere.
(nottoomuch-addresses.sh --update has to be done to update address cache)
But for some of us that is not suitable enough.
The two reasons that come up to my mind are 1) it is slow, and 2) the
matches found are not suitably ordered.
Notmuch emacs mua "harvests" more addresses to its internal cache which
mitigates the slowness aspect to some users (and bloats memory use; disk
cache ftw!?) -- for me that does not help as I tend to use lot of short
time "ephemeral" emacs processes and the caches would get lost all the
time.
For comparison (1), nottoomuch-address.sh does the address search using the
following command line (line 4 of nottoomuch-address.sh copied verbatim):
grep -aiF "$*" "${XDG_CONFIG_HOME:-$HOME/.config}/nottoomuch/addresses.active"
so that is as fast as the disk IO in user's computer (when cached, cpu (and
its caching) could be the bottleneck).
For (2) ordering (and content) of the addresses.active cache file, the perl5
program following the 'grep' line in nottoomuch-address.sh does:
First, opens and reads the actual email files in order of newest first
(up to latest sync), gathering both sender and receiver addresses -- so
newest and most complete list of addresses are made available first in
the addresses.active file.
Then, there are 2 user-controllable files that affect what gets written in
the addresses.active file:
1) addresses.ignore: addresses not to be included in addresses.active file,
and thus will not be presented in search matches. See --help for more
information
2) addresses.top (new in 2.5 -- this release): lines of addresses that are
just added to the top of the addresses.active file. These addresses are
first to be matched with the 'fgrep' command line when searches are done.
The "downside" (ymmv?) is that one has to have their own address cache for
the completions. In case of nottoomuch-addresses.sh maintaining that cache
has been made easy (run nottoomuch-addresses.sh --update). I usually don't
bother that much; if I try completions and don't seem to get right results,
then I run that --update and try again. That usually works. There is slight
change -- however -- that I get matches that I don't notice obsolete, which
--update could fix. The chance for that happen to me is somewhat smaller
than for someone(tm) who is more computer illiterate that I am.
Initially, nottoomuch-addresses.sh --rebuild
(IIRC nottoomuch-addresses.sh --update does that by default if there is
no 'addresses' file) takes some time (depending the number of one's email
files (but there is always nighttime one can leave computer to do things)).
7. Enjoy!
./nottoomuch-addresses.sh --help provides more detailed usage information.
Tomi
PS: my latest nottoomuch-addresses --update executions -- my frequency of
updating the addresses cache files, for reference
20140916-211708.2130: sh -x ./nottoomuch-addresses.sh --since=2014-06-20 --rebuild --exclude-path-re=foo::bar --update
20140917-185331.7091: ./nottoomuch-addresses.sh --update
20150505-162640.31139: nottoomuch-addresses.sh --update
20150511-220640.24045: nottoomuch-addresses.sh --update
20150826-203142.16496: nottoomuch-addresses.sh --update
20160513-fr-085215.964: nottoomuch-addresses.sh --update
20161110-th-214824.4256: nottoomuch-addresses.sh --update
20170106-fr-133011.601: nottoomuch-addresses.sh --update
20170430-su-151115.18628: nottoomuch-addresses.sh --update
20170502-tu-223519.8590: nottoomuch-addresses.sh --update
20180503-th-102438.16030: nottoomuch-addresses.sh --update
20180709-mo-105240.29097: nottoomuch-addresses.sh --update
20200423-th-205157.30151: nottoomuch-addresses.sh --update
20201003-sa-115101.1635: gh 3230 -H nottoomuch-addresses.*--update > llll
20201003-sa-115101.1635: emacs llll
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2020-10-03 12:07 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-01 15:36 ANNOUNCE: nottoomuch-addresses.pl Tomi Ollila
2011-12-01 18:38 ` Bart Bunting
2011-12-02 7:37 ` Tomi Ollila
2011-12-05 11:51 ` Tomi Ollila
2011-12-05 12:04 ` Bart Bunting
2011-12-05 12:35 ` Tomi Ollila
2011-12-05 12:55 ` Jameson Graef Rollins
2011-12-05 21:45 ` Bart Bunting
2011-12-06 4:43 ` Bart Bunting
2011-12-06 22:03 ` Tomi Ollila
2011-12-12 16:05 ` ANNOUNCE: nottoomuch-addresses.pl version 1.3 Tomi Ollila
2011-12-14 20:10 ` ANNOUNCE: nottoomuch-addresses.pl version 1.4 Tomi Ollila
[not found] ` <20111216130128.E918211BC52@karen.lavabit.com>
2011-12-16 14:18 ` Tomi Ollila
2011-12-23 9:37 ` ANNOUNCE: nottoomuch-addresses.sh version 1.5 Tomi Ollila
2011-12-30 16:42 ` ANNOUNCE: nottoomuch-addresses.sh version 1.6 Tomi Ollila
2012-01-18 7:14 ` ANNOUNCE: nottoomuch-addresses.sh 2.0 Tomi Ollila
2012-02-22 19:53 ` ANNOUNCE: nottoomuch-addresses.sh 2.1 Tomi Ollila
2014-03-29 16:07 ` ANNOUNCE: nottoomuch-addresses.sh 2.2 Tomi Ollila
2014-09-17 19:02 ` ANNOUNCE: nottoomuch-addresses.sh 2.3 Tomi Ollila
2014-09-17 19:14 ` ANNOUNCE: notmuch-abook v1.6 [Was: Re: ANNOUNCE: nottoomuch-addresses.sh 2.3] guyzmo
2014-09-18 6:54 ` Rainer M Krug
[not found] ` <20140918085411.GD1079@vilya.online.net>
2014-09-18 10:26 ` Rainer M Krug
2020-10-03 12:07 ` ANNOUNCE: nottoomuch-addresses.sh 2.5 Tomi Ollila
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).