emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* nicely managing multiple calendars in the agenda
@ 2010-05-01 15:09 Eraldo Helal
  2010-05-03  9:10 ` Sébastien Vauban
  0 siblings, 1 reply; 7+ messages in thread
From: Eraldo Helal @ 2010-05-01 15:09 UTC (permalink / raw)
  To: Org-Mode

I have switched to using org files as 'calendars'. (events.org, university.org, etc)
I am using the agenda to view them.

However I am still having some troubles with 2 things:
1. different colors for different calendars (e.g. entries from events.org in orange)
2. toggling the visibility of individual calendars

=> 1
    Would it be possible to use different faces for different files?
    Or maybe even different faces for different categories?
    ,---- What I have:
    |[blue ] Saturday    1 May 2010
    |[black]   events:      Adam's party
    |[black]   events:      Magic show
    |[black]   university:  10:15-12:00 Management test
    `----
    ,---- What I want:
    |[blue  ] Saturday    1 May 2010
    |[orange]   events:      Adam's party
    |[orange]   events:      Adam's party
    |[purple]   university:  10:15-12:00 Management test
    `----

=> 2
    I do know that I can restrict the agenda to a single file,
    but how can I toggle the visibility of a single file? (e.g. exclude one file)
    Plus... Once I have toggled one file invisible...
    I would need some kind of overview of which files(calendars) are hidden and which ones are still active.

    One possible workaround would be using file-tags and filtering by them.
    While I do like the idea, it still does not solve the issue of knowing
    which files(calendars) are active and which ones are hidden at the moment.
    Plus I would be even happier if we could find a solution without using tags.

    A menu (just like the todo-kwd menu <C-c t>) would be ideal as an interface for toggling calendars
    and getting an overview of the currently displayed ones.

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

* Re: nicely managing multiple calendars in the agenda
  2010-05-01 15:09 nicely managing multiple calendars in the agenda Eraldo Helal
@ 2010-05-03  9:10 ` Sébastien Vauban
  2010-05-03 14:27   ` Nick Dokos
  0 siblings, 1 reply; 7+ messages in thread
From: Sébastien Vauban @ 2010-05-03  9:10 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Eraldo,

Eraldo Helal wrote:
> I have switched to using org files as 'calendars'. (events.org,
> university.org, etc) I am using the agenda to view them.
>
> However I am still having some troubles with 2 things:
> 1. different colors for different calendars (e.g. entries from events.org in orange)

>     Would it be possible to use different faces for different files?
>     Or maybe even different faces for different categories?
>     ,---- What I have:
>     |[blue ] Saturday    1 May 2010
>     |[black]   events:      Adam's party
>     |[black]   events:      Magic show
>     |[black]   university:  10:15-12:00 Management test
>     `----
>     ,---- What I want:
>     |[blue  ] Saturday    1 May 2010
>     |[orange]   events:      Adam's party
>     |[orange]   events:      Adam's party
>     |[purple]   university:  10:15-12:00 Management test
>     `----

What I do is having tags with different colors:

--8<---------------cut here---------------start------------->8---
    (setq org-tag-faces
          '(("home" . (:background "#D4EAFF" :italic t))
            ("work" . (:italic t :background "#F9E816"))))
--8<---------------cut here---------------end--------------->8---

Though, only the color spec above is taken into account. Tags are not in
italics like for all the others:

--8<---------------cut here---------------start------------->8---
     (org-tag ((t (:foreground "rgb:81/6A/7D" :background "rgb:F7/B8/DE" :italic t))))
--8<---------------cut here---------------end--------------->8---

Maybe a bug?

Best regards,
  Seb

-- 
Sébastien Vauban



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

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

* Re: Re: nicely managing multiple calendars in the agenda
  2010-05-03  9:10 ` Sébastien Vauban
@ 2010-05-03 14:27   ` Nick Dokos
  2010-05-03 18:49     ` Sébastien Vauban
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2010-05-03 14:27 UTC (permalink / raw)
  To: =?utf-8?Q?S=C3=A9bastien_Vauban?=; +Cc: nicholas.dokos, emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> wrote:

>     (setq org-tag-faces
>           '(("home" . (:background "#D4EAFF" :italic t))
>             ("work" . (:italic t :background "#F9E816"))))
> 
> Though, only the color spec above is taken into account. Tags are not in
> italics like for all the others:
> 
>      (org-tag ((t (:foreground "rgb:81/6A/7D" :background "rgb:F7/B8/DE" :i=
> talic t))))
> 
> Maybe a bug?
> 

Or maybe the font does not come in italic? AFAIK, if that's the case, then
the italic attribute is just ignored.

Nick

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

