emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Bug] Slightly wrong org-tag fontification in agenda
@ 2010-02-12 13:22 Tassilo Horn
  2010-02-12 17:58 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Tassilo Horn @ 2010-02-12 13:22 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi all,

it seems that org fontifies everything in the agenda following the
heading using the org-tag face.  Basically, that's ok *unless* you don't
use a special background color for tags.  Then it looks wrong.

Here's a screenshot showing the fontification.

[-- Attachment #2: org-tags.png --]
[-- Type: image/png, Size: 37737 bytes --]

[-- Attachment #3: Type: text/plain, Size: 425 bytes --]


I'm using a current git version (Org-mode version 6.34trans
(release_6.34c.67.g25f76f)).

I had a quick look at the code, and it seems the problem is in
`org-agenda-align-tags'.

BTW: Is it really a good decision to propertize the text algorithmically
in the functions building the agenda?  I'm not sure, but it might be
easier to define some `org-agenda-font-lock-keywords' like it's done for
org files, too.

Bye,
Tassilo

[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [Bug] Slightly wrong org-tag fontification in agenda
  2010-02-12 13:22 [Bug] Slightly wrong org-tag fontification in agenda Tassilo Horn
@ 2010-02-12 17:58 ` Carsten Dominik
  2010-02-12 19:29   ` Tassilo Horn
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2010-02-12 17:58 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode

Hi Tassilo,

On Feb 12, 2010, at 2:22 PM, Tassilo Horn wrote:

> Hi all,
>
> it seems that org fontifies everything in the agenda following the
> heading using the org-tag face.  Basically, that's ok *unless* you  
> don't
> use a special background color for tags.  Then it looks wrong.
>
> Here's a screenshot showing the fontification.
> <org-tags.png>
> I'm using a current git version (Org-mode version 6.34trans
> (release_6.34c.67.g25f76f)).
>
> I had a quick look at the code, and it seems the problem is in
> `org-agenda-align-tags'.


Yes, I think it is fixed now.

>
> BTW: Is it really a good decision to propertize the text  
> algorithmically
> in the functions building the agenda?  I'm not sure, but it might be
> easier to define some `org-agenda-font-lock-keywords' like it's done  
> for
> org files, too.

That is a good question.  I do, however, not believe that it would
be easy to define font lock keywords which can handle the agenda.
For example, when an item changes state, its face is changed, to
something with depends on where the item comes from and, for example,
how close the deadline is.  And more stuff like that.
So font-lock regexp matching is now enough here.
Yes, it would be enough for tags, but not for other stuff.

- Carsten

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

* Re: [Bug] Slightly wrong org-tag fontification in agenda
  2010-02-12 17:58 ` Carsten Dominik
@ 2010-02-12 19:29   ` Tassilo Horn
  0 siblings, 0 replies; 3+ messages in thread
From: Tassilo Horn @ 2010-02-12 19:29 UTC (permalink / raw)
  To: emacs-orgmode

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

Carsten Dominik <carsten.dominik@gmail.com> writes:

Hi Carsten,

> Yes, I think it is fixed now.

Nearly, now the first colon isn't fontified.  Here's a patch.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Don-t-omit-the-first-colon-when-fontifying-tags.patch --]
[-- Type: text/x-patch, Size: 1304 bytes --]

From 00d7a2bab8c5077eae99760c5f62dd09f4c363a4 Mon Sep 17 00:00:00 2001
From: Tassilo Horn <tassilo@member.fsf.org>
Date: Fri, 12 Feb 2010 20:27:49 +0100
Subject: [PATCH] Don't omit the first colon when fontifying tags.

---
 lisp/ChangeLog     |    5 +++++
 lisp/org-agenda.el |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 31f5fc0..998d541 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-12  Tassilo Horn  <tassilo@member.fsf.org>
+
+	* org-agenda.el (org-agenda-align-tags): Don't omit the first
+	colon when fontifying tags.
+
 2010-02-12  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-get-location): Make sure the selection buffer is
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 21c605f..5a63e47 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6376,7 +6376,7 @@ If FORCE-TAGS is non nil, the car of it returns the new tags."
 	(goto-char (match-beginning 1))
 	(insert (org-add-props
 		    (make-string (max 1 (- c (current-column))) ?\ )
-		    (plist-put (text-properties-at (point)) 'face nil))))
+		    (plist-put (text-properties-at (1- (point))) 'face nil))))
       (goto-char (point-min))
       (org-font-lock-add-tag-faces (point-max)))))
 
-- 
1.6.6.1


[-- Attachment #3: Type: text/plain, Size: 712 bytes --]


>> BTW: Is it really a good decision to propertize the text algorithmically
>> in the functions building the agenda?  I'm not sure, but it might be
>> easier to define some `org-agenda-font-lock-keywords' like it's done for
>> org files, too.
>
> That is a good question.  I do, however, not believe that it would
> be easy to define font lock keywords which can handle the agenda.
> For example, when an item changes state, its face is changed, to
> something with depends on where the item comes from and, for example,
> how close the deadline is.  And more stuff like that.
> So font-lock regexp matching is now enough here.
> Yes, it would be enough for tags, but not for other stuff.

I see.

Bye,
Tassilo

[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2010-02-12 19:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-12 13:22 [Bug] Slightly wrong org-tag fontification in agenda Tassilo Horn
2010-02-12 17:58 ` Carsten Dominik
2010-02-12 19:29   ` Tassilo Horn

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).