From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yI7dJSicbV+nHAAA0tVLHw (envelope-from ) for ; Fri, 25 Sep 2020 07:28:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yBLgISicbV9/OgAA1q6Kng (envelope-from ) for ; Fri, 25 Sep 2020 07:28:40 +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 4156194060E for ; Fri, 25 Sep 2020 07:28:40 +0000 (UTC) Received: from localhost ([::1]:58082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLi9n-0008HO-7Z for larch@yhetil.org; Fri, 25 Sep 2020 03:28:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLi94-0008G9-Gh for emacs-orgmode@gnu.org; Fri, 25 Sep 2020 03:27:55 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:46897) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLi92-0003VI-Sq for emacs-orgmode@gnu.org; Fri, 25 Sep 2020 03:27:54 -0400 Received: by mail-pg1-x52a.google.com with SMTP id 34so1773086pgo.13 for ; Fri, 25 Sep 2020 00:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=TxTI1wDaZrUNIaYOc2hydMgBm488/wBiLVFzWQp6Wzk=; b=Q1FuffbJJ1h5vPmCBCgA8ffi8Jy4XnHiNFkbTlpVgsfTjpoM5+tE45H5CvyXypwvL6 g3Ty6u7IXXehGia+l52sJ/6qVRxRcfCi4ZdhT+dHEt9kSQ/GGwOvAkJJIabTUkZ53hMH qsa4JfXcIMU1/IwLqmo4b9SJlNGzTBnEHIhMyqlwYHDOjG2YiKUh/p4ypWurR6f3MxOE 0BMjyekNp4/GLHtXYHhXq1iNNJhjsIGRzSxZSo6H6QRU7E9cwQxzIEa252T1gKxIQZlB KK9idTH17SmP+TGWwO/RbG2lc0J9ZC63alhFEGuxUds83Je2eUjEWl6fDDCfFhRBnMg8 3uBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=TxTI1wDaZrUNIaYOc2hydMgBm488/wBiLVFzWQp6Wzk=; b=CkeuoHslYRkKXt9JGs+uJBYkuBYrmqFE8UrSfXe19DD1biifKguRsC+Vd3UkEQMRi9 2qNkadkZphUkwQ8fOWz1Hq4RbwH85BjdbEy+rEMWbLOaeYp18OCyz79q/2MCLOXZno5S GZKpjmbKGXcw2r2MRzSpY0KocEdMKwy5q6roP0vx8ZvWk2GzpyZiQWbEKAWoU05SqypX 9hekp+9PX6yEAeNVOx3N/+RZRhkFaudpy1ObDLUHkJyDit2nsM9aNTJEWdmrqngBtrjg AAHmd7wg38Ya4MBjDqzzvMlpL0kRF7VIs56+S6k5XpnbPtN/w6AW52B6oXFDMZnmitji T5nQ== X-Gm-Message-State: AOAM530pbKTUi6+9TCAl9GvrkRMzE7ASQV68IUaXXBJiYX3LcfxjeoW2 TcQoZIm1HSoji3uuN1xGG61BDYbFSZ5XdA== X-Google-Smtp-Source: ABdhPJxNBMoSTbZ5bPB51A7pnkuGxhDKF+dDRyWuZ0D3ASpvX8UIhLwNNUVQACF5wbCskN9hG5fc7Q== X-Received: by 2002:a63:c64c:: with SMTP id x12mr2416040pgg.138.1601018871201; Fri, 25 Sep 2020 00:27:51 -0700 (PDT) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id w185sm1719374pfc.36.2020.09.25.00.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 00:27:50 -0700 (PDT) From: Ihor Radchenko To: "Pierre-Henry F." , "emacs-orgmode\\@gnu.org" Subject: Re: Help: how to extend org-mode markup? In-Reply-To: References: Date: Fri, 25 Sep 2020 15:26:45 +0800 Message-ID: <871riq5nbe.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Q1FuffbJ; dmarc=pass (policy=none) header.from=gmail.com; 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.29 X-TUID: k/5Fp+UqFTzs > (add-to-list 'org-font-lock-extra-keywords It is internal variable. You should not use it. Simply use font-lock-add-keywords instead. Best, Ihor "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