unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] use custom-face-edit value-type in notmuch-search-line-faces
@ 2011-03-27  5:16 Jameson Graef Rollins
  2011-03-27  5:26 ` Jameson Rollins
  2011-04-25 20:52 ` Carl Worth
  0 siblings, 2 replies; 6+ messages in thread
From: Jameson Graef Rollins @ 2011-03-27  5:16 UTC (permalink / raw)
  To: notmuch

This enables the proper face customization UI for
notmuch-search-line-faces.
---
 emacs/notmuch.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 92a86cf..a23d0c2 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -612,7 +612,7 @@ The attributes defined for matching tags are merged, with later
 attributes overriding earlier. A message having both \"delete\"
 and \"unread\" tags with the above settings would have a green
 foreground and blue background."
-  :type '(alist :key-type (string) :value-type (list))
+  :type '(alist :key-type (string) :value-type (custom-face-edit))
   :group 'notmuch)
 
 (defun notmuch-search-color-line (start end line-tag-list)
-- 
1.7.4.1

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

* Re: [PATCH] use custom-face-edit value-type in notmuch-search-line-faces
  2011-03-27  5:16 Jameson Graef Rollins
@ 2011-03-27  5:26 ` Jameson Rollins
  2011-04-19 14:46   ` Pieter Praet
  2011-04-25 20:52 ` Carl Worth
  1 sibling, 1 reply; 6+ messages in thread
From: Jameson Rollins @ 2011-03-27  5:26 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]

On Sat, 26 Mar 2011 22:16:32 -0700, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> This enables the proper face customization UI for
> notmuch-search-line-faces.

Hey, folks.  amdragon was the one who figured out that custom-face-edit
was the correct value-type to use to get the face customization ui for
the notmuch-search-line-faces list.  However, he seems to think this
might not be the right solution.  Austin: care to comment?

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: [PATCH] use custom-face-edit value-type in notmuch-search-line-faces
@ 2011-03-28  2:57 Austin Clements
  2011-03-28  4:42 ` Jameson Graef Rollins
  0 siblings, 1 reply; 6+ messages in thread
From: Austin Clements @ 2011-03-28  2:57 UTC (permalink / raw)
  To: Jameson Rollins; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

On Sun, Mar 27, 2011 at 1:26 AM, Jameson Rollins <jrollins@finestructure.net>
wrote:
> On Sat, 26 Mar 2011 22:16:32 -0700, Jameson Graef Rollins <
jrollins@finestructure.net> wrote:
>> This enables the proper face customization UI for
>> notmuch-search-line-faces.
>
> Hey, folks.  amdragon was the one who figured out that custom-face-edit
> was the correct value-type to use to get the face customization ui for
> the notmuch-search-line-faces list.  However, he seems to think this
> might not be the right solution.  Austin: care to comment?

My concern is that it's unclear if the custom-face-edit widget is considered
a public interface, or if it's internal to customize and thus could change
at any time. These things are always a bit murky in Emacs. custom-face-edit
has been around for a few major versions, though it only recently (somewhere
between Emacs 22 and 23) became embeddable in a customize widget like this.
We should just ask on an Emacs mailing list if this is okay, or if it will
break catastrophically and without warning at some point (or if there's a
more official solution).

[-- Attachment #2: Type: text/html, Size: 1308 bytes --]

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

* Re: [PATCH] use custom-face-edit value-type in notmuch-search-line-faces
  2011-03-28  2:57 [PATCH] use custom-face-edit value-type in notmuch-search-line-faces Austin Clements
@ 2011-03-28  4:42 ` Jameson Graef Rollins
  0 siblings, 0 replies; 6+ messages in thread
From: Jameson Graef Rollins @ 2011-03-28  4:42 UTC (permalink / raw)
  To: Austin Clements, notmuch

[-- Attachment #1: Type: text/plain, Size: 842 bytes --]

On Sun, 27 Mar 2011 22:57:46 -0400, Austin Clements <amdragon@mit.edu> wrote:
> My concern is that it's unclear if the custom-face-edit widget is considered
> a public interface, or if it's internal to customize and thus could change
> at any time. These things are always a bit murky in Emacs. custom-face-edit
> has been around for a few major versions, though it only recently (somewhere
> between Emacs 22 and 23) became embeddable in a customize widget like this.
> We should just ask on an Emacs mailing list if this is okay, or if it will
> break catastrophically and without warning at some point (or if there's a
> more official solution).

Ok.  Thanks so much for the clarification, Austin.  I'll ping the emacs
list and see what turns up.  Maybe there's a better alternative, or
maybe we can ask that it be turned public.

jamie.


[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: [PATCH] use custom-face-edit value-type in notmuch-search-line-faces
  2011-03-27  5:26 ` Jameson Rollins
@ 2011-04-19 14:46   ` Pieter Praet
  0 siblings, 0 replies; 6+ messages in thread
From: Pieter Praet @ 2011-04-19 14:46 UTC (permalink / raw)
  To: Jameson Rollins, notmuch

On Sat, 26 Mar 2011 22:26:26 -0700, Jameson Rollins <jrollins@finestructure.net> wrote:
> On Sat, 26 Mar 2011 22:16:32 -0700, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> > This enables the proper face customization UI for
> > notmuch-search-line-faces.
> 
> Hey, folks.  amdragon was the one who figured out that custom-face-edit
> was the correct value-type to use to get the face customization ui for
> the notmuch-search-line-faces list.  However, he seems to think this
> might not be the right solution.  Austin: care to comment?
> 
> jamie.
Non-text part: application/pgp-signature
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

No idea why it wouldn't be a good solution, only "negative" thing I
could find was a comment "FIXIT: Use a better equivalent to
custom-face-edit if there is one" in diredful.el:312 [1]

FWIW, in Org-mode (org-todo-keyword-faces @ org-faces.el:355-371 [2],
exactly the same use case) they do it like this:

    :type '(repeat
            (cons
             (string :tag "Keyword")
             (choice :tag "Face   "
              (string :tag "Color")
              (sexp :tag "Face")))))


[1] http://www.emacswiki.org/emacs-en/diredful.el
[2] http://orgmode.org/w/?p=org-mode.git;a=blob;f=lisp/org-faces.el;h=7bb3055c7d707b069ee826dfff54b8e441566e3e;hb=HEAD

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

* Re: [PATCH] use custom-face-edit value-type in notmuch-search-line-faces
  2011-03-27  5:16 Jameson Graef Rollins
  2011-03-27  5:26 ` Jameson Rollins
@ 2011-04-25 20:52 ` Carl Worth
  1 sibling, 0 replies; 6+ messages in thread
From: Carl Worth @ 2011-04-25 20:52 UTC (permalink / raw)
  To: Jameson Graef Rollins, notmuch

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

On Sat, 26 Mar 2011 22:16:32 -0700, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> This enables the proper face customization UI for
> notmuch-search-line-faces.

Thanks. That's a nice improvement. Applied and pushed.

-Carl

-- 
carl.d.worth@intel.com

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2011-04-25 20:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28  2:57 [PATCH] use custom-face-edit value-type in notmuch-search-line-faces Austin Clements
2011-03-28  4:42 ` Jameson Graef Rollins
  -- strict thread matches above, loose matches on Subject: below --
2011-03-27  5:16 Jameson Graef Rollins
2011-03-27  5:26 ` Jameson Rollins
2011-04-19 14:46   ` Pieter Praet
2011-04-25 20:52 ` Carl Worth

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).