unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* bug fixes to emacs notmuch-tag-completion function
@ 2012-04-09 18:36 Jameson Graef Rollins
  2012-04-09 18:36 ` [PATCH 1/3] emacs: update call in tag-completion function Jameson Graef Rollins
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jameson Graef Rollins @ 2012-04-09 18:36 UTC (permalink / raw)
  To: Notmuch Mail

I had originally included this fixes as part of a more involved series
to fix up tagging functions [0].  However, these are actually bug
fixes that stand alone and should not be bogged down in a series
that's likely going to take a while to come to fruition.  The changes
here are pretty trivial, so hopefully they can get pushed quickly and
I'll rework the rest of tagging fix up series on top of them.

jamie.

[0] id:"1333354853-25729-1-git-send-email-jrollins@finestructure.net"

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] emacs: update call in tag-completion function
  2012-04-09 18:36 bug fixes to emacs notmuch-tag-completion function Jameson Graef Rollins
@ 2012-04-09 18:36 ` Jameson Graef Rollins
  2012-04-09 18:36   ` [PATCH 2/3] emacs: include tags from excluded messages in tag tab completion Jameson Graef Rollins
  2012-04-09 18:51 ` bug fixes to emacs notmuch-tag-completion function Mark Walters
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Jameson Graef Rollins @ 2012-04-09 18:36 UTC (permalink / raw)
  To: Notmuch Mail

"search-tags" is deprecated, so use the more modern and supported
"search --output=tags".
---
 emacs/notmuch.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index f0afa07..38ae005 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -89,7 +89,7 @@ For example:
    (with-output-to-string
      (with-current-buffer standard-output
        (apply 'call-process notmuch-command nil t
-	      nil "search-tags" search-terms)))
+	      nil "search" "--output=tags" search-terms)))
    "\n+" t))
 
 (defun notmuch-select-tag-with-completion (prompt &rest search-terms)
-- 
1.7.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] emacs: include tags from excluded messages in tag tab completion
  2012-04-09 18:36 ` [PATCH 1/3] emacs: update call in tag-completion function Jameson Graef Rollins
@ 2012-04-09 18:36   ` Jameson Graef Rollins
  2012-04-09 18:36     ` [PATCH 3/3] emacs: have tag-completion return all tags for nil input Jameson Graef Rollins
  0 siblings, 1 reply; 7+ messages in thread
From: Jameson Graef Rollins @ 2012-04-09 18:36 UTC (permalink / raw)
  To: Notmuch Mail

The new message exclude functionality will hide tags that only exist
on excluded messages.  However, one might very well want to manually
modify excluded tags.  This makes sure tags from excluded messages are
always available in tab completion.
---
 emacs/notmuch.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 38ae005..8b48399 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -89,7 +89,7 @@ For example:
    (with-output-to-string
      (with-current-buffer standard-output
        (apply 'call-process notmuch-command nil t
-	      nil "search" "--output=tags" search-terms)))
+	      nil "search" "--output=tags" "--exclude=false" search-terms)))
    "\n+" t))
 
 (defun notmuch-select-tag-with-completion (prompt &rest search-terms)
-- 
1.7.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] emacs: have tag-completion return all tags for nil input
  2012-04-09 18:36   ` [PATCH 2/3] emacs: include tags from excluded messages in tag tab completion Jameson Graef Rollins
