[PATCH] emacs: Add a space after completed tag operations

2013-10-28 Thread David Bremner
Austin Clements  writes:

> Previously, when a user fully completed a tag operation, they had to
> press space to begin entering another tag operation.  This is
> different from, say, shell file name completion, which typically
> inserts a space after an unambiguous completion under the assumption
> that the user will want to enter more input.

pushed.

d


Re: [PATCH] emacs: Add a space after completed tag operations

2013-10-28 Thread David Bremner
Austin Clements amdra...@mit.edu writes:

 Previously, when a user fully completed a tag operation, they had to
 press space to begin entering another tag operation.  This is
 different from, say, shell file name completion, which typically
 inserts a space after an unambiguous completion under the assumption
 that the user will want to enter more input.

pushed.

d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] emacs: Add a space after completed tag operations

2013-10-25 Thread Tomi Ollila
On Fri, Oct 25 2013, Austin Clements  wrote:

> Previously, when a user fully completed a tag operation, they had to
> press space to begin entering another tag operation.  This is
> different from, say, shell file name completion, which typically
> inserts a space after an unambiguous completion under the assumption
> that the user will want to enter more input.
>
> This patch tweaks `notmuch-read-tag-changes' to act more like shell
> file name completion: after an unambiguous tag completion, it now
> inserts a space, ready and waiting for another tagging operation from
> the user.  This is backwards-compatible with old habits, since there's
> no harm in putting an extra space.
> ---

LGTM. Tested by hand-editing "(mapcar ...)" part to the code (re-evaluated
defun in *scratch* buffer) and it worked fine.

Tomi


>
> Just because of the context, this must be applied on top of the
> currently pending tag completion series
> id:"1382487721-31776-1-git-send-email-amdragon at mit.edu".  The change
> itself should be otherwise independent.
>
>  emacs/notmuch-tag.el | 12 ++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
> index 7b21006..8b921f1 100644
> --- a/emacs/notmuch-tag.el
> +++ b/emacs/notmuch-tag.el
> @@ -229,8 +229,16 @@ initial input in the minibuffer."
>   (set-keymap-parent map crm-local-completion-map)
>   (define-key map " " 'self-insert-command)
>   map)))
> -(delete "" (completing-read-multiple prompt
> - tag-list nil nil initial-input
> +(delete "" (completing-read-multiple
> + prompt
> + ;; Append the separator to each completion so when the
> + ;; user completes a tag they can immediately begin
> + ;; entering another.  `completing-read-multiple'
> + ;; ultimately splits the input on crm-separator, so we
> + ;; don't need to strip this back off (we just need to
> + ;; delete "empty" entries caused by trailing spaces).
> + (mapcar (lambda (tag-op) (concat tag-op crm-separator)) 
> tag-list)
> + nil nil initial-input
>   'notmuch-read-tag-changes-history
>  
>  (defun notmuch-update-tags (tags tag-changes)
> -- 
> 1.8.4.rc3
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] emacs: Add a space after completed tag operations

2013-10-25 Thread Mark Walters

Tested and LGTM +1

Best wishes

Mark

On Thu, 24 Oct 2013, Austin Clements  wrote:
> Previously, when a user fully completed a tag operation, they had to
> press space to begin entering another tag operation.  This is
> different from, say, shell file name completion, which typically
> inserts a space after an unambiguous completion under the assumption
> that the user will want to enter more input.
>
> This patch tweaks `notmuch-read-tag-changes' to act more like shell
> file name completion: after an unambiguous tag completion, it now
> inserts a space, ready and waiting for another tagging operation from
> the user.  This is backwards-compatible with old habits, since there's
> no harm in putting an extra space.
> ---
>
> Just because of the context, this must be applied on top of the
> currently pending tag completion series
> id:"1382487721-31776-1-git-send-email-amdragon at mit.edu".  The change
> itself should be otherwise independent.
>
>  emacs/notmuch-tag.el | 12 ++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
> index 7b21006..8b921f1 100644
> --- a/emacs/notmuch-tag.el
> +++ b/emacs/notmuch-tag.el
> @@ -229,8 +229,16 @@ initial input in the minibuffer."
>   (set-keymap-parent map crm-local-completion-map)
>   (define-key map " " 'self-insert-command)
>   map)))
> -(delete "" (completing-read-multiple prompt
> - tag-list nil nil initial-input
> +(delete "" (completing-read-multiple
> + prompt
> + ;; Append the separator to each completion so when the
> + ;; user completes a tag they can immediately begin
> + ;; entering another.  `completing-read-multiple'
> + ;; ultimately splits the input on crm-separator, so we
> + ;; don't need to strip this back off (we just need to
> + ;; delete "empty" entries caused by trailing spaces).
> + (mapcar (lambda (tag-op) (concat tag-op crm-separator)) 
> tag-list)
> + nil nil initial-input
>   'notmuch-read-tag-changes-history
>  
>  (defun notmuch-update-tags (tags tag-changes)
> -- 
> 1.8.4.rc3
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] emacs: Add a space after completed tag operations

