emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Add keywords in org comments


From: Carsten Dominik
Subject: Re: [Orgmode] Add keywords in org comments
Date: Sat, 3 Jan 2009 17:59:25 +0100


On Jan 3, 2009, at 9:32 AM, firebird wrote:

 But I cannot change face of #+BEGIN_SRC/#+END_SRC with following
codes.  If the first character # is in the column 0,
#+BEGIN_SRC/#+END_SRC is displayed in the default face,
font-lock-comment-face, not my org-embedded-code-face.

(defface org-embedded-code-face
 '((t (:foreground "grey40")))
 "Used in org-mode to indicate code block.")

(font-lock-add-keywords
'org-mode
'(("#\\+BEGIN_SRC.*$" . 'org-embedded-code-face)
  ("#\\+END_SRC" . 'org-embedded-code-face)))

I'm not good at emacs lisp, so I couldn't find why similar codes don't
work in org mode.  Any suggestion and help are appreciated.


This does work for me:

(font-lock-add-keywords
'org-mode
'(("#\\+BEGIN_SRC.*$" (0 'org-embedded-code-face t))
  ("#\\+END_SRC" (0 'org-embedded-code-face t)))
t)

BTW, any body could tell me how to use `|' in a org table cell?  I'm
sure it has been asked, but I couldn't find the answer in this maillist
and org faq.  Thank you in advance.

You may use \vert for this.

HTH

- Carsten



-- Best Regards,

firebird


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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]