[PATCH] doc: document notmuch new --verbose

2019-03-29 Thread Michal Sojka
--- doc/man1/notmuch-new.rst | 4 1 file changed, 4 insertions(+) diff --git a/doc/man1/notmuch-new.rst b/doc/man1/notmuch-new.rst index 5eeb4926..20a1103b 100644 --- a/doc/man1/notmuch-new.rst +++ b/doc/man1/notmuch-new.rst @@ -43,6 +43,10 @@ Supported options for **new** include

Failure to report send errors

2018-03-29 Thread Michal Sojka
Dear Gnus developers, (CCing notmuch, because their users can be affected too) When message-interactive is nil, message-send can falsely report success even when sending fails and there is no way for the user to learn about the failure, expect from angry peers complaining about not receiving

Re: Long delay when opening signed emails

2018-01-30 Thread Michal Sojka
On Tue, Jan 30 2018, Daniel Kahn Gillmor wrote: > Hi Michal-- > > On Tue 2018-01-30 17:17:54 +0100, Michal Sojka wrote: >> Hi all, >> >> I experience annoyingly long delay, when opening some signed emails in >> Emacs. This is likely related to the following

Long delay when opening signed emails

2018-01-30 Thread Michal Sojka
Hi all, I experience annoyingly long delay, when opening some signed emails in Emacs. This is likely related to the following lines appearing in my log when opening the email: Jan 30 17:07:46 dirmngr[7526]: no CRL available for issuer id A401B7A860C859FEA90E1A7EEE2BAF37C7FB918F Jan 30 17:08:06

Re: [PATCH] emacs: address completion, allow sender/recipient and filters

2016-05-18 Thread Michal Sojka
On Wed, May 18 2016, Mark Walters wrote: > This commit lets the user customize the address completion. It makes > two changes. Thanks Mark, now it LGTM. I configured my address completion to be based on received emails and I'm surprised how many variations of my email address is used by spammers

Re: [PATCH v3] emacs: address completion, allow sender/recipient and filters

2016-05-17 Thread Michal Sojka
Hi Mark, few minor comments bellow. On Mon, May 16 2016, Mark Walters wrote: > This commit lets the user customize the address completion. Add "It makes two changes." > The first change controls whether to build the address completion list > based on messages you have sent or you have received

Re: message-default-mail-headers not working in notmuch 0.22

2016-05-01 Thread Michal Sojka
On Fri, Apr 29 2016, David Edmondson wrote: > On Fri, Apr 29 2016, Sebastian Fischmeister wrote: >> After upgrading to notmuch 0.22, my emacs config seems broken: >> >> (setq message-default-mail-headers "Reply-to: m...@example.com\nBcc: >> m...@example.com") >> >> When creating a new mail, it

Re: Mail merge with notmuch

2016-01-21 Thread Michal Sojka
Hi Sebastian, On Sat, Jan 16 2016, Sebastian Fischmeister wrote: > Hi, > > Is there a straightforward way to for mail merge with notmuch? I need to > send emails with only minor modifications to a number of people. If I > could send mails from the command line, then that would be perfect. > > Any

Re: [PATCH v6] devel/emacs: add devel/try-emacs-mua

2016-01-06 Thread Michal Sojka
On Wed, Jan 06 2016, Tomi Ollila wrote: > devel/try-emacs-mua provides an easy way to try and experiment > with the notmuch emacs client distributed in emacs subdirectory of > the notmuch source tree. LGTM. I tested it with various use cases I have it my mind and it works as I expect. -Michal

Re: [PATCH 1/3] emacs: Fix mail composition under Emacs 23