2013-10-25 Thread Tomi Ollila
On Fri, Oct 25 2013, Austin Clements amdra...@mit.edu wrote:

 Previously, when a user fully completed a tag operation, they had to
 press space to begin entering another tag operation.  This is
 different from, say, shell file name completion, which typically
 inserts a space after an unambiguous completion under the assumption
 that the user will want to enter more input.

 This patch tweaks `notmuch-read-tag-changes' to act more like shell
 file name completion: after an unambiguous tag completion, it now
 inserts a space, ready and waiting for another tagging operation from
 the user.  This is backwards-compatible with old habits, since there's
 no harm in putting an extra space.
 ---

LGTM. Tested by hand-editing (mapcar ...) part to the code (re-evaluated
defun in *scratch* buffer) and it worked fine.

Tomi



 Just because of the context, this must be applied on top of the
 currently pending tag completion series
 id:1382487721-31776-1-git-send-email-amdra...@mit.edu.  The change
 itself should be otherwise independent.

  emacs/notmuch-tag.el | 12 ++--
  1 file changed, 10 insertions(+), 2 deletions(-)

 diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
 index 7b21006..8b921f1 100644
 --- a/emacs/notmuch-tag.el
 +++ b/emacs/notmuch-tag.el
 @@ -229,8 +229,16 @@ initial input in the minibuffer.
   (set-keymap-parent map crm-local-completion-map)
   (define-key map   'self-insert-command)
   map)))
 -(delete  (completing-read-multiple prompt
 - tag-list nil nil initial-input
 +(delete  (completing-read-multiple
 + prompt
 + ;; Append the separator to each completion so when the
 + ;; user completes a tag they can immediately begin
 + ;; entering another.  `completing-read-multiple'
 + ;; ultimately splits the input on crm-separator, so we
 + ;; don't need to strip this back off (we just need to
 + ;; delete empty entries caused by trailing spaces).
 + (mapcar (lambda (tag-op) (concat tag-op crm-separator)) 
 tag-list)
 + nil nil initial-input
   'notmuch-read-tag-changes-history
  
  (defun notmuch-update-tags (tags tag-changes)
 -- 
 1.8.4.rc3

 ___
 notmuch mailing list
 notmuch@notmuchmail.org
 http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] emacs: Add a space after completed tag operations

2013-10-25 Thread Mark Walters

Tested and LGTM +1

Best wishes

Mark

