unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
@ 2011-12-27 16:47 David Edmondson
  2011-12-28  3:29 ` Austin Clements
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: David Edmondson @ 2011-12-27 16:47 UTC (permalink / raw)
  To: notmuch

The tags were coloured using text properties. Unfortunately that text
(the header line) also has an overlay, which overrides the text
properties. There's not point in applying text properties that will
never be seen.
---
 emacs/notmuch-show.el |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 8c9d846..24f0b40 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -221,10 +221,7 @@ indentation."
     (goto-char (notmuch-show-message-top))
     (if (re-search-forward "(\\([^()]*\\))$" (line-end-position) t)
 	(let ((inhibit-read-only t))
-	  (replace-match (concat "("
-				 (propertize (mapconcat 'identity tags " ")
-					     'face 'notmuch-tag-face)
-				 ")"))))))
+	  (replace-match (concat "(" (mapconcat 'identity tags " ") ")"))))))
 
 (defun notmuch-show-clean-address (address)
   "Try to clean a single email ADDRESS for display.  Return
@@ -278,8 +275,7 @@ message at DEPTH in the current thread."
 	    " ("
 	    date
 	    ") ("
-	    (propertize (mapconcat 'identity tags " ")
-			'face 'notmuch-tag-face)
+	    (mapconcat 'identity tags " ")
 	    ")\n")
     (overlay-put (make-overlay start (point)) 'face 'notmuch-message-summary-face)))
 
-- 
1.7.7.3

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2011-12-27 16:47 [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode' David Edmondson
@ 2011-12-28  3:29 ` Austin Clements
  2011-12-28 12:42   ` Xavier Maillard
  2011-12-28 12:43 ` Xavier Maillard
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 15+ messages in thread
From: Austin Clements @ 2011-12-28  3:29 UTC (permalink / raw)
  To: David Edmondson; +Cc: notmuch

LGTM.

