Re: [PATCH] emacs: Added is:tag style completion to notmuch-read-query.
David Bremner da...@tethera.net writes: From: Charles Celerier ccel...@cs.stanford.edu The notmuch-search-terms man page states that tag:tag is equivalent to is:tag. Completion for is:tag style searches is now supported in the Emacs interface. Amended by David Bremner: combine lexical-let and let into lexical-let* Pushed. I had to resolve conflicts by hand, which is why I didn't merge it for 0.20. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] emacs: Added is:tag style completion to notmuch-read-query.
Hi From: Charles Celerier ccel...@cs.stanford.edu The notmuch-search-terms man page states that tag:tag is equivalent to is:tag. Completion for is:tag style searches is now supported in the Emacs interface. Amended by David Bremner: combine lexical-let and let into lexical-let* This version looks good to me; it works and passes all tests. +1 Note it does not apply to master but only needs a tiny fixup (see below) Best wishes Mark --- emacs/notmuch.el | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 218486a..1b6971e 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -855,13 +855,15 @@ See `notmuch-tag' for information on the format of TAG-CHANGES. Read a notmuch-query from the minibuffer with completion. PROMPT is the string to prompt with. - (lexical-let - ((completions - (append (list folder: path: thread: id: date: from: to: - subject: attachment:) ^ this line now has a mimetype: final option - (mapcar (lambda (tag) - (concat tag: (notmuch-escape-boolean-term tag))) - (process-lines notmuch-command search --output=tags *) + (lexical-let* + ((all-tags +(mapcar (lambda (tag) (notmuch-escape-boolean-term tag)) +(process-lines notmuch-command search --output=tags *))) + (completions + (append (list folder: path: thread: id: date: from: to: +subject: attachment:) + (mapcar (lambda (tag) (concat tag: tag)) all-tags) + (mapcar (lambda (tag) (concat is: tag)) all-tags (let ((keymap (copy-keymap minibuffer-local-map)) (current-query (case major-mode (notmuch-search-mode (notmuch-search-get-query)) -- 2.1.3 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] emacs: Added is:tag style completion to notmuch-read-query.
From: Charles Celerier ccel...@cs.stanford.edu The notmuch-search-terms man page states that tag:tag is equivalent to is:tag. Completion for is:tag style searches is now supported in the Emacs interface. Amended by David Bremner: combine lexical-let and let into lexical-let* --- emacs/notmuch.el | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 218486a..1b6971e 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -855,13 +855,15 @@ See `notmuch-tag' for information on the format of TAG-CHANGES. Read a notmuch-query from the minibuffer with completion. PROMPT is the string to prompt with. - (lexical-let - ((completions - (append (list folder: path: thread: id: date: from: to: - subject: attachment:) - (mapcar (lambda (tag) - (concat tag: (notmuch-escape-boolean-term tag))) - (process-lines notmuch-command search --output=tags *) + (lexical-let* + ((all-tags +(mapcar (lambda (tag) (notmuch-escape-boolean-term tag)) +(process-lines notmuch-command search --output=tags *))) + (completions +(append (list folder: path: thread: id: date: from: to: + subject: attachment:) +(mapcar (lambda (tag) (concat tag: tag)) all-tags) +(mapcar (lambda (tag) (concat is: tag)) all-tags (let ((keymap (copy-keymap minibuffer-local-map)) (current-query (case major-mode (notmuch-search-mode (notmuch-search-get-query)) -- 2.1.3 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] emacs: Added is:tag style completion to notmuch-read-query.
David Edmondson d...@dme.org writes: On Sat, Nov 29 2014, Charles Celerier wrote: Should use a `let' binding rather than `setq'. Otherwise, looks good. (lexical-let ((completions (append (list folder: path: thread: id: date: f What about using lexical-let* to combine the two binding forms? d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] emacs: Added is:tag style completion to notmuch-read-query.
Just updated the patch to use lexical-let as suggested. I'm not too familiar with emacs-lisp, so please tell me if you had something else in mind. charles David Bremner da...@tethera.net writes: David Edmondson d...@dme.org writes: On Sat, Nov 29 2014, Charles Celerier wrote: Should use a `let' binding rather than `setq'. Otherwise, looks good. (lexical-let ((completions (append (list folder: path: thread: id: date: f What about using lexical-let* to combine the two binding forms? d signature.asc Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] emacs: Added is:tag style completion to notmuch-read-query.
The notmuch-search-terms man page states that tag:tag is equivalent to is:tag. Completion for is:tag style searches is now supported in the Emacs interface. Signed-off-by: Charles Celerier ccel...@cs.stanford.edu --- emacs/notmuch.el | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 218486a..e4b77c7 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -855,13 +855,15 @@ See `notmuch-tag' for information on the format of TAG-CHANGES. Read a notmuch-query from the minibuffer with completion. PROMPT is the string to prompt with. + (setq all-tags +(mapcar (lambda (tag) (notmuch-escape-boolean-term tag)) +(process-lines notmuch-command search --output=tags *))) (lexical-let ((completions (append (list folder: path: thread: id: date: from: to: subject: attachment:) - (mapcar (lambda (tag) - (concat tag: (notmuch-escape-boolean-term tag))) - (process-lines notmuch-command search --output=tags *) + (mapcar (lambda (tag) (concat tag: tag)) all-tags) + (mapcar (lambda (tag) (concat is: tag)) all-tags (let ((keymap (copy-keymap minibuffer-local-map)) (current-query (case major-mode (notmuch-search-mode (notmuch-search-get-query)) -- 2.1.2 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] emacs: Added is:tag style completion to notmuch-read-query.
On Sat, Nov 29 2014, Charles Celerier wrote: The notmuch-search-terms man page states that tag:tag is equivalent to is:tag. Completion for is:tag style searches is now supported in the Emacs interface. Signed-off-by: Charles Celerier ccel...@cs.stanford.edu --- emacs/notmuch.el | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 218486a..e4b77c7 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -855,13 +855,15 @@ See `notmuch-tag' for information on the format of TAG-CHANGES. Read a notmuch-query from the minibuffer with completion. PROMPT is the string to prompt with. + (setq all-tags +(mapcar (lambda (tag) (notmuch-escape-boolean-term tag)) +(process-lines notmuch-command search --output=tags *))) Should use a `let' binding rather than `setq'. Otherwise, looks good. (lexical-let ((completions (append (list folder: path: thread: id: date: from: to: subject: attachment:) - (mapcar (lambda (tag) - (concat tag: (notmuch-escape-boolean-term tag))) - (process-lines notmuch-command search --output=tags *) + (mapcar (lambda (tag) (concat tag: tag)) all-tags) + (mapcar (lambda (tag) (concat is: tag)) all-tags (let ((keymap (copy-keymap minibuffer-local-map)) (current-query (case major-mode (notmuch-search-mode (notmuch-search-get-query)) -- 2.1.2 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch