unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] notmuch.el: Add face support to message summary and subject lines.
@ 2009-11-30 14:50 Kan-Ru Chen
  2009-11-30 16:40 ` Aneesh Kumar K. V
  2009-12-05  0:19 ` Carl Worth
  0 siblings, 2 replies; 4+ messages in thread
From: Kan-Ru Chen @ 2009-11-30 14:50 UTC (permalink / raw)
  To: notmuch

Remove the underline of both message summary and subject lines.
Message summary still defaults to reverse-video, use customize to
change it to whatever you like.

Signed-off-by: Kan-Ru Chen <kanru@kanru.info>
---
 notmuch.el |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/notmuch.el b/notmuch.el
index 65473ba..730538c 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -714,9 +714,8 @@ which this thread was originally shown."
   (let ((beg (point-marker))
         (btn nil))
     (end-of-line)
-    ; Inverse video for subject
-    (overlay-put (make-overlay beg (point)) 'face '(:inverse-video t))
-    (setq btn (make-button beg (point) :type 'notmuch-button-body-toggle-type))
+    (setq btn (make-button beg (point) :type 'notmuch-button-body-toggle-type
+                           'face 'notmuch-show-message-summary-face))
     (forward-line 1)
     (end-of-line)
     (let ((beg-hidden (point-marker)))
@@ -739,7 +738,8 @@ which this thread was originally shown."
           (forward-line)
           (make-button (line-beginning-position) (line-end-position)
                         'invisibility-spec (cons invis-spec t)
-                        :type 'notmuch-button-headers-toggle-type))
+                        :type 'notmuch-button-headers-toggle-type
+                        'face 'notmuch-show-message-headers-face))
         (goto-char end)
         (insert "\n")
 	(set-marker beg nil)
@@ -959,6 +959,18 @@ thread from that buffer can be show when done with this one)."
   "Notmuch search mode face used to highligh tags."
   :group 'notmuch)
 
+(defface notmuch-show-message-summary-face
+  '((default
+    (:bold t :inverse-video t)))
+  "Notmuch show mode face used to highlight summary line."
+  :group 'notmuch)
+
+(defface notmuch-show-message-headers-face
+  '((default
+     (:bold t)))
+  "Notmuch show mode face used to highlight header lines."
+  :group 'notmuch)
+
 (defvar notmuch-tag-face-alist nil
   "List containing the tag list that need to be highlighed")
 
-- 
1.6.5.3

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

* Re: [PATCH] notmuch.el: Add face support to message summary and subject lines.
  2009-11-30 14:50 [PATCH] notmuch.el: Add face support to message summary and subject lines Kan-Ru Chen
@ 2009-11-30 16:40 ` Aneesh Kumar K. V
  2009-12-01  1:34   ` Kan-Ru Chen
  2009-12-05  0:19 ` Carl Worth
  1 sibling, 1 reply; 4+ messages in thread
From: Aneesh Kumar K. V @ 2009-11-30 16:40 UTC (permalink / raw)
  To: Kan-Ru Chen, notmuch

On Mon, 30 Nov 2009 22:50:39 +0800, Kan-Ru Chen <kanru@kanru.info> wrote:
> Remove the underline of both message summary and subject lines.
> Message summary still defaults to reverse-video, use customize to
> change it to whatever you like.
> 
> Signed-off-by: Kan-Ru Chen <kanru@kanru.info>
> ---
>  notmuch.el |   20 ++++++++++++++++----
>  1 files changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/notmuch.el b/notmuch.el
> index 65473ba..730538c 100644
> --- a/notmuch.el
> +++ b/notmuch.el
> @@ -714,9 +714,8 @@ which this thread was originally shown."
>    (let ((beg (point-marker))
>          (btn nil))
>      (end-of-line)
> -    ; Inverse video for subject
> -    (overlay-put (make-overlay beg (point)) 'face '(:inverse-video t))
> -    (setq btn (make-button beg (point) :type 'notmuch-button-body-toggle-type))
> +    (setq btn (make-button beg (point) :type 'notmuch-button-body-toggle-type
> +                           'face 'notmuch-show-message-summary-face))
>      (forward-line 1)
>      (end-of-line)
>      (let ((beg-hidden (point-marker)))
> @@ -739,7 +738,8 @@ which this thread was originally shown."
>            (forward-line)
>            (make-button (line-beginning-position) (line-end-position)
>                          'invisibility-spec (cons invis-spec t)
> -                        :type 'notmuch-button-headers-toggle-type))
> +                        :type 'notmuch-button-headers-toggle-type
> +                        'face 'notmuch-show-message-headers-face))
>          (goto-char end)
>          (insert "\n")
>  	(set-marker beg nil)
> @@ -959,6 +959,18 @@ thread from that buffer can be show when done with this one)."
>    "Notmuch search mode face used to highligh tags."
>    :group 'notmuch)
> 
> +(defface notmuch-show-message-summary-face
> +  '((default
> +    (:bold t :inverse-video t)))
> +  "Notmuch show mode face used to highlight summary line."
> +  :group 'notmuch)
> +
> +(defface notmuch-show-message-headers-face
> +  '((default
> +     (:bold t)))
> +  "Notmuch show mode face used to highlight header lines."
> +  :group 'notmuch)
> +
>  (defvar notmuch-tag-face-alist nil
>    "List containing the tag list that need to be highlighed")
> 

The subject line is already have a font face value attached.
message-header-name to show the name of the header and
message-header-subject to show the subject details.

-aneesh      

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

* Re: [PATCH] notmuch.el: Add face support to message summary and subject lines.
  2009-11-30 16:40 ` Aneesh Kumar K. V
@ 2009-12-01  1:34   ` Kan-Ru Chen
  0 siblings, 0 replies; 4+ messages in thread
From: Kan-Ru Chen @ 2009-12-01  1:34 UTC (permalink / raw)
  To: Aneesh Kumar K. V, notmuch

On Mon, 30 Nov 2009 22:10:59 +0530, "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
> The subject line is already have a font face value attached.
> message-header-name to show the name of the header and
> message-header-subject to show the subject details.
> 

Two faces will be merged automatically, and the button face is needed to
remove the default button face (:underline t)

-- 
Kan-Ru Chen | http://kanru.info

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

* Re: [PATCH] notmuch.el: Add face support to message summary and subject lines.
  2009-11-30 14:50 [PATCH] notmuch.el: Add face support to message summary and subject lines Kan-Ru Chen
  2009-11-30 16:40 ` Aneesh Kumar K. V
@ 2009-12-05  0:19 ` Carl Worth
  1 sibling, 0 replies; 4+ messages in thread
From: Carl Worth @ 2009-12-05  0:19 UTC (permalink / raw)
  To: Kan-Ru Chen, notmuch

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

On Mon, 30 Nov 2009 22:50:39 +0800, Kan-Ru Chen <kanru@kanru.info> wrote:
> Remove the underline of both message summary and subject lines.
> Message summary still defaults to reverse-video, use customize to
> change it to whatever you like.

Thanks for submitting this patch. I recently fixed the ugly underlining
a separate way. Let me know if you think the current code needs any
further improvement in this area.

-Carl

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

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

end of thread, other threads:[~2009-12-05  0:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-30 14:50 [PATCH] notmuch.el: Add face support to message summary and subject lines Kan-Ru Chen
2009-11-30 16:40 ` Aneesh Kumar K. V
2009-12-01  1:34   ` Kan-Ru Chen
2009-12-05  0:19 ` 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).