unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Subject: ANNOUNCE: nottoomuch-addresses.sh 2.5
Date: Sat, 03 Oct 2020 15:07:05 +0300	[thread overview]
Message-ID: <m2blhjfr86.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <m2d3c8e22v.fsf@guru.guru-group.fi>

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





      parent reply	other threads:[~2020-10-03 12:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Tomi Ollila [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2blhjfr86.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).