emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: firebird <firbir@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Add keywords in org comments
Date: Sat, 3 Jan 2009 17:59:25 +0100	[thread overview]
Message-ID: <ACF73293-1035-4E18-8D39-CD2E0CC21243@uva.nl> (raw)
In-Reply-To: <ccf45d8d0901030032u70557487y183ae49c5a9c83f4@mail.gmail.com>


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.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  parent reply	other threads:[~2009-01-03 16:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-03  8:32 Add keywords in org comments firebird
2009-01-03 11:41 ` Carsten Dominik
2009-01-03 16:59 ` Carsten Dominik [this message]
2009-01-04  1:49   ` firebird

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=ACF73293-1035-4E18-8D39-CD2E0CC21243@uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=firbir@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).