* Re: nicely managing multiple calendars in the agenda
  2010-05-03 14:27   ` Nick Dokos
@ 2010-05-03 18:49     ` Sébastien Vauban
  2010-05-05  8:34       ` Sébastien Vauban
  0 siblings, 1 reply; 7+ messages in thread
From: Sébastien Vauban @ 2010-05-03 18:49 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Nick,

Nick Dokos wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> wrote:
>
>>     (setq org-tag-faces
>>           '(("home" . (:background "#D4EAFF" :italic t))
>>             ("work" . (:italic t :background "#F9E816"))))
>> 
>> Though, only the color spec above is taken into account. Tags are not in
>> italics like for all the others:
>> 
>>      (org-tag ((t (:foreground "rgb:81/6A/7D" :background "rgb:F7/B8/DE" :i=
>> talic t))))
>> 
>> Maybe a bug?
>
> Or maybe the font does not come in italic? AFAIK, if that's the case, then
> the italic attribute is just ignored.

Nice try -- and you're definitely right asking (as this could easily be
overlooked), but here that's not the case: my font is Consolas (under Ubuntu),
which comes in italics.

And I get _all the tags in italics_, thanks to the above specification of
`org-tag' -- _all but 2_ tags: `home' and `work', which come in their upright
version, independently of the argument passed in `org-tag-faces'.

Thanks for helping...

Seb

-- 
Sébastien Vauban



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

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

* Re: nicely managing multiple calendars in the agenda
  2010-05-03 18:49     ` Sébastien Vauban
@ 2010-05-05  8:34       ` Sébastien Vauban
  2010-05-05 18:45         ` Nick Dokos
  0 siblings, 1 reply; 7+ messages in thread
From: Sébastien Vauban @ 2010-05-05  8:34 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Nick,

> Nick Dokos wrote:
>> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw-XMD5yJDbdMRG2NFembrH+g@public.gmane.orgorg> wrote:
>>
>>>     (setq org-tag-faces
>>>           '(("home" . (:background "#D4EAFF" :italic t))
>>>             ("work" . (:italic t :background "#F9E816"))))
>>>
>>> Though, only the color spec above is taken into account. Tags are not in
>>> italics like for all the others:
>>>
>>>      (org-tag ((t (:foreground "rgb:81/6A/7D" :background "rgb:F7/B8/DE" :italic t))))
>>>
>>> Maybe a bug?
>>
>> Or maybe the font does not come in italic? AFAIK, if that's the case, then
>> the italic attribute is just ignored.
>
> Nice try -- and you're definitely right asking (as this could easily be
> overlooked), but here that's not the case: my font is Consolas (under
> Ubuntu), which comes in italics.
>
> And I get _all the tags in italics_, thanks to the above specification of
> `org-tag' -- _all but 2_ tags: `home' and `work', which come in their
> upright version, independently of the argument passed in `org-tag-faces'.

I've just noticed, in the 1000's of lines in my `*Messages*' buffer, something
that can explain the noticed behavior:

--8<---------------cut here---------------start------------->8---
Invalid face attribute :italic t [54 times]
--8<---------------cut here---------------end--------------->8---

Though, I don't understand why that attribute is invalid in the above spec!?

Any idea?

Best regards,
  Seb

-- 
Sébastien Vauban



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

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

* Re: Re: nicely managing multiple calendars in the agenda
  2010-05-05  8:34       ` Sébastien Vauban
@ 2010-05-05 18:45         ` Nick Dokos
  2010-07-12  8:26           ` [SOLVED] " Sébastien Vauban
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2010-05-05 18:45 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: nicholas.dokos, emacs-orgmode

=?utf-8?Q?S=C3=A9bastien_Vauban?= <wxhgmqzgwmuf@spammotel.com> wrote:

> Hi Nick,
> 
> > Nick Dokos wrote:
> >> S=C3=A9bastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.=
> org> wrote:
> >>
> >>>     (setq org-tag-faces
> >>>           '(("home" . (:background "#D4EAFF" :italic t))
> >>>             ("work" . (:italic t :background "#F9E816"))))
> >>>
> >>> Though, only the color spec above is taken into account. Tags are not in
> >>> italics like for all the others:
> >>>
> >>>      (org-tag ((t (:foreground "rgb:81/6A/7D" :background "rgb:F7/B8/DE=
> " :italic t))))
> >>>
> >>> Maybe a bug?
> >>
> >> Or maybe the font does not come in italic? AFAIK, if that's the case, th=
> en
> >> the italic attribute is just ignored.
> >
> > Nice try -- and you're definitely right asking (as this could easily be
> > overlooked), but here that's not the case: my font is Consolas (under
> > Ubuntu), which comes in italics.
> >
> > And I get _all the tags in italics_, thanks to the above specification of
> > `org-tag' -- _all but 2_ tags: `home' and `work', which come in their
> > upright version, independently of the argument passed in `org-tag-faces'.
> 
> I've just noticed, in the 1000's of lines in my `*Messages*' buffer, someth=
> ing
> that can explain the noticed behavior:
> 
> --8<---------------cut here---------------start------------->8---
> Invalid face attribute :italic t [54 times]
> --8<---------------cut here---------------end--------------->8---
> 
> Though, I don't understand why that attribute is invalid in the above spec!?
> 
> Any idea?
> 

Seb,

fonts/faces/etc are a tangled set of twisty passages, all looking
different to me (or maybe they look all the same - I can't tell).

That said, I can only suggest what I tried in my case. I set
org-tag-faces as above, added a :home: tag to a TODO item, placed the
cursor on a character in the tag and then did `C-u M-x
what-cursor-position'. I got the following:

,----
|         character: m (109, #o155, #x6d)
| preferred charset: ascii (ASCII (ISO646 IRV))
|        code point: 0x6D
|            syntax: w 	which means: word
|          category: .:Base, a:ASCII, l:Latin, r:Roman
|       buffer code: #x6D
|         file code: #x6D
|           display: by this font (glyph code)
|     x:-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso8859-1 (#x6D)
| 
| Character code properties: customize what to show
|   name: LATIN SMALL LETTER M
|   general-category: Ll (Letter, Lowercase)
| 
| There are text properties here:
|   face                 (:background "#D4EAFF" :italic t)
|   font-lock-fontified  t
|   fontified            t
|   keymap               [Show]
|   mouse-face           highlight
|   org-no-flyspell      t
`----

so the face attributes obey what org-tag-faces said, but I
think the font itself cannot do what is asked:

  (font-face-attributes "-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso8859-1")

gives

  (:family "fixed" :height 145 :weight normal :slant normal :width normal)

This applies to my setup of course, so YMMV, but it seemed likely that
that's what you were running into, hence my question.

You might be able to use the mechanisms described in sec. 38.12.8, "Font
Selection", of the Emacs Lisp manual to accomplish what you want, but
I can't help you there: I decided a long time ago not to step foot into
those waters.

HTH (but I doubt it),
Nick

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

* [SOLVED] Re: nicely managing multiple calendars in the agenda
  2010-05-05 18:45         ` Nick Dokos
@ 2010-07-12  8:26           ` Sébastien Vauban
  0 siblings, 0 replies; 7+ messages in thread
From: Sébastien Vauban @ 2010-07-12  8:26 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Nick,

Nick Dokos wrote:
> =?utf-8?Q?S=C3=A9bastien_Vauban?= <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> wrote:
>>> Nick Dokos wrote:
>>>> S=C3=A9bastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> wrote:
>>>>
>>>>>     (setq org-tag-faces
>>>>>           '(("home" . (:background "#D4EAFF" :italic t))
>>>>>             ("work" . (:italic t :background "#F9E816"))))
>>>>>
>>>>> Though, only the color spec above is taken into account. Tags are not in
>>>>> italics like for all the others:
>>>>>
>>>>>      (org-tag ((t (:foreground "rgb:81/6A/7D" :background "rgb:F7/B8/DE" :italic t))))
>>>>>
>>>>> Maybe a bug?
>>>>
>>>> Or maybe the font does not come in italic? AFAIK, if that's the case,
>>>> then the italic attribute is just ignored.
>>>
>>> Nice try -- and you're definitely right asking (as this could easily be
>>> overlooked), but here that's not the case: my font is Consolas (under
>>> Ubuntu), which comes in italics.
>>>
>>> And I get _all the tags in italics_, thanks to the above specification of
>>> `org-tag' -- _all but 2_ tags: `home' and `work', which come in their
>>> upright version, independently of the argument passed in `org-tag-faces'.
>> 
>> I've just noticed, in the 1000's of lines in my `*Messages*' buffer,
>> something that can explain the noticed behavior:
>> 
>> --8<---------------cut here---------------start------------->8---
>> Invalid face attribute :italic t [54 times]
>> --8<---------------cut here---------------end--------------->8---
>> 
>> Though, I don't understand why that attribute is invalid in the above spec!?

Replacing `:italic t' by `:slant italic' does the trick!

--8<---------------cut here---------------start------------->8---
    (setq org-tag-faces
          '(("home" . (:slant italic :background "pale green"))
            ("work" . (:slant italic :background "#F9E816"))))
--8<---------------cut here---------------end--------------->8---

Just wanted to share the solution...

Best regards,
  Seb

-- 
Sébastien Vauban


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

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

end of thread, other threads:[~2010-07-12  8:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-01 15:09 nicely managing multiple calendars in the agenda Eraldo Helal
2010-05-03  9:10 ` Sébastien Vauban
2010-05-03 14:27   ` Nick Dokos
2010-05-03 18:49     ` Sébastien Vauban
2010-05-05  8:34       ` Sébastien Vauban
2010-05-05 18:45         ` Nick Dokos
2010-07-12  8:26           ` [SOLVED] " Sébastien Vauban

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