Quoth David Edmondson on Dec 27 at  4:47 pm:
> The tags were coloured using text properties. Unfortunately that text
> (the header line) also has an overlay, which overrides the text
> properties. There's not point in applying text properties that will
> never be seen.
> ---
>  emacs/notmuch-show.el |    8 ++------
>  1 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 8c9d846..24f0b40 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -221,10 +221,7 @@ indentation."
>      (goto-char (notmuch-show-message-top))
>      (if (re-search-forward "(\\([^()]*\\))$" (line-end-position) t)
>  	(let ((inhibit-read-only t))
> -	  (replace-match (concat "("
> -				 (propertize (mapconcat 'identity tags " ")
> -					     'face 'notmuch-tag-face)
> -				 ")"))))))
> +	  (replace-match (concat "(" (mapconcat 'identity tags " ") ")"))))))
>  
>  (defun notmuch-show-clean-address (address)
>    "Try to clean a single email ADDRESS for display.  Return
> @@ -278,8 +275,7 @@ message at DEPTH in the current thread."
>  	    " ("
>  	    date
>  	    ") ("
> -	    (propertize (mapconcat 'identity tags " ")
> -			'face 'notmuch-tag-face)
> +	    (mapconcat 'identity tags " ")
>  	    ")\n")
>      (overlay-put (make-overlay start (point)) 'face 'notmuch-message-summary-face)))
>  

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2011-12-28  3:29 ` Austin Clements
@ 2011-12-28 12:42   ` Xavier Maillard
  2011-12-28 20:09     ` Jameson Graef Rollins
  0 siblings, 1 reply; 15+ messages in thread
From: Xavier Maillard @ 2011-12-28 12:42 UTC (permalink / raw)
  To: Austin Clements, David Edmondson; +Cc: notmuch


On Tue, 27 Dec 2011 22:29:57 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
> LGTM.

uh, what ?

/Xavier 

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2011-12-27 16:47 [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode' David Edmondson
  2011-12-28  3:29 ` Austin Clements
@ 2011-12-28 12:43 ` Xavier Maillard
  2012-01-16  3:03 ` David Bremner
  2012-01-16 11:17 ` Pieter Praet
  3 siblings, 0 replies; 15+ messages in thread
From: Xavier Maillard @ 2011-12-28 12:43 UTC (permalink / raw)
  To: David Edmondson, notmuch

Hi David,

On Tue, 27 Dec 2011 16:47:14 +0000, David Edmondson <dme@dme.org> wrote:
> The tags were coloured using text properties. Unfortunately that text
> (the header line) also has an overlay, which overrides the text
> properties. There's not point in applying text properties that will
> never be seen.

Yet another good patch by You. I'd vote +1 for this feature.

/Xavier

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2011-12-28 12:42   ` Xavier Maillard
@ 2011-12-28 20:09     ` Jameson Graef Rollins
  2011-12-28 21:51       ` Xavier Maillard
  0 siblings, 1 reply; 15+ messages in thread
From: Jameson Graef Rollins @ 2011-12-28 20:09 UTC (permalink / raw)
  To: Xavier Maillard, Austin Clements, David Edmondson; +Cc: notmuch

On Wed, 28 Dec 2011 13:42:28 +0100, Xavier Maillard <xavier@maillard.im> wrote:
> On Tue, 27 Dec 2011 22:29:57 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
> > LGTM.
> 
> uh, what ?

http://www.google.com/search?q=LGTM

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2011-12-28 20:09     ` Jameson Graef Rollins
@ 2011-12-28 21:51       ` Xavier Maillard
  0 siblings, 0 replies; 15+ messages in thread
From: Xavier Maillard @ 2011-12-28 21:51 UTC (permalink / raw)
  To: Jameson Graef Rollins, Austin Clements, David Edmondson; +Cc: notmuch

On Wed, 28 Dec 2011 12:09:40 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> On Wed, 28 Dec 2011 13:42:28 +0100, Xavier Maillard <xavier@maillard.im> wrote:
> > On Tue, 27 Dec 2011 22:29:57 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
> > > LGTM.
> > 
> > uh, what ?
> 
> http://www.google.com/search?q=LGTM

LGTM too no :D

/Xavier

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2011-12-27 16:47 [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode' David Edmondson
  2011-12-28  3:29 ` Austin Clements
  2011-12-28 12:43 ` Xavier Maillard
@ 2012-01-16  3:03 ` David Bremner
  2012-01-16 11:17 ` Pieter Praet
  3 siblings, 0 replies; 15+ messages in thread
From: David Bremner @ 2012-01-16  3:03 UTC (permalink / raw)
  To: David Edmondson, notmuch

On Tue, 27 Dec 2011 16:47:14 +0000, David Edmondson <dme@dme.org> wrote:
> The tags were coloured using text properties. Unfortunately that text
> (the header line) also has an overlay, which overrides the text
> properties. There's not point in applying text properties that will
> never be seen.

Pushed.

d

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2011-12-27 16:47 [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode' David Edmondson
                   ` (2 preceding siblings ...)
  2012-01-16  3:03 ` David Bremner
@ 2012-01-16 11:17 ` Pieter Praet
  2012-01-16 11:22   ` David Edmondson
  3 siblings, 1 reply; 15+ messages in thread
From: Pieter Praet @ 2012-01-16 11:17 UTC (permalink / raw)
  To: David Edmondson, notmuch

On Tue, 27 Dec 2011 16:47:14 +0000, David Edmondson <dme@dme.org> wrote:
> The tags were coloured using text properties. Unfortunately that text
> (the header line) also has an overlay, which overrides the text
> properties. There's not point in applying text properties that will
> never be seen.
> ---
>  emacs/notmuch-show.el |    8 ++------
>  1 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 8c9d846..24f0b40 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -221,10 +221,7 @@ indentation."
>      (goto-char (notmuch-show-message-top))
>      (if (re-search-forward "(\\([^()]*\\))$" (line-end-position) t)
>  	(let ((inhibit-read-only t))
> -	  (replace-match (concat "("
> -				 (propertize (mapconcat 'identity tags " ")
> -					     'face 'notmuch-tag-face)
> -				 ")"))))))
> +	  (replace-match (concat "(" (mapconcat 'identity tags " ") ")"))))))
>  
>  (defun notmuch-show-clean-address (address)
>    "Try to clean a single email ADDRESS for display.  Return
> @@ -278,8 +275,7 @@ message at DEPTH in the current thread."
>  	    " ("
>  	    date
>  	    ") ("
> -	    (propertize (mapconcat 'identity tags " ")
> -			'face 'notmuch-tag-face)
> +	    (mapconcat 'identity tags " ")
>  	    ")\n")
>      (overlay-put (make-overlay start (point)) 'face 'notmuch-message-summary-face)))
>  
> -- 
> 1.7.7.3

Alas, those text properties actually *were* effective (and I liked them :)

- Before: http://i.imgur.com/Ipxnm.png
- After:  http://i.imgur.com/XcaaF.png


Peace

-- 
Pieter

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2012-01-16 11:17 ` Pieter Praet
@ 2012-01-16 11:22   ` David Edmondson
  2012-01-16 11:44     ` Pieter Praet
  2012-01-16 20:51     ` Aaron Ecay
  0 siblings, 2 replies; 15+ messages in thread
From: David Edmondson @ 2012-01-16 11:22 UTC (permalink / raw)
  To: Pieter Praet, notmuch

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

On Mon, 16 Jan 2012 12:17:03 +0100, Pieter Praet <pieter@praet.org> wrote:
> Alas, those text properties actually *were* effective (and I liked them :)

Well, not in emacs 24. My reading of the source was that overlays were
intended to stomp on text properties, but that could have been wrong.

Do they look correct when you add/remove tags?

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

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2012-01-16 11:22   ` David Edmondson
@ 2012-01-16 11:44     ` Pieter Praet
  2012-01-16 20:51     ` Aaron Ecay
  1 sibling, 0 replies; 15+ messages in thread
From: Pieter Praet @ 2012-01-16 11:44 UTC (permalink / raw)
  To: David Edmondson, notmuch

On Mon, 16 Jan 2012 11:22:27 +0000, David Edmondson <dme@dme.org> wrote:
> On Mon, 16 Jan 2012 12:17:03 +0100, Pieter Praet <pieter@praet.org> wrote:
> > Alas, those text properties actually *were* effective (and I liked them :)
> 
> Well, not in emacs 24. My reading of the source was that overlays were
> intended to stomp on text properties, but that could have been wrong.
> 
> Do they look correct when you add/remove tags?

Yup, they do;  But I'm still chillin' with v23.3.1.

No problem.  For the time being, I'll just make do with
reverting 4b256ff5 on my local branch.


Peace

-- 
Pieter

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2012-01-16 11:22   ` David Edmondson
  2012-01-16 11:44     ` Pieter Praet
@ 2012-01-16 20:51     ` Aaron Ecay
  2012-01-16 21:24       ` Jani Nikula
  2012-01-16 22:21       ` David Bremner
  1 sibling, 2 replies; 15+ messages in thread
From: Aaron Ecay @ 2012-01-16 20:51 UTC (permalink / raw)
  To: David Edmondson, Pieter Praet, notmuch

On Mon, 16 Jan 2012 11:22:27 +0000, David Edmondson <dme@dme.org> wrote:
> On Mon, 16 Jan 2012 12:17:03 +0100, Pieter Praet <pieter@praet.org> wrote:
> > Alas, those text properties actually *were* effective (and I liked them :)
> 
> Well, not in emacs 24. My reading of the source was that overlays were
> intended to stomp on text properties, but that could have been wrong.
> 
> Do they look correct when you add/remove tags?

The tags look nice and yellow-green for me too on a trunk build of emacs
(which is one flavor of emacs 24).  Adding and removing tags works as
expected – the tags dis/appear and are the right color.

I haven’t reloaded the notmuch *.el files since this change landed, but
I agree with Pieter that the overlays were nice.

-- 
Aaron Ecay

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2012-01-16 20:51     ` Aaron Ecay
@ 2012-01-16 21:24       ` Jani Nikula
  2012-01-16 22:21       ` David Bremner
  1 sibling, 0 replies; 15+ messages in thread
From: Jani Nikula @ 2012-01-16 21:24 UTC (permalink / raw)
  To: Aaron Ecay, David Edmondson, Pieter Praet, notmuch

On Mon, 16 Jan 2012 15:51:30 -0500, Aaron Ecay <aaronecay@gmail.com> wrote:
> On Mon, 16 Jan 2012 11:22:27 +0000, David Edmondson <dme@dme.org> wrote:
> > On Mon, 16 Jan 2012 12:17:03 +0100, Pieter Praet <pieter@praet.org> wrote:
> > > Alas, those text properties actually *were* effective (and I liked them :)
> > 
> > Well, not in emacs 24. My reading of the source was that overlays were
> > intended to stomp on text properties, but that could have been wrong.
> > 
> > Do they look correct when you add/remove tags?
> 
> The tags look nice and yellow-green for me too on a trunk build of emacs
> (which is one flavor of emacs 24).  Adding and removing tags works as
> expected – the tags dis/appear and are the right color.
> 
> I haven’t reloaded the notmuch *.el files since this change landed, but
> I agree with Pieter that the overlays were nice.

Missing them too. Emacs 23.3.1.

BR,
Jani.

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2012-01-16 20:51     ` Aaron Ecay
  2012-01-16 21:24       ` Jani Nikula
@ 2012-01-16 22:21       ` David Bremner
  2012-01-17  7:22         ` David Edmondson
  1 sibling, 1 reply; 15+ messages in thread
From: David Bremner @ 2012-01-16 22:21 UTC (permalink / raw)
  To: Aaron Ecay, David Edmondson, Pieter Praet, notmuch

On Mon, 16 Jan 2012 15:51:30 -0500, Aaron Ecay <aaronecay@gmail.com> wrote:
> On Mon, 16 Jan 2012 11:22:27 +0000, David Edmondson <dme@dme.org> wrote:
> > On Mon, 16 Jan 2012 12:17:03 +0100, Pieter Praet <pieter@praet.org> wrote:
> > > Alas, those text properties actually *were* effective (and I liked them :)
> > 
> > Well, not in emacs 24. My reading of the source was that overlays were
> > intended to stomp on text properties, but that could have been wrong.
> > 
> > Do they look correct when you add/remove tags?
> 
> The tags look nice and yellow-green for me too on a trunk build of emacs
> (which is one flavor of emacs 24).  Adding and removing tags works as
> expected – the tags dis/appear and are the right color.
> 
> I haven’t reloaded the notmuch *.el files since this change landed, but
> I agree with Pieter that the overlays were nice.

I'm leaning to revert this patch. Any opposition?

d

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2012-01-16 22:21       ` David Bremner
@ 2012-01-17  7:22         ` David Edmondson
  2012-01-17 12:05           ` David Bremner
  0 siblings, 1 reply; 15+ messages in thread
From: David Edmondson @ 2012-01-17  7:22 UTC (permalink / raw)
  To: David Bremner, Aaron Ecay, Pieter Praet, notmuch

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

On Mon, 16 Jan 2012 18:21:24 -0400, David Bremner <david@tethera.net> wrote:
> I'm leaning to revert this patch. Any opposition?

Please revert it and I'll investigate further.

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

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

* Re: [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode'.
  2012-01-17  7:22         ` David Edmondson
@ 2012-01-17 12:05           ` David Bremner
  0 siblings, 0 replies; 15+ messages in thread
From: David Bremner @ 2012-01-17 12:05 UTC (permalink / raw)
  To: David Edmondson, Aaron Ecay, Pieter Praet, notmuch

On Tue, 17 Jan 2012 07:22:42 +0000, David Edmondson <dme@dme.org> wrote:
> On Mon, 16 Jan 2012 18:21:24 -0400, David Bremner <david@tethera.net> wrote:
> > I'm leaning to revert this patch. Any opposition?
> 
> Please revert it and I'll investigate further.

Reverted.

d

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

end of thread, other threads:[~2012-01-17 12:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-27 16:47 [PATCH] emacs: Don't attempt to colour tags in `notmuch-show-mode' David Edmondson
2011-12-28  3:29 ` Austin Clements
2011-12-28 12:42   ` Xavier Maillard
2011-12-28 20:09     ` Jameson Graef Rollins
2011-12-28 21:51       ` Xavier Maillard
2011-12-28 12:43 ` Xavier Maillard
2012-01-16  3:03 ` David Bremner
2012-01-16 11:17 ` Pieter Praet
2012-01-16 11:22   ` David Edmondson
2012-01-16 11:44     ` Pieter Praet
2012-01-16 20:51     ` Aaron Ecay
2012-01-16 21:24       ` Jani Nikula
2012-01-16 22:21       ` David Bremner
2012-01-17  7:22         ` David Edmondson
2012-01-17 12:05           ` 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).