ANNOUNCE: nottoomuch-addresses.pl
Tomi Ollila
tomi.ollila at iki.fi
Thu Dec 1 23:37:57 PST 2011
On Fri, 02 Dec 2011 05:38:01 +1100, Bart Bunting <bart at 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 at bit:~$
> bart at bit:~$shasum ~/bin/nottoomuch-addresses.pl
> 125f3917b3f2dc68bdf30af04ab623d53321e50c /Users/bart/bin/nottoomuch-addresses.pl
> bart at bit:~$chmod 755 ~/bin/nottoomuch-addresses.pl
> bart at 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 at bit:~$cd
> bart at bit:~$cd .config
> bash: cd: .config: No such file or directory
> bart at bit:~$
> bart at bit:~$mkdir .config
> bart at bit:~$nottoomuch --update
> bash: nottoomuch: command not found
> bart at 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 at bit:~$
> bart at bit:~$cd
> bart at bit:~$cd .config
> bart at bit:~/.config$mkdir nottoomuch
> bart at bit:~/.config$
> bart at 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 at bit:~/.config$cd nottoomuch/
> bart at bit:~/.config/nottoomuch$touch addresses
> bart at bit:~/.config/nottoomuch$~/bin/nottoomuch-addresses.pl --update
> bart at bit:~/.config/nottoomuch$ls
> addresses
> bart at bit:~/.config/nottoomuch$ls -s addresses
> 0 addresses
> bart at bit:~/.config/nottoomuch$echo $TERM
> dumb
> bart at bit:~/.config/nottoomuch$export TERM=emacs
> bart at bit:~/.config/nottoomuch$ls -s addresses
> 0 addresses
> bart at 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 at 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 at 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 at bit:~/.config/nottoomuch$ On Thu, 01 Dec 2011 17:36:24 +0200, Tomi Ollila <tomi.ollila at iki.fi> wrote:
More information about the notmuch
mailing list