From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MMXIFOKbbV9OHgAA0tVLHw (envelope-from ) for ; Fri, 25 Sep 2020 07:27:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EAmfEOKbbV/sSAAAbx9fmQ (envelope-from ) for ; Fri, 25 Sep 2020 07:27:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 968129403D2 for ; Fri, 25 Sep 2020 07:27:29 +0000 (UTC) Received: from localhost ([::1]:56576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLi8d-0007cx-Br for larch@yhetil.org; Fri, 25 Sep 2020 03:27:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLi7t-0007cQ-TZ for emacs-orgmode@gnu.org; Fri, 25 Sep 2020 03:26:41 -0400 Received: from mailer-211-194.hitrost.net ([91.185.211.194]:58468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLi7r-0003ON-P0 for emacs-orgmode@gnu.org; Fri, 25 Sep 2020 03:26:41 -0400 Received: from lk.84.20.244.182.dc.cable.static.lj-kabel.net ([84.20.244.182] helo=Tauriel) by b1.hitrost.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1kLi7l-005wKW-U7; Fri, 25 Sep 2020 09:26:34 +0200 References: User-agent: mu4e 0.9.19; emacs 25.3.2 From: Christian Moe To: "Pierre-Henry F." Subject: Re: Help: how to extend org-mode markup? In-reply-to: Date: Fri, 25 Sep 2020 09:24:34 +0200 Message-ID: <878scyiaj1.fsf@christianmoe.com> MIME-Version: 1.0 Content-Type: text/plain X-GeoIP: Country [IP], SI [84.20.244.182] X-Antivirus-Scanner: Clean mail though you should still use an Antivirus Received-SPF: pass client-ip=91.185.211.194; envelope-from=mail@christianmoe.com; helo=mailer-211-194.hitrost.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/25 03:26:34 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "emacs-orgmode@gnu.org" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 1.49 X-TUID: ZD2RPu5VCY2W 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