@ 2012-04-09 18:36     ` Jameson Graef Rollins
  0 siblings, 0 replies; 7+ messages in thread
From: Jameson Graef Rollins @ 2012-04-09 18:36 UTC (permalink / raw)
  To: Notmuch Mail

Previously the function would fail if the initial input was nil.  Now
it will return a list of all tags, which obviously makes much more
sense.
---
 emacs/notmuch.el |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 8b48399..ba833e6 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -85,6 +85,8 @@ For example:
 `notmuch-read-tag-changes' function.")
 
 (defun notmuch-tag-completions (&optional search-terms)
+  (if (null search-terms)
+      (setq search-terms (list "*")))
   (split-string
    (with-output-to-string
      (with-current-buffer standard-output
-- 
1.7.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: bug fixes to emacs notmuch-tag-completion function
  2012-04-09 18:36 bug fixes to emacs notmuch-tag-completion function Jameson Graef Rollins
  2012-04-09 18:36 ` [PATCH 1/3] emacs: update call in tag-completion function Jameson Graef Rollins
@ 2012-04-09 18:51 ` Mark Walters
  2012-04-11 19:23 ` Tomi Ollila
  2012-04-12 11:52 ` David Bremner
  3 siblings, 0 replies; 7+ messages in thread
From: Mark Walters @ 2012-04-09 18:51 UTC (permalink / raw)
  To: Jameson Graef Rollins, Notmuch Mail


All three of these look good to me and include some genuine bug
fixes. +1

Best wishes

Mark

On Mon, 09 Apr 2012, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> I had originally included this fixes as part of a more involved series
> to fix up tagging functions [0].  However, these are actually bug
> fixes that stand alone and should not be bogged down in a series
> that's likely going to take a while to come to fruition.  The changes
> here are pretty trivial, so hopefully they can get pushed quickly and
> I'll rework the rest of tagging fix up series on top of them.
>
> jamie.
>
> [0] id:"1333354853-25729-1-git-send-email-jrollins@finestructure.net"
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug fixes to emacs notmuch-tag-completion function
  2012-04-09 18:36 bug fixes to emacs notmuch-tag-completion function Jameson Graef Rollins
  2012-04-09 18:36 ` [PATCH 1/3] emacs: update call in tag-completion function Jameson Graef Rollins
  2012-04-09 18:51 ` bug fixes to emacs notmuch-tag-completion function Mark Walters
@ 2012-04-11 19:23 ` Tomi Ollila
  2012-04-12 11:52 ` David Bremner
  3 siblings, 0 replies; 7+ messages in thread
From: Tomi Ollila @ 2012-04-11 19:23 UTC (permalink / raw)
  To: Jameson Graef Rollins, Notmuch Mail

On Mon, Apr 09 2012, Jameson Graef Rollins wrote:

> I had originally included this fixes as part of a more involved series
> to fix up tagging functions [0].  However, these are actually bug
> fixes that stand alone and should not be bogged down in a series
> that's likely going to take a while to come to fruition.  The changes
> here are pretty trivial, so hopefully they can get pushed quickly and
> I'll rework the rest of tagging fix up series on top of them.

LGTM.

>
> jamie.
>
> [0] id:"1333354853-25729-1-git-send-email-jrollins@finestructure.net"

Tomi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug fixes to emacs notmuch-tag-completion function
  2012-04-09 18:36 bug fixes to emacs notmuch-tag-completion function Jameson Graef Rollins
                   ` (2 preceding siblings ...)
  2012-04-11 19:23 ` Tomi Ollila
@ 2012-04-12 11:52 ` David Bremner
  3 siblings, 0 replies; 7+ messages in thread
From: David Bremner @ 2012-04-12 11:52 UTC (permalink / raw)
  To: Jameson Graef Rollins, Notmuch Mail

Jameson Graef Rollins <jrollins@finestructure.net> writes:

> I had originally included this fixes as part of a more involved series
> to fix up tagging functions [0].

pushed, 

d

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-12 11:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-09 18:36 bug fixes to emacs notmuch-tag-completion function Jameson Graef Rollins
2012-04-09 18:36 ` [PATCH 1/3] emacs: update call in tag-completion function Jameson Graef Rollins
2012-04-09 18:36   ` [PATCH 2/3] emacs: include tags from excluded messages in tag tab completion Jameson Graef Rollins
2012-04-09 18:36     ` [PATCH 3/3] emacs: have tag-completion return all tags for nil input Jameson Graef Rollins
2012-04-09 18:51 ` bug fixes to emacs notmuch-tag-completion function Mark Walters
2012-04-11 19:23 ` Tomi Ollila
2012-04-12 11:52 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).