On Thu, 24 Oct 2013, Austin Clements amdra...@mit.edu wrote:
 Previously, when a user fully completed a tag operation, they had to
 press space to begin entering another tag operation.  This is
 different from, say, shell file name completion, which typically
 inserts a space after an unambiguous completion under the assumption
 that the user will want to enter more input.

 This patch tweaks `notmuch-read-tag-changes' to act more like shell
 file name completion: after an unambiguous tag completion, it now
 inserts a space, ready and waiting for another tagging operation from
 the user.  This is backwards-compatible with old habits, since there's
 no harm in putting an extra space.
 ---

 Just because of the context, this must be applied on top of the
 currently pending tag completion series
 id:1382487721-31776-1-git-send-email-amdra...@mit.edu.  The change
 itself should be otherwise independent.

  emacs/notmuch-tag.el | 12 ++--
  1 file changed, 10 insertions(+), 2 deletions(-)

 diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
 index 7b21006..8b921f1 100644
 --- a/emacs/notmuch-tag.el
 +++ b/emacs/notmuch-tag.el
 @@ -229,8 +229,16 @@ initial input in the minibuffer.
   (set-keymap-parent map crm-local-completion-map)
   (define-key map   'self-insert-command)
   map)))
 -(delete  (completing-read-multiple prompt
 - tag-list nil nil initial-input
 +(delete  (completing-read-multiple
 + prompt
 + ;; Append the separator to each completion so when the
 + ;; user completes a tag they can immediately begin
 + ;; entering another.  `completing-read-multiple'
 + ;; ultimately splits the input on crm-separator, so we
 + ;; don't need to strip this back off (we just need to
 + ;; delete empty entries caused by trailing spaces).
 + (mapcar (lambda (tag-op) (concat tag-op crm-separator)) 
 tag-list)
 + nil nil initial-input
   'notmuch-read-tag-changes-history
  
  (defun notmuch-update-tags (tags tag-changes)
 -- 
 1.8.4.rc3

 ___
 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: Add a space after completed tag operations

2013-10-24 Thread Austin Clements
Previously, when a user fully completed a tag operation, they had to
press space to begin entering another tag operation.  This is
different from, say, shell file name completion, which typically
inserts a space after an unambiguous completion under the assumption
that the user will want to enter more input.

This patch tweaks `notmuch-read-tag-changes' to act more like shell
file name completion: after an unambiguous tag completion, it now
inserts a space, ready and waiting for another tagging operation from
the user.  This is backwards-compatible with old habits, since there's
no harm in putting an extra space.
---

Just because of the context, this must be applied on top of the
currently pending tag completion series
id:"1382487721-31776-1-git-send-email-amdragon at mit.edu".  The change
itself should be otherwise independent.

 emacs/notmuch-tag.el | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
index 7b21006..8b921f1 100644
--- a/emacs/notmuch-tag.el
+++ b/emacs/notmuch-tag.el
@@ -229,8 +229,16 @@ initial input in the minibuffer."
(set-keymap-parent map crm-local-completion-map)
(define-key map " " 'self-insert-command)
map)))
-(delete "" (completing-read-multiple prompt
-   tag-list nil nil initial-input
+(delete "" (completing-read-multiple
+   prompt
+   ;; Append the separator to each completion so when the
+   ;; user completes a tag they can immediately begin
+   ;; entering another.  `completing-read-multiple'
+   ;; ultimately splits the input on crm-separator, so we
+   ;; don't need to strip this back off (we just need to
+   ;; delete "empty" entries caused by trailing spaces).
+   (mapcar (lambda (tag-op) (concat tag-op crm-separator)) 
tag-list)
+   nil nil initial-input
'notmuch-read-tag-changes-history

 (defun notmuch-update-tags (tags tag-changes)
-- 
1.8.4.rc3



[PATCH] emacs: Add a space after completed tag operations

2013-10-24 Thread Austin Clements
Previously, when a user fully completed a tag operation, they had to
press space to begin entering another tag operation.  This is
different from, say, shell file name completion, which typically
inserts a space after an unambiguous completion under the assumption
that the user will want to enter more input.

This patch tweaks `notmuch-read-tag-changes' to act more like shell
file name completion: after an unambiguous tag completion, it now
inserts a space, ready and waiting for another tagging operation from
the user.  This is backwards-compatible with old habits, since there's
no harm in putting an extra space.
---

Just because of the context, this must be applied on top of the
currently pending tag completion series
id:1382487721-31776-1-git-send-email-amdra...@mit.edu.  The change
itself should be otherwise independent.

 emacs/notmuch-tag.el | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
index 7b21006..8b921f1 100644
--- a/emacs/notmuch-tag.el
+++ b/emacs/notmuch-tag.el
@@ -229,8 +229,16 @@ initial input in the minibuffer.
(set-keymap-parent map crm-local-completion-map)
(define-key map   'self-insert-command)
map)))
-(delete  (completing-read-multiple prompt
-   tag-list nil nil initial-input
+(delete  (completing-read-multiple
+   prompt
+   ;; Append the separator to each completion so when the
+   ;; user completes a tag they can immediately begin
+   ;; entering another.  `completing-read-multiple'
+   ;; ultimately splits the input on crm-separator, so we
+   ;; don't need to strip this back off (we just need to
+   ;; delete empty entries caused by trailing spaces).
+   (mapcar (lambda (tag-op) (concat tag-op crm-separator)) 
tag-list)
+   nil nil initial-input
'notmuch-read-tag-changes-history
 
 (defun notmuch-update-tags (tags tag-changes)
-- 
1.8.4.rc3

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch