* [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom
@ 2011-09-23 19:03 Jani Nikula
2011-09-23 19:03 ` [PATCH 2/2] emacs: Fix notmuch-mua-user-agent defcustom Jani Nikula
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Jani Nikula @ 2011-09-23 19:03 UTC (permalink / raw)
To: notmuch
It was not possible to define custom filters or filter functions because
the types were const. Remove const to allow editing.
Signed-off-by: Jani Nikula <jani@nikula.org>
---
emacs/notmuch-hello.el | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 65fde75..ad1a13f 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -66,8 +66,8 @@ Finally this can be a function that will be called for each tag and
should return a filter for that tag, or nil to hide the tag."
:type '(choice (const :tag "All messages" nil)
(const :tag "Unread messages" "tag:unread")
- (const :tag "Custom filter" string)
- (const :tag "Custom filter function" function))
+ (string :tag "Custom filter")
+ (function :tag "Custom filter function"))
:group 'notmuch)
(defcustom notmuch-hello-hide-tags nil
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] emacs: Fix notmuch-mua-user-agent defcustom
2011-09-23 19:03 [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Jani Nikula
@ 2011-09-23 19:03 ` Jani Nikula
2011-12-16 12:31 ` Dmitry Kurochkin
2011-12-16 12:22 ` [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Dmitry Kurochkin
2011-12-20 19:53 ` [PATCH v2 0/2] emacs: trivial defcustom fixes Jani Nikula
2 siblings, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2011-09-23 19:03 UTC (permalink / raw)
To: notmuch
The :options keyword is not meaningful for function type. Also, it was not
possible to enter nil value, contrary to the notmuch-mua-user-agent
defcustom documentation. Specify the alternatives using choice type, taking
nil into account.
Signed-off-by: Jani Nikula <jani@nikula.org>
---
emacs/notmuch-mua.el | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 8824b08..8b95bd4 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -35,10 +35,12 @@
"Function used to generate a `User-Agent:' string. If this is
`nil' then no `User-Agent:' will be generated."
:group 'notmuch
- :type 'function
- :options '(notmuch-mua-user-agent-full
- notmuch-mua-user-agent-notmuch
- notmuch-mua-user-agent-emacs))
+ :type '(choice (const :tag "No user agent string" nil)
+ (const :tag "Full" notmuch-mua-user-agent-full)
+ (const :tag "Notmuch" notmuch-mua-user-agent-notmuch)
+ (const :tag "Emacs" notmuch-mua-user-agent-emacs)
+ (function :tag "Custom user agent function"
+ :value notmuch-mua-user-agent-full)))
(defcustom notmuch-mua-hidden-headers '("^User-Agent:")
"Headers that are added to the `message-mode' hidden headers
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom
2011-09-23 19:03 [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Jani Nikula
2011-09-23 19:03 ` [PATCH 2/2] emacs: Fix notmuch-mua-user-agent defcustom Jani Nikula
@ 2011-12-16 12:22 ` Dmitry Kurochkin
2011-12-16 12:29 ` Dmitry Kurochkin
2011-12-20 19:53 ` [PATCH v2 0/2] emacs: trivial defcustom fixes Jani Nikula
2 siblings, 1 reply; 10+ messages in thread
From: Dmitry Kurochkin @ 2011-12-16 12:22 UTC (permalink / raw)
To: Jani Nikula, notmuch
Hi Jani.
On Fri, 23 Sep 2011 22:03:41 +0300, Jani Nikula <jani@nikula.org> wrote:
> It was not possible to define custom filters or filter functions because
> the types were const. Remove const to allow editing.
>
How about making "Unread messages" query configurable as well?
Regards,
Dmitry
> Signed-off-by: Jani Nikula <jani@nikula.org>
> ---
> emacs/notmuch-hello.el | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> index 65fde75..ad1a13f 100644
> --- a/emacs/notmuch-hello.el
> +++ b/emacs/notmuch-hello.el
> @@ -66,8 +66,8 @@ Finally this can be a function that will be called for each tag and
> should return a filter for that tag, or nil to hide the tag."
> :type '(choice (const :tag "All messages" nil)
> (const :tag "Unread messages" "tag:unread")
> - (const :tag "Custom filter" string)
> - (const :tag "Custom filter function" function))
> + (string :tag "Custom filter")
> + (function :tag "Custom filter function"))
> :group 'notmuch)
>
> (defcustom notmuch-hello-hide-tags nil
> --
> 1.7.4.1
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom
2011-12-16 12:22 ` [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Dmitry Kurochkin
@ 2011-12-16 12:29 ` Dmitry Kurochkin
0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Kurochkin @ 2011-12-16 12:29 UTC (permalink / raw)
To: Jani Nikula, notmuch
On Fri, 16 Dec 2011 16:22:07 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> Hi Jani.
>
> On Fri, 23 Sep 2011 22:03:41 +0300, Jani Nikula <jani@nikula.org> wrote:
> > It was not possible to define custom filters or filter functions because
> > the types were const. Remove const to allow editing.
> >
>
> How about making "Unread messages" query configurable as well?
>
Oh, we have "Custom filter" option for that.
Should the "Custom filter" have a default value of "tag:unread"? That
would be consistent with custom function options having a default value.
Regards,
Dmitry
> Regards,
> Dmitry
>
> > Signed-off-by: Jani Nikula <jani@nikula.org>
> > ---
> > emacs/notmuch-hello.el | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> > index 65fde75..ad1a13f 100644
> > --- a/emacs/notmuch-hello.el
> > +++ b/emacs/notmuch-hello.el
> > @@ -66,8 +66,8 @@ Finally this can be a function that will be called for each tag and
> > should return a filter for that tag, or nil to hide the tag."
> > :type '(choice (const :tag "All messages" nil)
> > (const :tag "Unread messages" "tag:unread")
> > - (const :tag "Custom filter" string)
> > - (const :tag "Custom filter function" function))
> > + (string :tag "Custom filter")
> > + (function :tag "Custom filter function"))
> > :group 'notmuch)
> >
> > (defcustom notmuch-hello-hide-tags nil
> > --
> > 1.7.4.1
> >
> > _______________________________________________
> > notmuch mailing list
> > notmuch@notmuchmail.org
> > http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] emacs: Fix notmuch-mua-user-agent defcustom
2011-09-23 19:03 ` [PATCH 2/2] emacs: Fix notmuch-mua-user-agent defcustom Jani Nikula
@ 2011-12-16 12:31 ` Dmitry Kurochkin
0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Kurochkin @ 2011-12-16 12:31 UTC (permalink / raw)
To: Jani Nikula, notmuch
On Fri, 23 Sep 2011 22:03:42 +0300, Jani Nikula <jani@nikula.org> wrote:
> The :options keyword is not meaningful for function type. Also, it was not
> possible to enter nil value, contrary to the notmuch-mua-user-agent
> defcustom documentation. Specify the alternatives using choice type, taking
> nil into account.
>
I know little about the customize interface. But the patch makes sense
to me.
Perhaps I would give mode detailed description for the options, but
before the change there was none at all, so this is definitely an
improvement.
Regards,
Dmitry
> Signed-off-by: Jani Nikula <jani@nikula.org>
> ---
> emacs/notmuch-mua.el | 10 ++++++----
> 1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
> index 8824b08..8b95bd4 100644
> --- a/emacs/notmuch-mua.el
> +++ b/emacs/notmuch-mua.el
> @@ -35,10 +35,12 @@
> "Function used to generate a `User-Agent:' string. If this is
> `nil' then no `User-Agent:' will be generated."
> :group 'notmuch
> - :type 'function
> - :options '(notmuch-mua-user-agent-full
> - notmuch-mua-user-agent-notmuch
> - notmuch-mua-user-agent-emacs))
> + :type '(choice (const :tag "No user agent string" nil)
> + (const :tag "Full" notmuch-mua-user-agent-full)
> + (const :tag "Notmuch" notmuch-mua-user-agent-notmuch)
> + (const :tag "Emacs" notmuch-mua-user-agent-emacs)
> + (function :tag "Custom user agent function"
> + :value notmuch-mua-user-agent-full)))
>
> (defcustom notmuch-mua-hidden-headers '("^User-Agent:")
> "Headers that are added to the `message-mode' hidden headers
> --
> 1.7.4.1
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 0/2] emacs: trivial defcustom fixes
2011-09-23 19:03 [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Jani Nikula
2011-09-23 19:03 ` [PATCH 2/2] emacs: Fix notmuch-mua-user-agent defcustom Jani Nikula
2011-12-16 12:22 ` [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Dmitry Kurochkin
@ 2011-12-20 19:53 ` Jani Nikula
2011-12-20 19:53 ` [PATCH v2 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Jani Nikula
` (2 more replies)
2 siblings, 3 replies; 10+ messages in thread
From: Jani Nikula @ 2011-12-20 19:53 UTC (permalink / raw)
To: notmuch
Hi all, v2 of a couple of defcustom fixes. Now with a default value for "Custom
filter" in patch 1/2 as suggested by Dmitry. No other changes.
BR,
Jani.
Jani Nikula (2):
emacs: Fix notmuch-hello-tag-list-make-query defcustom
emacs: Fix notmuch-mua-user-agent defcustom
emacs/notmuch-hello.el | 5 +++--
emacs/notmuch-mua.el | 10 ++++++----
2 files changed, 9 insertions(+), 6 deletions(-)
--
1.7.5.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom
2011-12-20 19:53 ` [PATCH v2 0/2] emacs: trivial defcustom fixes Jani Nikula
@ 2011-12-20 19:53 ` Jani Nikula
2011-12-22 11:34 ` David Bremner
2011-12-20 19:53 ` [PATCH v2 2/2] emacs: Fix notmuch-mua-user-agent defcustom Jani Nikula
2011-12-21 8:51 ` [PATCH v2 0/2] emacs: trivial defcustom fixes David Edmondson
2 siblings, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2011-12-20 19:53 UTC (permalink / raw)
To: notmuch
It was not possible to define custom filters or filter functions because
the types were const. Remove const to allow editing.
Signed-off-by: Jani Nikula <jani@nikula.org>
---
emacs/notmuch-hello.el | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 81b2605..7dd0f85 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -86,8 +86,9 @@ Finally this can be a function that will be called for each tag and
should return a filter for that tag, or nil to hide the tag."
:type '(choice (const :tag "All messages" nil)
(const :tag "Unread messages" "tag:unread")
- (const :tag "Custom filter" string)
- (const :tag "Custom filter function" function))
+ (string :tag "Custom filter"
+ :value "tag:unread")
+ (function :tag "Custom filter function"))
:group 'notmuch)
(defcustom notmuch-hello-hide-tags nil
--
1.7.5.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 2/2] emacs: Fix notmuch-mua-user-agent defcustom
2011-12-20 19:53 ` [PATCH v2 0/2] emacs: trivial defcustom fixes Jani Nikula
2011-12-20 19:53 ` [PATCH v2 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Jani Nikula
@ 2011-12-20 19:53 ` Jani Nikula
2011-12-21 8:51 ` [PATCH v2 0/2] emacs: trivial defcustom fixes David Edmondson
2 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2011-12-20 19:53 UTC (permalink / raw)
To: notmuch
The :options keyword is not meaningful for function type. Also, it was not
possible to enter nil value, contrary to the notmuch-mua-user-agent
defcustom documentation. Specify the alternatives using choice type, taking
nil into account.
Signed-off-by: Jani Nikula <jani@nikula.org>
---
emacs/notmuch-mua.el | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index b525762..7114e48 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -35,10 +35,12 @@
"Function used to generate a `User-Agent:' string. If this is
`nil' then no `User-Agent:' will be generated."
:group 'notmuch
- :type 'function
- :options '(notmuch-mua-user-agent-full
- notmuch-mua-user-agent-notmuch
- notmuch-mua-user-agent-emacs))
+ :type '(choice (const :tag "No user agent string" nil)
+ (const :tag "Full" notmuch-mua-user-agent-full)
+ (const :tag "Notmuch" notmuch-mua-user-agent-notmuch)
+ (const :tag "Emacs" notmuch-mua-user-agent-emacs)
+ (function :tag "Custom user agent function"
+ :value notmuch-mua-user-agent-full)))
(defcustom notmuch-mua-hidden-headers '("^User-Agent:")
"Headers that are added to the `message-mode' hidden headers
--
1.7.5.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/2] emacs: trivial defcustom fixes
2011-12-20 19:53 ` [PATCH v2 0/2] emacs: trivial defcustom fixes Jani Nikula
2011-12-20 19:53 ` [PATCH v2 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Jani Nikula
2011-12-20 19:53 ` [PATCH v2 2/2] emacs: Fix notmuch-mua-user-agent defcustom Jani Nikula
@ 2011-12-21 8:51 ` David Edmondson
2 siblings, 0 replies; 10+ messages in thread
From: David Edmondson @ 2011-12-21 8:51 UTC (permalink / raw)
To: Jani Nikula, notmuch
[-- Attachment #1: Type: text/plain, Size: 284 bytes --]
On Tue, 20 Dec 2011 21:53:12 +0200, Jani Nikula <jani@nikula.org> wrote:
> Hi all, v2 of a couple of defcustom fixes. Now with a default value for "Custom
> filter" in patch 1/2 as suggested by Dmitry. No other changes.
Looks good.
dme.
--
David Edmondson, http://dme.org
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom
2011-12-20 19:53 ` [PATCH v2 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Jani Nikula
@ 2011-12-22 11:34 ` David Bremner
0 siblings, 0 replies; 10+ messages in thread
From: David Bremner @ 2011-12-22 11:34 UTC (permalink / raw)
To: Jani Nikula, notmuch
On Tue, 20 Dec 2011 21:53:13 +0200, Jani Nikula <jani@nikula.org> wrote:
> It was not possible to define custom filters or filter functions because
> the types were const. Remove const to allow editing.
Pushed both.
d
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-12-22 11:34 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-23 19:03 [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Jani Nikula
2011-09-23 19:03 ` [PATCH 2/2] emacs: Fix notmuch-mua-user-agent defcustom Jani Nikula
2011-12-16 12:31 ` Dmitry Kurochkin
2011-12-16 12:22 ` [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Dmitry Kurochkin
2011-12-16 12:29 ` Dmitry Kurochkin
2011-12-20 19:53 ` [PATCH v2 0/2] emacs: trivial defcustom fixes Jani Nikula
2011-12-20 19:53 ` [PATCH v2 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom Jani Nikula
2011-12-22 11:34 ` David Bremner
2011-12-20 19:53 ` [PATCH v2 2/2] emacs: Fix notmuch-mua-user-agent defcustom Jani Nikula
2011-12-21 8:51 ` [PATCH v2 0/2] emacs: trivial defcustom fixes David Edmondson
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).