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 ms0.migadu.com with LMTPS id sN3+E/oowmFOJgEAgWs5BA (envelope-from ) for ; Tue, 21 Dec 2021 20:20:26 +0100 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 AJFzD/oowmEDNwAAbx9fmQ (envelope-from ) for ; Tue, 21 Dec 2021 19:20:26 +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 112035682 for ; Tue, 21 Dec 2021 20:20:26 +0100 (CET) Received: from localhost ([::1]:45928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzkgT-0005dP-71 for larch@yhetil.org; Tue, 21 Dec 2021 14:20:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzkfK-0005bj-5G for emacs-orgmode@gnu.org; Tue, 21 Dec 2021 14:19:14 -0500 Received: from [2a00:1450:4864:20::32f] (port=41747 helo=mail-wm1-x32f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzkfC-0001xK-5T for emacs-orgmode@gnu.org; Tue, 21 Dec 2021 14:19:09 -0500 Received: by mail-wm1-x32f.google.com with SMTP id b186-20020a1c1bc3000000b00345734afe78so153105wmb.0 for ; Tue, 21 Dec 2021 11:18:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:from:to:subject:in-reply-to:references:date:mime-version; bh=VDpmVO8AFNEZKQpmHQMdDRB3z8IIRhJ2qAffkHwDQmw=; b=ECvtnOGlsrh6FN4z0DhgGRajWBBGNR6x5MKLnyDcvSJbagck71rFWJvZ2gpg+sx05h dx3QfWnLT828EZ0paWYDcMGtm+fb4WiuemGmZCAkSg2Mec1ooft4W8Kz5EHyD8dBvSul DdqH0sbF087AcfBTgsDXjdv3a6fXrOOpajUY7VCSwOML/7Ui9fm+lWjKHtOO7d/lG3SY 0XhgsYP3O46yb/Ogh1GgfmtMqBpeiYNIfBjC+cyVyPQtBboeM0D8UdOB83JYCuO+Z4CC Vw8lNrld/GdOQNYQctKK9nrHEVZqzd3DKRSbopfmj5FdenhhdVDfPMWqeex2EGTAwm/n wGFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:from:to:subject:in-reply-to :references:date:mime-version; bh=VDpmVO8AFNEZKQpmHQMdDRB3z8IIRhJ2qAffkHwDQmw=; b=hufnUczrfKPjXFTqGGomrZSK6w74noDjLD7av08o2rHDQ5g30w0t8Ms473KjX/26va JiaKjAcrBknlbn4Ffwsaf3t7F8Z7R766ap5pumV2wH/C+MgHfcYcxJGU/u7WN/eCy4pR tROrHNzAXzRKA5rbQLIGDD3CTqUOA/yYowXCRbE+IOKE7DthspWAtHGydda4sdSo+Ehq ADGCHUxqLUp/LkELRtnOwLZ7ISe0M+hwjLJtgDrLJmiW6GTssy/Ge3/mNqg2fA+xlv61 5bj0TWkQ8AxpqPOF6SbhXboQaUhH/Hmo7yNnUQv5OJl69ejbxb4mE5jgLOJAQghTpyoB rpow== X-Gm-Message-State: AOAM5319XqZRATBEHigcprnMpIzjCQbCNW5+3ZKzD/c5VrMXFDiNJw+K lWPbgcLuWsNX0wLk2mRPPgs= X-Google-Smtp-Source: ABdhPJwRVLkWDbnTnjUsPxgQIfMtV4MZ8mXLOHLgmZe4cfbVFBjij5dOHdr19mgEdY2lEk6ZNwWvcg== X-Received: by 2002:a05:600c:3b19:: with SMTP id m25mr4015671wms.100.1640114337453; Tue, 21 Dec 2021 11:18:57 -0800 (PST) Received: from tosh-laptop ([2a01:e0a:505:3460:1a16:a0c4:3f89:c0d9]) by smtp.gmail.com with ESMTPSA id y3sm16661622wrq.12.2021.12.21.11.18.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Dec 2021 11:18:57 -0800 (PST) Message-ID: <61c228a1.1c69fb81.c99be.46d6@mx.google.com> Received: by tosh-laptop (sSMTP sendmail emulation); Tue, 21 Dec 2021 20:35:22 +0100 From: Bruno Barbier To: Daniel Fleischer , emacs-orgmode@gnu.org Subject: Re: How to add font-lock keywords In-Reply-To: References: Date: Tue, 21 Dec 2021 20:35:22 +0100 MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32f (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=brubar.cs@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640114426; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=VDpmVO8AFNEZKQpmHQMdDRB3z8IIRhJ2qAffkHwDQmw=; b=bj8tE9q4FsFtUqqeSfaPaPqt3HrEba03h5ky8dZ7VYnPjxV4BLGPdlGkI+geekZYM0YFsA 5+SFrK+/zBoQdnGerqh8qSEqRnWswkyMHn6bgwbsPPwuHqJV5coaUnhJl9SspJzlvNxr58 zIjp2MhK+pYHa9+GhaicbkdPbNNTw+sgtBSHqcQvj3PZ2tudZRasTq9GyVIQftmmERhzP6 0kO/Ncsqgva+rOZpsXS8ntaBWF2QQ7MZLAgDfoA2JjYqOKuPibTHZfRj5p9E5G4lRw9b27 sXDGrR01A0rcdzFK+cqU3Hd1R3F2ff1hk373B93rTU5vDdPX0+MoiEKc4/lIBg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640114426; a=rsa-sha256; cv=none; b=t0zgeGdWOrMUc0Fd5TDbmgSGwbIgZWwF29r6PZq3bcxkllvIpZIz7Ikxn+ZupQwHVsJkyX DnZ+5g6LTT9OTdeXHbNfNkWUXtd8bDNaIyvu2vRgbYh7RGPVwO4B4D/qcGfJa1QuU9cjRk PLNHtEq723TJZVLp+7JubzsQ2iUIqS8kSKeQBVpNL3Y636s5NTE53I9UXbSNy5RDjN/Ino rierYhWr4ZT3HHa7WQRi1ckkT0JJl4g5Q7VLz2G8QWt0NzoGRM7lu0UAoiuDQRNhqOaclh YgQh4y0rYkcU6Vhk/KbDVIrw4kW+IuFzH2xUnLAsDEEZ3q+HhPeseKx5cz7Mdw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ECvtnOGl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -9.03 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ECvtnOGl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 112035682 X-Spam-Score: -9.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: KfDBAZTM87Sv Hi, Daniel Fleischer writes: > Hi, I want to add custom keywords to be highlighted. I used > (font-lock-add-keywords nil '(("books" . org-level-4)) t) > > but nothing happens after I restart orgmode or call 'font-lock-update'. The following works for me, in an org mode buffer: ,---- | (font-lock-add-keywords nil '(("books" . 'org-level-4)) t) `---- (I added a quote before the face name). No need to call font-lock-update or restart: any new or modified text gets the new fontification. Bruno > -- > Daniel Fleischer