emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Scott Jaderholm <jaderholm@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: adding more color to agenda events
Date: Sat, 3 Mar 2007 16:33:09 +0100	[thread overview]
Message-ID: <64eae0edb78d2dff66fe09af1204e540@science.uva.nl> (raw)
In-Reply-To: <b2e202b30703010943m4a0652cfl10477e820ad2545@mail.gmail.com>

Hi Scott,


On Mar 1, 2007, at 18:43, Scott Jaderholm wrote:
> Thanks Carsten!
>
> Do you know how to select the whole line instead of just the word?
> Also, do you know where I can find more information about the syntax 
> to use in setting colors in the '(face ) area?
>
> Is there an easy way to not interfere with the other highlighting 
> that's going to happen? I'd like to highlight stuff in work.org with a 
> different color, say orange, but I think I'd like TODO to stay red and 
> Scheduled to stay green but change rest of headline color and the 
> work: column. If there's a way to do this easily I'd also like to use 
> it when defining special highlights for tags.
>
> Thanks again,
> Scott

Well, first you need to lear about regular expressions.
For example to match a line containing the word birthday
you would do

     "^.*\\<birthday\\>.*

To change only part of a line, leave the rest, you can use
groups.  For example, to change everyting in a line except
the word TODO you would match it like

    "\\(^.*\\)\\<TODO\\>\\(.*\\)"

and then use `add-text-properties' twice, first to add the face
property from (match-beginning 1) to (match-end 1), and then
from (match-beginning 2) to (match-end 2).

If you want to change the faces used by Org-mode in normal .org
files, try

    M-x customize-group RET org-faces RET

there you can change all the standard faces used.

If you want to add new stuff to fontification in org-mode,
take a look at the function `font-lock-add-keywords'.

There are quite a few faces already defined in Emacs that you can
use, or you can define your own.

Well, you are entering the world of Emacs hacking here, and the only
way you will get further is by learning about text properties,
regular expressons etc in the Emacs manual and in the Emacs lisp manual.

- Carsten

      reply	other threads:[~2007-03-03 15:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-27 21:30 adding more color to agenda events Scott Jaderholm
2007-02-28  8:58 ` Carsten Dominik
2007-03-01 17:43   ` Scott Jaderholm
2007-03-03 15:33     ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=64eae0edb78d2dff66fe09af1204e540@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=jaderholm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).