2016-01-06 Thread Michal Sojka
On Tue, Jan 05 2016, David Bremner wrote: > Michal Sojka <sojk...@fel.cvut.cz> writes: > >> +(when return-action (nconc args '(return-action))) >> +(apply 'message-setup-1 >> + ;; The following sexp is copied from `mes

Re: [PATCH v5] devel/emacs: add devel/try-emacs-mua

2016-01-04 Thread Michal Sojka
Hi Tomi, this looks almost good. A few minor comments below. On Mon, Jan 04 2016, Tomi Ollila wrote: > devel/try-emacs-mua provides an easy way to try and experiment > with the notmuch emacs client distributed in emacs subdirectory of > the notmuch source tree. > > try-emacs-mua starts a new

Re: [PATCH] devel/emacs: add devel/try-emacs-mua.sh

2016-01-04 Thread Michal Sojka
On Thu, Nov 12 2015, Mark Walters wrote: >> devel/try-emacs-mua.sh provides an easy way to try and experiment with >> the notmuch emacs client provided in emacs subdirectory of notmuch >> source tree. [...] > > I like this -- a nice simple way to get to a working but uncustomised > test

Re: [PATCH v4] devel/emacs: add devel/try-emacs-mua

2016-01-03 Thread Michal Sojka
Hi Tomi, On Sun, Dec 20 2015, Tomi Ollila wrote: > devel/try-emacs-mua provides an easy way to try and experiment > with the notmuch emacs client distributed in emacs subdirectory of > the notmuch source tree. > > try-emacs-mua starts a new emacs process and if initial checks pass > *scratch*

[PATCH 2/3] emacs: Refactor notmuch-mua-mail

2016-01-02 Thread Michal Sojka
This should be more readable. --- emacs/notmuch-mua.el | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index d4950cb..2d6825d 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -320,24

[PATCH 3/3] emacs: Handle switch-function argument of notmuch-mua-mail

2016-01-02 Thread Michal Sojka
notmuch-mua-mail ignored the switch-function argument and always used the function returned by notmuch-mua-get-switch-function instead. In order to support standard emacs interfaces (compose-mail in this case), this commit changes notmuch-mua-mail to use the switch-function argument if it is

notmuch-message-mode initialization follow-up

2016-01-02 Thread Michal Sojka
Hi, the first patch fixes the problem reported in id:87wprt2r4f.fsf@zancas.localnet. Patch 2/3 is just refactoring. Patch 3/3 is reaction to id:87y4cc3qse.fsf@zancas.localnet; I'm not sure whether it addresses exactly what David had in mind, but IMHO it is an improvement. Cheers. -Michal

[PATCH 1/3] emacs: Fix mail composition under Emacs 23

2016-01-02 Thread Michal Sojka
Commit 570c0aeb40bd0c3af8174624a55e968f62c44f09 reworked notmuch-mua-mail function in a way that worked only under Emacs 24. The reason was that message-setup-1 took one argument less in Emacs 23. We fix this by only supplying the return-action argument when it is actually set by the caller. ---

Re: [PATCH v2] emacs: Improve notmuch-message-mode initialization

2016-01-02 Thread Michal Sojka
On Fri, Jan 01 2016, David Bremner wrote: > David Bremner <da...@tethera.net> writes: > >> Michal Sojka <sojk...@fel.cvut.cz> writes: >> >>> This commit fixes these problems by replacing a call to message-mail >>> with notmuch-specific code th

Re: notmuch-mua and jl-encrypt (was: file-error "not a regular file")

2016-01-02 Thread Michal Sojka
Hi fauno, On Wed, Dec 30 2015, fauno wrote: > Michal Sojka <sojk...@fel.cvut.cz> writes: >> can you share more details about how do you use jl-encrypt and which >> functions do not work? Recently, I posted a few patches that fix some >> problems related to

Re: file-error "not a regular file"

2015-12-30 Thread Michal Sojka
Hi fauno, On Tue, Dec 29 2015, fauno wrote: > David Bremner writes: > >> I guess the tl;dr is that I can't duplicate this problem. Looking at the >> traceback Peter provided, it looks like he is using >> "send-message-without-bullets" to send the message. Since this isn't a >>

[PATCH] doc/reply: Clarify how reply-to header is handled

2015-12-29 Thread Michal Sojka
Current documentation and comments in the code do not correspond to the actual code and tests in the test suite ("Un-munging Reply-To" in T230-reply-to-sender.sh). Fix it. --- doc/man1/notmuch-reply.rst | 6 -- notmuch-reply.c| 2 +- 2 files changed, 5 insertions(+), 3

Re: notmuch-reply doesn't use Reply-To

2015-12-29 Thread Michal Sojka
Hi all, On Fri, Dec 04 2015, Jani Nikula wrote: > On Fri, 04 Dec 2015, Damien Cassou wrote: >> David Bremner writes: >> >>> Damien Cassou writes: >>> "To" : "r...@inria.fr", "Reply-To" :

[PATCH v2] test: Unset ALTERNATE_EDITOR before running emacsclient

2015-12-29 Thread Michal Sojka
ALTERNATE_EDITOR causes emacsclient to run an alternate editor if the emacs server is not ready. This can collide with intended functionality in test-lib.sh. If the ALTERNATE_EDITOR is set but empty, emacsclient runs emacs daemon and tries to connect to it. When this happens the emacs run by

[PATCH] test: Always use paths without symlinks

2015-12-29 Thread Michal Sojka
When notmuch sources are at a symlinked path, some tests fail because one part of the test uses physical path and another uses logical path (with symlinks). For example the following test output is produced when the test is started from /home/src/symlink-to-notmuch, which is a symlink to

[PATCH] test: Unset ALTERNATE_EDITOR before running emacsclient

2015-12-28 Thread Michal Sojka
ALTERNATE_EDITOR causes emacsclient to run an alternate editor if the emacs server is not ready. This can collide with intended functionality in test-lib.sh. If the ALTERNATE_EDITOR is set but empty, emacsclient runs emacs daemon and tries to connect to it. When this happens the emacs run by

Re: [PATCH] emacs: address completion, allow sender/recipient and filters

2015-12-28 Thread Michal Sojka
Hi Mark, I tried this patch. When I set the variable to 'received, first completion candidates are generated incorrectly. The query looked as "(to:sojk...@fel.cvut.cz) and (to:prefix*)". It should be "... (from:prefix*)". This "to:" comes from notmuch-address-options or from notmuch-company so

[PATCH v2] emacs: Improve notmuch-message-mode initialization

2015-12-21 Thread Michal Sojka
Recent addition of notmuch-message-mode introduced several problems: 1. When message-setup-hook is used to set buffer local variables, these settings are not effective, because all buffer local variables are immediately erased by notmuch-message-mode initialization. 2. message-mode-hook

[PATCH v2] emacs: Improve notmuch-message-mode initialization

2015-12-21 Thread Michal Sojka
Hi, this is v2 of id:1446573161-28068-1-git-send-email-sojk...@fel.cvut.cz. As suggested by David, instead of using advices, it reimplements the needed pieces of message-mail in notmuch-specific way. Michal Sojka (1): emacs: Improve notmuch-message-mode initialization emacs/notmuch-mua.el

Re: [PATCH] emacs: Fix regression in (notmuch-)message-mode initialization

2015-11-09 Thread Michal Sojka
On Mon, Nov 09 2015, David Bremner wrote: > Michal Sojka <sojk...@fel.cvut.cz> writes: > >> This commit uses advice mechanism to call notmuch-message-mode instead >> of message-mode. This way, a call to message-mail initializes directly >> notmuch-message-mode

[PATCH] emacs: Fix regression in (notmuch-)message-mode initialization

2015-11-03 Thread Michal Sojka
Recent addition of notmuch-message-mode introduced a few regressions. I use message-setup-hook to set some buffer local variables and this stopped working. The reason is that notmuch-message-mode, which cleans all buffer local variables, is called after calling message-mail, which calls the

[PATCH] emacs: Make notmuch-message-mode play nicely with flyspell

2015-11-03 Thread Michal Sojka
Flyspell mode uses a special setting for message-mode to not spell-check message headers except Subject. Apply this setting also to notmuch-message-mode. --- emacs/notmuch-mua.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index

[PATCH v8 3/3] Emacs: Add address completion based on company-mode

2015-10-26 Thread Michal Sojka
@@ +;; notmuch-company.el --- Mail address completion for notmuch via company-mode -*- lexical-binding: t -*- + +;; Authors: Trevor Jim <t...@mac.com> +;; Michal Sojka <sojk...@fel.cvut.cz> +;; +;; Keywords: mail, completion + +;; This program is free software; you can redistri

[PATCH v8 1/3] emacs: replace use of notmuch-address-message-insinuate

2015-10-26 Thread Michal Sojka
From: David Bremner This allows e.g. Gnus users to load this file without changing message-mode behaviour. This will disable completion for those that did not customize the variable but relied on the existence of a file named "notmuch-addresses" in their path. In the next

[PATCH v8 2/3] Emacs: Add address completion mechanism implemented in elisp

2015-10-26 Thread Michal Sojka
Currently, notmuch has an address completion mechanism that requires external command to provide completion candidates. This commit adds a completion mechanism inspired by https://github.com/tjim/nevermore, which is implemented in Emacs lisp only. The preexisting address completion mechanism,

[PATCH v8 0/3] elisp + company completion patches

2015-10-26 Thread Michal Sojka
. -Michal David Bremner (1): emacs: replace use of notmuch-address-message-insinuate Michal Sojka (2): Emacs: Add address completion mechanism implemented in elisp Emacs: Add address completion based on company-mode emacs/Makefile.local | 1 + emacs/notmuch-address.el | 213

[PATCH v3 10/10] cli: address: Add --filter-by option to configure address filtering

2015-01-09 Thread Michal Sojka
On Fri, Jan 09 2015, Tomi Ollila wrote: > On Fri, Jan 09 2015, Michal Sojka wrote: > >> Hi, >> >> sorry for longer response time :) >> >> On Thu, Jan 01 2015, Tomi Ollila wrote: >>> On Wed, Dec 31 2014, David Bremner wrote: >>> &g

[PATCH v3 10/10] cli: address: Add --filter-by option to configure address filtering

2015-01-09 Thread Michal Sojka
Hi, sorry for longer response time :) On Thu, Jan 01 2015, Tomi Ollila wrote: > On Wed, Dec 31 2014, David Bremner wrote: > >> Michal Sojka writes: >> >>> This option allows to configure the criterion for duplicate address >>> filtering. Without this opt

Re: [PATCH v3 10/10] cli: address: Add --filter-by option to configure address filtering

2015-01-09 Thread Michal Sojka
On Fri, Jan 09 2015, Michal Sojka wrote: On Fri, Jan 09 2015, Tomi Ollila wrote: On Fri, Jan 09 2015, Michal Sojka sojk...@fel.cvut.cz wrote: Hi, sorry for longer response time :) On Thu, Jan 01 2015, Tomi Ollila wrote: On Wed, Dec 31 2014, David Bremner da...@tethera.net wrote: Michal

Re: [PATCH v3 10/10] cli: address: Add --filter-by option to configure address filtering

2015-01-09 Thread Michal Sojka
On Fri, Jan 09 2015, Tomi Ollila wrote: On Fri, Jan 09 2015, Michal Sojka sojk...@fel.cvut.cz wrote: Hi, sorry for longer response time :) On Thu, Jan 01 2015, Tomi Ollila wrote: On Wed, Dec 31 2014, David Bremner da...@tethera.net wrote: Michal Sojka sojk...@fel.cvut.cz writes

Re: [PATCH v3 10/10] cli: address: Add --filter-by option to configure address filtering

2015-01-09 Thread Michal Sojka
Hi, sorry for longer response time :) On Thu, Jan 01 2015, Tomi Ollila wrote: On Wed, Dec 31 2014, David Bremner da...@tethera.net wrote: Michal Sojka sojk...@fel.cvut.cz writes: This option allows to configure the criterion for duplicate address filtering. Without this option, all unique

New "notmuch address" command

2014-12-14 Thread Michal Sojka
On P?, pro 12 2014, Lele Gaifax wrote: > Michal Sojka writes: > >>> An (almost) equivalent of "notmuch-addrlookup foo" could be "notmuch >>> address to:foo* OR from:foo*", but it has at least one indesiderable >>> difference:

Re: New notmuch address command

2014-12-14 Thread Michal Sojka
On Pá, pro 12 2014, Lele Gaifax wrote: Michal Sojka sojk...@fel.cvut.cz writes: An (almost) equivalent of notmuch-addrlookup foo could be notmuch address to:foo* OR from:foo*, but it has at least one indesiderable difference: it seems considering the CC field, but always emits the TO content

New "notmuch address" command

2014-12-12 Thread Michal Sojka
Hi Lele, On Fri, Dec 12 2014, Lele Gaifax wrote: > Hi all again, > > I'm happily using "notmuch-addrlookup"[1] as "notmuch-address-command", in > my Emacs configuration. > > As explained in my other message, yesterday I spent some time tweaking > that configuration and tried to replace it with

Re: New notmuch address command

2014-12-12 Thread Michal Sojka
Hi Lele, On Fri, Dec 12 2014, Lele Gaifax wrote: Hi all again, I'm happily using notmuch-addrlookup[1] as notmuch-address-command, in my Emacs configuration. As explained in my other message, yesterday I spent some time tweaking that configuration and tried to replace it with the new

[PATCH v3] nmbug: Add an 'init' command

2014-11-29 Thread Michal Sojka
Hi Trevor, On ?t, ??j 28 2014, W. Trevor King wrote: > For folks that want to start versioning a new tag-space, instead of > cloning one that someone else has already started. > > The empty-blob hash-object call avoids errors like: > > $ nmbug commit > error: invalid object 100644

Re: [PATCH v3] nmbug: Add an 'init' command

2014-11-29 Thread Michal Sojka
Hi Trevor, On Út, říj 28 2014, W. Trevor King wrote: For folks that want to start versioning a new tag-space, instead of cloning one that someone else has already started. The empty-blob hash-object call avoids errors like: $ nmbug commit error: invalid object 100644

[PATCH 2/2] doc: Minor fixes related to notmuch-address

2014-11-12 Thread Michal Sojka
- Add notmuch-address to HTML index - Remove extra '*' --- doc/index.rst| 1 + doc/man1/notmuch.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/index.rst b/doc/index.rst index ba6d5b4..3f0e6e6 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -8,6 +8,7 @@

[PATCH 1/2] NEWS: notmuch address

2014-11-12 Thread Michal Sojka
--- NEWS | 8 1 file changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 8d7ed0a..16cc002 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,14 @@ Stopped `notmuch dump` failing if someone writes to the database limits output of message IDs to messages matching search terms that have

[PATCH 1/2] NEWS: notmuch address

2014-11-12 Thread Michal Sojka
--- NEWS | 8 1 file changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 8d7ed0a..16cc002 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,14 @@ Stopped `notmuch dump` failing if someone writes to the database limits output of message IDs to messages matching search terms that have

[PATCH 2/2] doc: Minor fixes related to notmuch-address

2014-11-12 Thread Michal Sojka
- Add notmuch-address to HTML index - Remove extra '*' --- doc/index.rst| 1 + doc/man1/notmuch.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/index.rst b/doc/index.rst index ba6d5b4..3f0e6e6 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -8,6 +8,7 @@

[PATCH] cli: notmuch address option defaults update

2014-11-07 Thread Michal Sojka
On Thu, Nov 06 2014, Tomi Ollila wrote: > When no --output option were given, change default to display senders > only. This is faster and provides useful-enough list of addresses. > > When only --count option is given, display senders (in contrary to not > displaying anything). > > Document how

Re: [PATCH] cli: notmuch address option defaults update

2014-11-07 Thread Michal Sojka
On Thu, Nov 06 2014, Tomi Ollila wrote: When no --output option were given, change default to display senders only. This is faster and provides useful-enough list of addresses. When only --count option is given, display senders (in contrary to not displaying anything). Document how --count

[PATCH v2 06/10] cli: Introduce "notmuch address" command

2014-11-05 Thread Michal Sojka
On Wed, Nov 05 2014, Mark Walters wrote: > On Tue, 04 Nov 2014, Michal Sojka wrote: >> On Tue, Nov 04 2014, Mark Walters wrote: >>> On Mon, 03 Nov 2014, Michal Sojka wrote: >>>> This moves address-related functionality from search command to the >>>&g

[PATCH v3 10/10] cli: address: Add --filter-by option to configure address filtering

2014-11-05 Thread Michal Sojka
This option allows to configure the criterion for duplicate address filtering. Without this option, all unique combinations of name and address parts are printed. This option allows to filter the output more, for example to only contain unique address parts. --- completion/notmuch-completion.bash

[PATCH v3 09/10] cli: address: Add --output=count

2014-11-05 Thread Michal Sojka
This output prints how many times was each address encountered during search. --- completion/notmuch-completion.bash | 2 +- completion/notmuch-completion.zsh | 2 +- doc/man1/notmuch-address.rst | 11 - notmuch-search.c | 49

[PATCH v3 08/10] cli: address: Do not output duplicate addresses

2014-11-05 Thread Michal Sojka
This filters out duplicate addresses from address command output. It also also adds tests for the address command. The code here is an extended version of a patch from Jani Nikula. --- doc/man1/notmuch-address.rst | 2 +- notmuch-search.c | 42 ++-

[PATCH v3 07/10] cli: search: Convert --output to keyword argument

2014-11-05 Thread Michal Sojka
Now, when address related outputs are in a separate command, it makes no sense to combine multiple --output options in search command line. Using switch statement to handle different outputs is more readable than a series of if statements. --- doc/man1/notmuch-search.rst | 3 ---

[PATCH v3 06/10] cli: Introduce "notmuch address" command

2014-11-05 Thread Michal Sojka
This moves address-related functionality from search command to the new address command. The implementation shares almost all code and some command line options. Options --offset and --limit were intentionally not included in the address command, because they refer to messages numbers, which

[PATCH v3 05/10] cli: add support for hierarchical command line option arrays

2014-11-05 Thread Michal Sojka
From: Jani Nikula NOTMUCH_OPT_INHERIT expects a notmuch_opt_desc_t * pointer in output_var. The "Unrecognized option" message was moved out of parse_option() to not be emitted twice or when parsing a non-inherited option. --- command-line-arguments.c | 16 +---

[PATCH v3 04/10] cli: search: Split notmuch_search_command to smaller functions

2014-11-05 Thread Michal Sojka
In a subsequent commit, these functions will be used to share some functionality between search and address commands. --- notmuch-search.c | 155 ++- 1 file changed, 86 insertions(+), 69 deletions(-) diff --git a/notmuch-search.c

[PATCH v3 03/10] cli: search: Convert ctx. to ctx->

2014-11-05 Thread Michal Sojka
In the next commit, notmuch_search_command will be refactored to several smaller functions. In order to simplify the next commit to verbatim move of several lines to new functions with search_context_t* argument, we convert all references to this structure to pointer dereferences. To do so we

[PATCH v3 02/10] cli: search: Move more variables into search_context_t

2014-11-05 Thread Michal Sojka
In order to share some command line options between search and address subcommands we need to add corresponding variables to the context structure. While we are at it, we also add notmuch_database_t to unify parameters of all do_search_* functions and to simplify subsequent commits. Otherwise,

[PATCH v3 01/10] cli: search: Rename options to context

2014-11-05 Thread Michal Sojka
In the next commit the options structure will be extended by non-option variables. Therefore we need a more generic name. Just text replacement, no other changes. --- notmuch-search.c | 142 +++ 1 file changed, 71 insertions(+), 71 deletions(-)

[PATCH v3 00/10] "notmuch address" command

2014-11-05 Thread Michal Sojka
-sojkam1 at fel.cvut.cz Jani Nikula (1): cli: add support for hierarchical command line option arrays Michal Sojka (9): cli: search: Rename options to context cli: search: Move more variables into search_context_t cli: search: Convert ctx. to ctx-> cli: search: Split notmuch_search_c

Re: [PATCH v2 06/10] cli: Introduce notmuch address command

2014-11-05 Thread Michal Sojka
On Wed, Nov 05 2014, Mark Walters wrote: On Tue, 04 Nov 2014, Michal Sojka sojk...@fel.cvut.cz wrote: On Tue, Nov 04 2014, Mark Walters wrote: On Mon, 03 Nov 2014, Michal Sojka sojk...@fel.cvut.cz wrote: This moves address-related functionality from search command to the new address command

[PATCH v2 06/10] cli: Introduce "notmuch address" command

2014-11-04 Thread Michal Sojka
On Tue, Nov 04 2014, Mark Walters wrote: > On Mon, 03 Nov 2014, Michal Sojka wrote: >> This moves address-related functionality from search command to the >> new address command. The implementation shares almost all code and >> some command line options. >> >>

[PATCH v2 06/10] cli: Introduce "notmuch address" command

2014-11-04 Thread Michal Sojka
On Tue, Nov 04 2014, David Bremner wrote: > Michal Sojka writes: > >> +{ >> +local cur prev words cword split >> +_init_completion -s || return >> + >> +$split && >> +case "${prev}" in >> +--format) >

[PATCH v2 08/10] cli: address: Do not output duplicate addresses

2014-11-04 Thread Michal Sojka
On Tue, Nov 04 2014, David Bremner wrote: > Michal Sojka writes: > >> >> +/* Returns TRUE iff name and addr is duplicate. */ > > If you're revising this patch, it would be good to mention the side > effect of this function. > >> -process_addre

[PATCH v2 07/10] cli: search: Convert --output to keyword argument

2014-11-04 Thread Michal Sojka
On Tue, Nov 04 2014, Mark Walters wrote: > Hi > > On Mon, 03 Nov 2014, Michal Sojka wrote: >> Now, when address related outputs are in a separate command, it makes >> no sense to combine multiple --output options in search command line. >> Using switch statement

[PATCH v2 10/10] cli: address: Add --filter-by option to configure address filtering

2014-11-04 Thread Michal Sojka
This option allows to configure the criterion for duplicate address filtering. Without this option, all unique combinations of name and address parts are printed. This option allows to filter the output more, for example to only contain unique address parts. --- completion/notmuch-completion.bash

[PATCH v2 09/10] cli: address: Add --output=count

2014-11-04 Thread Michal Sojka
This output prints how many times was each address encountered during search. --- completion/notmuch-completion.bash | 2 +- completion/notmuch-completion.zsh | 2 +- doc/man1/notmuch-address.rst | 7 ++ notmuch-search.c | 49 --

[PATCH v2 08/10] cli: address: Do not output duplicate addresses

2014-11-04 Thread Michal Sojka
This filters out duplicate addresses from address command output. It also also adds tests for the address command. The code here is an extended version of a patch from Jani Nikula. --- doc/man1/notmuch-address.rst | 2 +- notmuch-search.c | 40 -

[PATCH v2 07/10] cli: search: Convert --output to keyword argument

2014-11-04 Thread Michal Sojka
Now, when address related outputs are in a separate command, it makes no sense to combine multiple --output options in search command line. Using switch statement to handle different outputs is more readable than a series of if statements. --- doc/man1/notmuch-search.rst | 3 ---

[PATCH v2 06/10] cli: Introduce "notmuch address" command

2014-11-04 Thread Michal Sojka
This moves address-related functionality from search command to the new address command. The implementation shares almost all code and some command line options. Options --offset and --limit were intentionally not included in the address command, because they refer to messages numbers, which

[PATCH v2 05/10] cli: add support for hierarchical command line option arrays

2014-11-04 Thread Michal Sojka
From: Jani Nikula NOTMUCH_OPT_INHERIT expects a notmuch_opt_desc_t * pointer in output_var. The "Unrecognized option" message was moved out of parse_option() to not be emitted twice or when parsing a non-inherited option. --- command-line-arguments.c | 16 +---

[PATCH v2 04/10] cli: search: Split notmuch_search_command to smaller functions

2014-11-04 Thread Michal Sojka
In the next commit, these functions will be used to share some functionality between search and address commands. --- notmuch-search.c | 155 ++- 1 file changed, 86 insertions(+), 69 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c

[PATCH v2 03/10] cli: search: Convert ctx. to ctx->

2014-11-04 Thread Michal Sojka
Mostly text replacement. --- notmuch-search.c | 81 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 3d2012b..6765a16 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -474,7

[PATCH v2 02/10] cli: search: Move more variables into search_context_t

2014-11-04 Thread Michal Sojka
Just refactoring, no functional changes. --- notmuch-search.c | 49 ++--- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 2c47b80..3d2012b 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@

[PATCH v2 01/10] cli: search: Rename options to context

2014-11-04 Thread Michal Sojka
Just text replacement, no other changes. --- notmuch-search.c | 142 +++ 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 6345fb6..2c47b80 100644 --- a/notmuch-search.c +++

[PATCH v2 00/10] "notmuch address" command

2014-11-04 Thread Michal Sojka
send-email-sojkam1 at fel.cvut.cz Jani Nikula (1): cli: add support for hierarchical command line option arrays Michal Sojka (9): cli: search: Rename options to context cli: search: Move more variables into search_context_t cli: search: Convert ctx. to ctx-> cli: search: Split notmuch

Re: [PATCH v2 07/10] cli: search: Convert --output to keyword argument

2014-11-04 Thread Michal Sojka
On Tue, Nov 04 2014, Mark Walters wrote: Hi On Mon, 03 Nov 2014, Michal Sojka sojk...@fel.cvut.cz wrote: Now, when address related outputs are in a separate command, it makes no sense to combine multiple --output options in search command line. Using switch statement to handle different

Re: [PATCH v2 08/10] cli: address: Do not output duplicate addresses

2014-11-04 Thread Michal Sojka
On Tue, Nov 04 2014, David Bremner wrote: Michal Sojka sojk...@fel.cvut.cz writes: +/* Returns TRUE iff name and addr is duplicate. */ If you're revising this patch, it would be good to mention the side effect of this function. -process_address_list (const search_context_t *ctx

Re: [PATCH v2 06/10] cli: Introduce notmuch address command

2014-11-04 Thread Michal Sojka
On Tue, Nov 04 2014, David Bremner wrote: Michal Sojka sojk...@fel.cvut.cz writes: +{ +local cur prev words cword split +_init_completion -s || return + +$split +case ${prev} in +--format) +COMPREPLY=( $( compgen -W json sexp text text0 -- ${cur

Re: [PATCH v2 06/10] cli: Introduce notmuch address command

2014-11-04 Thread Michal Sojka
On Tue, Nov 04 2014, Mark Walters wrote: On Mon, 03 Nov 2014, Michal Sojka sojk...@fel.cvut.cz wrote: This moves address-related functionality from search command to the new address command. The implementation shares almost all code and some command line options. Options --offset and --limit

[PATCH v3 03/10] cli: search: Convert ctx. to ctx-

2014-11-04 Thread Michal Sojka
In the next commit, notmuch_search_command will be refactored to several smaller functions. In order to simplify the next commit to verbatim move of several lines to new functions with search_context_t* argument, we convert all references to this structure to pointer dereferences. To do so we

[PATCH v3 00/10] notmuch address command

2014-11-04 Thread Michal Sojka
(1): cli: add support for hierarchical command line option arrays Michal Sojka (9): cli: search: Rename options to context cli: search: Move more variables into search_context_t cli: search: Convert ctx. to ctx- cli: search: Split notmuch_search_command to smaller functions cli

[PATCH v3 07/10] cli: search: Convert --output to keyword argument

2014-11-04 Thread Michal Sojka
Now, when address related outputs are in a separate command, it makes no sense to combine multiple --output options in search command line. Using switch statement to handle different outputs is more readable than a series of if statements. --- doc/man1/notmuch-search.rst | 3 ---

[PATCH v3 05/10] cli: add support for hierarchical command line option arrays

2014-11-04 Thread Michal Sojka
From: Jani Nikula j...@nikula.org NOTMUCH_OPT_INHERIT expects a notmuch_opt_desc_t * pointer in output_var. The Unrecognized option message was moved out of parse_option() to not be emitted twice or when parsing a non-inherited option. --- command-line-arguments.c | 16 +---

[PATCH v3 10/10] cli: address: Add --filter-by option to configure address filtering

2014-11-04 Thread Michal Sojka
This option allows to configure the criterion for duplicate address filtering. Without this option, all unique combinations of name and address parts are printed. This option allows to filter the output more, for example to only contain unique address parts. --- completion/notmuch-completion.bash

[PATCH v3 02/10] cli: search: Move more variables into search_context_t

2014-11-04 Thread Michal Sojka
In order to share some command line options between search and address subcommands we need to add corresponding variables to the context structure. While we are at it, we also add notmuch_database_t to unify parameters of all do_search_* functions and to simplify subsequent commits. Otherwise,

[PATCH v3 08/10] cli: address: Do not output duplicate addresses

2014-11-04 Thread Michal Sojka
This filters out duplicate addresses from address command output. It also also adds tests for the address command. The code here is an extended version of a patch from Jani Nikula. --- doc/man1/notmuch-address.rst | 2 +- notmuch-search.c | 42 ++-

[PATCH v3 09/10] cli: address: Add --output=count

2014-11-04 Thread Michal Sojka
This output prints how many times was each address encountered during search. --- completion/notmuch-completion.bash | 2 +- completion/notmuch-completion.zsh | 2 +- doc/man1/notmuch-address.rst | 11 - notmuch-search.c | 49

[PATCH v3 04/10] cli: search: Split notmuch_search_command to smaller functions

2014-11-04 Thread Michal Sojka
In a subsequent commit, these functions will be used to share some functionality between search and address commands. --- notmuch-search.c | 155 ++- 1 file changed, 86 insertions(+), 69 deletions(-) diff --git a/notmuch-search.c

[PATCH v3 01/10] cli: search: Rename options to context

2014-11-04 Thread Michal Sojka
In the next commit the options structure will be extended by non-option variables. Therefore we need a more generic name. Just text replacement, no other changes. --- notmuch-search.c | 142 +++ 1 file changed, 71 insertions(+), 71 deletions(-)

[PATCH v3 06/10] cli: Introduce notmuch address command

2014-11-04 Thread Michal Sojka
This moves address-related functionality from search command to the new address command. The implementation shares almost all code and some command line options. Options --offset and --limit were intentionally not included in the address command, because they refer to messages numbers, which

[PATCH v6 6/7] cli: search: Add --output=count

2014-11-03 Thread Michal Sojka
Hi Tomi, On Mon, Nov 03 2014, Tomi Ollila wrote: > On Sun, Nov 02 2014, Michal Sojka wrote: > >> On 2. listopadu 2014 10:29:28 CET, Mark Walters > gmail.com> wrote: >>> >>>Hi >>> >>>On Sun, 02 Nov 2014, Michal Sojka wrote: >>>>

Re: [PATCH v6 6/7] cli: search: Add --output=count

2014-11-03 Thread Michal Sojka
Hi Tomi, On Mon, Nov 03 2014, Tomi Ollila wrote: On Sun, Nov 02 2014, Michal Sojka sojk...@fel.cvut.cz wrote: On 2. listopadu 2014 10:29:28 CET, Mark Walters markwalters1...@gmail.com wrote: Hi On Sun, 02 Nov 2014, Michal Sojka sojk...@fel.cvut.cz wrote: On Sat, Nov 01 2014, Mark Walters

[PATCH v2 02/10] cli: search: Move more variables into search_context_t

2014-11-03 Thread Michal Sojka
Just refactoring, no functional changes. --- notmuch-search.c | 49 ++--- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 2c47b80..3d2012b 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@

[PATCH v2 06/10] cli: Introduce notmuch address command

2014-11-03 Thread Michal Sojka
This moves address-related functionality from search command to the new address command. The implementation shares almost all code and some command line options. Options --offset and --limit were intentionally not included in the address command, because they refer to messages numbers, which

[PATCH v2 04/10] cli: search: Split notmuch_search_command to smaller functions

2014-11-03 Thread Michal Sojka
In the next commit, these functions will be used to share some functionality between search and address commands. --- notmuch-search.c | 155 ++- 1 file changed, 86 insertions(+), 69 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c

  1   2   3   4   5   6   7   8   9   >