[PATCH 1/1] Store and search for canonical Unicode text [WIP]

2015-08-30 Thread Rob Browning
WARNING: this version is very preliminary, and might eat your data. Unicode has multiple sequences representing what should normally be considered the same text. For example here's a combining Á and a noncombining Á. Depending on the way you view this, you may or may not see a difference,

Re: [RFC PATCH 4/5] cli: change the data structure for notmuch address deduplication

2015-08-30 Thread Jani Nikula
On Sun, 30 Aug 2015, David Bremner da...@tethera.net wrote: Jani Nikula j...@nikula.org writes: +static int +strcase_equal (const void *a, const void *b) +{ +return strcasecmp (a, b) == 0; +} + +static unsigned int +strcase_hash (const void *ptr) +{ +const char *s = ptr; +

Re: [RFC PATCH 4/5] cli: change the data structure for notmuch address deduplication

2015-08-30 Thread Jani Nikula
On Sun, 30 Aug 2015, David Bremner da...@tethera.net wrote: I guess this doesn't make the error handling worse; both old and new code silently ignore OOM if I understand correctly. Oh, and current git will not silently ignore OOM. It will segfault... ;) BR, Jani.

Re: [RFC PATCH 4/5] cli: change the data structure for notmuch address deduplication

2015-08-30 Thread David Bremner
Jani Nikula j...@nikula.org writes: I found this use of mailbox as a temporary variable confusing; despite the obvious return I thought it might have something to do with the g_list_append below. Maybe just make a block scope temporary variable? This is how the function would turn out with

Re: [RFC PATCH 3/5] cli: add support for not deduplicating notmuch address results

2015-08-30 Thread Jani Nikula
On Sun, 30 Aug 2015, David Bremner da...@tethera.net wrote: Jani Nikula j...@nikula.org writes: +{ NOTMUCH_OPT_KEYWORD, ctx-dupe, deduplicate, 'x', probably you want 'D' or 'd' here. Not that it makes a practical difference at this point. + (notmuch_keyword_t []){ { yes, -1 },

Re: [RFC PATCH 5/5] cli: add support for deduplicating based on case insensitive address

2015-08-30 Thread David Bremner
Jani Nikula j...@nikula.org writes: Consider all variants of an email address as one, and print the most common variant. Other than the quibbles already mentioned, the series looks ok to me. For production it should have one or two tests I guess. Oh, and man page updates. But you knew that I

Re: [PATCH 2/2] emacs: add function to resend message to new recipients

2015-08-30 Thread David Bremner
Tomi Ollila tomi.oll...@iki.fi writes: The new function notmuch-show-message-resend re-sends message to new recipients using #'message-resend. Recipients are read from minibuffer as a comma-separated string (with some keyboard support including tab completion). I couldn't get the tab

Re: [PATCH 1/2] emacs: add defsubst notmuch-address--message-insinuated

2015-08-30 Thread David Bremner
Tomi Ollila tomi.oll...@iki.fi writes: +(defsubst notmuch-address--message-insinuated () + (memq notmuch-address-message-alist-member message-completion-alist)) + Is there some advantage to defsubst other than (maybe?) performance? It just seems like one more construct for people to get up

Re: [PATCH 1/2] emacs: add defsubst notmuch-address--message-insinuated

2015-08-30 Thread Tomi Ollila
On Sun, Aug 30 2015, David Bremner da...@tethera.net wrote: Tomi Ollila tomi.oll...@iki.fi writes: +(defsubst notmuch-address--message-insinuated () + (memq notmuch-address-message-alist-member message-completion-alist)) + Is there some advantage to defsubst other than (maybe?)

Re: [PATCH 2/2] emacs: add function to resend message to new recipients

2015-08-30 Thread Tomi Ollila
On Sun, Aug 30 2015, David Bremner da...@tethera.net wrote: Tomi Ollila tomi.oll...@iki.fi writes: The new function notmuch-show-message-resend re-sends message to new recipients using #'message-resend. Recipients are read from minibuffer as a comma-separated string (with some keyboard

Re: [PATCH 2/2] emacs: add function to resend message to new recipients

2015-08-30 Thread David Bremner
Tomi Ollila tomi.oll...@iki.fi writes: emacs -q -L $PWD/emacs -l emacs/notmuch.el -f notmuch --eval '(progn (setq notmuch-address-command nottoomuch-addresses.sh) (notmuch-address-message-insinuate))' Ah, I missed notmuch-address-message-insinuate; it does work if I run that. I wonder if