From mboxrd@z Thu Jan 1 00:00:00 1970 From: firebird Subject: Add keywords in org comments Date: Sat, 3 Jan 2009 16:32:31 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LJ1vv-0000cB-LK for emacs-orgmode@gnu.org; Sat, 03 Jan 2009 03:32:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LJ1vt-0000ag-Vg for emacs-orgmode@gnu.org; Sat, 03 Jan 2009 03:32:35 -0500 Received: from [199.232.76.173] (port=45820 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJ1vt-0000aQ-RC for emacs-orgmode@gnu.org; Sat, 03 Jan 2009 03:32:33 -0500 Received: from rv-out-0708.google.com ([209.85.198.245]:30421) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LJ1vt-0007R4-A7 for emacs-orgmode@gnu.org; Sat, 03 Jan 2009 03:32:33 -0500 Received: by rv-out-0708.google.com with SMTP id k29so7846741rvb.6 for ; Sat, 03 Jan 2009 00:32:31 -0800 (PST) Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Dear all, I have used org mode as agenda for several months and was really impressed by its great features. Now, I want to port my notes from muse mode to org mode, in which I recorded many emacs-lisp, c/c++, ruby snippets. In my color theme(color-theme-dark-laptop), the comments are red. It's OK for coding, since comments are important and worth reading. While in org mode, #+BEGIN_SRC/#+END_SRC are only code block indicators and not worth reading. I wish they could be in dim colors and don't pain my eyes. (In fact, I wish the whole embedded code block could be in a dim color if it's possible.) However, I don't want to change all comments in org mode, because I want others of them, such as #+TITLE, in a bright color. I used to add some keywords in emacs lisp mode with following codes. They works. (font-lock-add-keywords 'emacs-lisp-mode '((";" ("\\<\\(GM\\|NB\\|TODO\\|FIXME\\)\\>" nil nil (0 'font-lock-warning-face t))))) 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. 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. -- Best Regards, firebird