emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: How to add comments in a plain list
Date: Mon, 28 Sep 2009 08:21:40 +0100	[thread overview]
Message-ID: <A700F49E-A58E-4F6B-96EE-A7D7DB2DB565@gmail.com> (raw)
In-Reply-To: <87my4j49on.wl%ucecesf@ucl.ac.uk>


On Sep 25, 2009, at 11:10 AM, Eric S Fraga wrote:

> At Thu, 24 Sep 2009 10:27:57 +0100, Carsten Dominik wrote:
>> On Sep 22, 2009, at 7:30 PM, René wrote:
>>> Unfortunately, in this case Emacs doesn't fontify those lines as if
>>> they were comments.
>>
>> It does now.
>>
>> - Carsten
>
> Carsten, thanks for this.  It works perfectly.
>
> But this leads to me a more general question for all of you emacs
> experts: comments in my org files typically consist of /less
> important/ text and so I like to de-emphasise the text by changing the
> face used (to a light gray, in my case, compared with the default of
> firebrick).  However, for programming, I prefer the default.  Can
> somebody suggest how I can have a different font-lock-comment-face for
> org-mode files without making a global change?  Should I put something
> in the org-mode hook?
>
> Or even on a per-file basis?  I've tried using Emacs local variables
> but haven't found the right incantation... :(
>
> Any suggestions more than welcome!

Hi Eric,

I don't know how to change `font-lock-comment-face' on a per-buffer  
level.

What you can do though (I think) is use the function `font-lock-add- 
keywords'
to add your own regular expression for matching comments and specify
an arbitrary font for this match.  For example (untested):

  (font-lock-add-keywords 'org-mode
   '(("^[ \t]*#.*" 0 my-org-comment-face prepend)))

- Carsten

  reply	other threads:[~2009-09-28  7:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-22  2:37 How to add comments in a plain list René
2009-09-22  4:16 ` Bernt Hansen
2009-09-22 11:20   ` Eric S Fraga
2009-09-22 12:52     ` Bernt Hansen
2009-09-22 13:20       ` Eric S Fraga
2009-09-22 14:10         ` Bernt Hansen
2009-09-22 15:53           ` Eric S Fraga
2009-09-22 18:30             ` René
2009-09-24  9:27               ` Carsten Dominik
2009-09-25 10:10                 ` Eric S Fraga
2009-09-28  7:21                   ` Carsten Dominik [this message]
2009-09-22 11:32   ` René
2009-09-22 12:10     ` Carsten Dominik

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=A700F49E-A58E-4F6B-96EE-A7D7DB2DB565@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /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).