[notmuch] [PATCH 1/3] Use default face for the button types so that the underlines go away

2009-12-03 Thread Carl Worth
On Tue,  1 Dec 2009 21:45:47 +0530, aneesh.kumar at gmail.com wrote:
> From: Alexander Botero-Lowry 
> 
> Since we know what these buttons do it seems like the underlines are
> unnecessary. This also backs out the attempt at fixing the button
> alignment on the message row, which is broken because of some
> interaction with indent-rigidly in some threads

Thanks, Alexander (and Aneesh).

By the time I was ready to apply this patch, I had fixed the "also"
portion of the commit independently in a different way, (which actually
does give reliable first-column usage of the buttons).

But I've now committed the removal of the underlines from these buttons.

And Aneesh, for the following patch which removes the reverse-video, I
also implemented a different version of that.

Take a look, emacs users, and let me know what you think of the new
presentation of messages. I find it much more pleasant to look at
myself.

-Carl
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 



Re: [notmuch] [PATCH 1/3] Use default face for the button types so that the underlines go away

2009-12-03 Thread Carl Worth
On Tue,  1 Dec 2009 21:45:47 +0530, aneesh.ku...@gmail.com wrote:
 From: Alexander Botero-Lowry alex.boterolo...@gmail.com
 
 Since we know what these buttons do it seems like the underlines are
 unnecessary. This also backs out the attempt at fixing the button
 alignment on the message row, which is broken because of some
 interaction with indent-rigidly in some threads

Thanks, Alexander (and Aneesh).

By the time I was ready to apply this patch, I had fixed the also
portion of the commit independently in a different way, (which actually
does give reliable first-column usage of the buttons).

But I've now committed the removal of the underlines from these buttons.

And Aneesh, for the following patch which removes the reverse-video, I
also implemented a different version of that.

Take a look, emacs users, and let me know what you think of the new
presentation of messages. I find it much more pleasant to look at
myself.

-Carl


pgpJNR9SCSZpa.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[notmuch] [PATCH 1/3] Use default face for the button types so that the underlines go away

2009-12-01 Thread aneesh.ku...@gmail.com
From: Alexander Botero-Lowry 

Since we know what these buttons do it seems like the underlines are
unnecessary. This also backs out the attempt at fixing the button
alignment on the message row, which is broken because of some
interaction with indent-rigidly in some threads
---
 notmuch.el |   27 +++
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/notmuch.el b/notmuch.el
index 65473ba..c1e8257 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -560,15 +560,23 @@ which this thread was originally shown."
   (force-window-update)
   (redisplay t))

-(define-button-type 'notmuch-button-invisibility-toggle-type 'action 
'notmuch-toggle-invisible-action 'follow-link t)
-(define-button-type 'notmuch-button-citation-toggle-type 'help-echo "mouse-1, 
RET: Show citation"
+(define-button-type 'notmuch-button-invisibility-toggle-type
+  'action 'notmuch-toggle-invisible-action
+  'follow-link t
+  'face "default")
+(define-button-type 'notmuch-button-citation-toggle-type
+  'help-echo "mouse-1, RET: Show citation"
   :supertype 'notmuch-button-invisibility-toggle-type)
-(define-button-type 'notmuch-button-signature-toggle-type 'help-echo "mouse-1, 
RET: Show signature"
+(define-button-type 'notmuch-button-signature-toggle-type
+  'help-echo "mouse-1, RET: Show signature"
   :supertype 'notmuch-button-invisibility-toggle-type)
-(define-button-type 'notmuch-button-headers-toggle-type 'help-echo "mouse-1, 
RET: Show headers"
-  :supertype 'notmuch-button-invisibility-toggle-type)
-(define-button-type 'notmuch-button-body-toggle-type 'help-echo "mouse-1, RET: 
Show message"
+(define-button-type 'notmuch-button-headers-toggle-type
+  'help-echo "mouse-1, RET: Show headers"
   :supertype 'notmuch-button-invisibility-toggle-type)
+(define-button-type 'notmuch-button-body-toggle-type 
+  'help-echo "mouse-1, RET: Show message"
+  'face '(:inverse-video . t)
+  :supertype 'notmuch-button-invisibility-toggle-type )

 (defun notmuch-show-markup-citations-region (beg end depth)
   (goto-char beg)
@@ -715,8 +723,11 @@ which this thread was originally shown."
 (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))
+(let ((message-overlay (make-overlay beg (point
+  (overlay-put message-overlay 'face '(:inverse-video t))
+  (setq btn (make-button (line-beginning-position)
+(overlay-end message-overlay)
+:type 'notmuch-button-body-toggle-type)))
 (forward-line 1)
 (end-of-line)
 (let ((beg-hidden (point-marker)))
-- 
1.6.5.2.74.g610f9