emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Moe <mail@christianmoe.com>
To: "Pierre-Henry F." <contact@phfrohring.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Help: how to extend org-mode markup?
Date: Fri, 25 Sep 2020 09:24:34 +0200	[thread overview]
Message-ID: <878scyiaj1.fsf@christianmoe.com> (raw)
In-Reply-To: <pVu_aOQoG4IKyU7ihMPOwdFP5-67Uhy-vbitf3ANpt0bLjilaKLs8awBE_iy1EnVi_HLa6TWUqsiNy0hEEP08QD04BChqeIdzjzBataXK6E=@phfrohring.com>


Hello,

In your example, `:next:' is a tag. Tags and keywords are different
entities.
https://orgmode.org/worg/dev/org-syntax.html

You should be able to do what you want by customizing `org-tag-faces'.

Yours,
Christian 

Pierre-Henry F. writes:

> Hello,
>
> I would like to extend the org-mode markup.
>
> For example, I would like to change the face of a keyword, say: :next: .
>
> Whenever :next: is displayed from an org-mode buffer, it should show up in using an arbitrary face.
>
> I tried this:
>
> (defun org-add-my-extra-markup ()
> (add-to-list 'org-font-lock-extra-keywords
> '("[^\\w]\\(:next:\\)[^\\w]"
> (1 font-lock-warning-face t))))
>
> (add-hook 'org-font-lock-set-keywords-hook #'org-add-my-extra-markup)
>
> But it does not work.
>
> So: how to extend org-mode markup?
>
> Many thanks,
> PHF


  reply	other threads:[~2020-09-25  7:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25  6:51 Help: how to extend org-mode markup? Pierre-Henry F.
2020-09-25  7:24 ` Christian Moe [this message]
2020-09-25  7:26 ` Ihor Radchenko
2020-09-25  7:38   ` Pierre-Henry F.
2020-09-25  8:07     ` Christian Moe
2020-09-25  8:13     ` Ihor Radchenko
2020-09-25  8:14       ` Ihor Radchenko
2020-09-25  8:31       ` Pierre-Henry F.
2020-09-25  9:52         ` Pierre-Henry F.
2020-09-25  7:55 ` Eric S Fraga

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=878scyiaj1.fsf@christianmoe.com \
    --to=mail@christianmoe.com \
    --cc=contact@phfrohring.com \
    --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).