From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YDeXEmeeZGDObQEAgWs5BA (envelope-from ) for ; Wed, 31 Mar 2021 18:08:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id uEl+DGeeZGA9FgAAB5/wlQ (envelope-from ) for ; Wed, 31 Mar 2021 16:08:07 +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 9B49AA24D for ; Wed, 31 Mar 2021 18:08:06 +0200 (CEST) Received: from localhost ([::1]:49254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRdO1-0002t0-47 for larch@yhetil.org; Wed, 31 Mar 2021 12:08:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRdED-0004VQ-UA for emacs-orgmode@gnu.org; Wed, 31 Mar 2021 11:57:57 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:38729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRdEB-0000IT-7X for emacs-orgmode@gnu.org; Wed, 31 Mar 2021 11:57:57 -0400 Received: by mail-pj1-x102b.google.com with SMTP id k23-20020a17090a5917b02901043e35ad4aso1403981pji.3 for ; Wed, 31 Mar 2021 08:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:message-id:date:mime-version; bh=3AYhGsj4sZ0g/OslH34irPqtEiq4wxfh6/HEaWPJLzc=; b=ILUEVsBeCcg/4kRLdVmCXTZLTUzgrzqOjyMmA+hTTYxNzOjmsnvIbj1kHPg7bPmZ3r 7gwfOUGKtEPrXVrdu2BA0HGHWAUdGH9RhKWGfch6xD9mM3wYh078DYzkl4R7StgIzQUK 8yk2+ICdZBlntikDYReBb/Tqt6s1ec/cA+XLBk/UVtXLIfAi/8mrmoTstv4kZHQxA8R+ fxFi7o+xSzr4a0FaWhgiXaDphcCL3qwP2i3PNKDdvGP67L5JjaIaxJfWDvzQYLm8UaOV ezFyJWNyPQEkcfCIMg8MBOlXA9fmAkfoSflC5VgkQUKVsdEl7P3SYxvx5j+wzJzk+yvg enAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:message-id:date :mime-version; bh=3AYhGsj4sZ0g/OslH34irPqtEiq4wxfh6/HEaWPJLzc=; b=QlklGU7I1iu0foLeqLPKgLyrX14bR1xVFeN1WeR72l859Mlo5nrx61Jf3CyZ7Tk0OS wPPn3Z+XN+cZgfRZ0lbheQmHlpC4d8uumiNDlBNSeGK1f67Hpw3z5STiMH0O38kjBXux smXXRLf8fygIwyWDX0ei8ZedLEz73ZIkmgAKYRvHWuQiFVmTfzxbZ96m66sdaMhYy/S7 a4cB8AbYzi9626r826Q/sioh57g616hKbYCMEXgAScJvFHgTqCVr/DEUW37uU09Dwsy8 T1mcVzIqJFCw9tsAGruc9KJlO1+91Ea8cRl16is8fH9+5wggocA9X5tWt9ygQt+2xEqQ L1mg== X-Gm-Message-State: AOAM533/GBq9n0fi4PNeTgxRP7M2G0Hw7+CEPnZM7MXjr9iBBRwUyMfS 7FsvSvwT8plvC3ARNNU6IG/L4yejVdc= X-Google-Smtp-Source: ABdhPJybmmXVttHy6wE5FbGZ7SXXdAMDQ6JIRJ3zdRcVigeViAcHfn1Nh6ImFonC6YU41PlgTW3uew== X-Received: by 2002:a17:90a:c28a:: with SMTP id f10mr4332785pjt.15.1617206273356; Wed, 31 Mar 2021 08:57:53 -0700 (PDT) Received: from localhost (180-150-91-8.b4965b.per.nbn.aussiebb.net. [180.150.91.8]) by smtp.gmail.com with ESMTPSA id c24sm2786708pfi.193.2021.03.31.08.57.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 08:57:52 -0700 (PDT) User-agent: mu4e 1.4.15; emacs 28.0.50 From: Timothy To: org-mode-email Subject: [PATCH] Add font-lock rule for inline export snippets Message-ID: <87im57fh8j.fsf@gmail.com> Date: Wed, 31 Mar 2021 23:57:49 +0800 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=tecosaur@gmail.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617206886; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=3AYhGsj4sZ0g/OslH34irPqtEiq4wxfh6/HEaWPJLzc=; b=nD/Skj1THHEkfzfUyc5wuQJa3y0gp9sxkT6IbOWaGRM1UxF3IjXDYJ1Dlp+TDZDa11R6DF zaG/giNU5tabkJg1Nz8ZyHKZJiOj/aQbUNy8N8tPTJJC5552xV/jEuzecsIGmTCrQdWI2K AVJcz9c/KqEvcdTHDo+0QJtWY8LyE1uEK+8UFP0ib5j37VR6COpE/WVYQEkbwQ1FhLNGQe /DjXon7xHdKtFCkTed8C9R3CaAY/Av01ZNrV6eyLIap+ChRYY+qfNBAwh3UIZjM/997k+6 dlpxr0bdMkeZQQsq89ZXU2D2tSxeHkZmKPp6nufor9fBRPB3pml16Ml26sTLUg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617206886; a=rsa-sha256; cv=none; b=ncKm14+w0P4AKNR7WgxF3le9cY1XY2biJ5Ub28ZmjwF34FqQ5uiJdA5aXPypA1h7chc3/e PauSGOpdwvd2EJB5QJByGahN07l26HfwAXKOYJPs4wr6l9sMdVFMu8cPnJh/qkgqtamRhZ 4K3468Ql5Dk+AK18vk70JfK/bbEjF0t6Gp+ALnioitV4tVniJZCNXEBJWdTOcdfT2XM3Xh GcsilDehVtBS3CGMDNzjZa6vavuVultJ692p3tUUDeAUOnZwZMDGagbOmkvt8F5UXsmmQt IkTLvj4r/QJeO44LM5UTzB1gKmvr5CWTTDt70FLb3d50nb4/DRIBKQGX9xjeQQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ILUEVsBe; 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-Migadu-Spam-Score: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ILUEVsBe; 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-Migadu-Queue-Id: 9B49AA24D X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: R+oROl7XuHGj --=-=-= Content-Type: text/plain Hello, The latest in my visually-oriented (mostly) short patch series, adding basic fontification to inline export snippets --- @@comment:these things@@. I think fontification for stuff like this is nice because it visually indicates to the user that they've written out an Org construct, and haven't just mis-remembered / imagined some syntax. In future this could be extended to use native fontification for recognised export formats (like src blocks do), but I think this is a nice improvement over nothing. -- Timothy --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-Add-font-lock-rule-for-inline-export-snippets.patch >From 3584602f88381ab9624c767a83c18cfd93ffeaf0 Mon Sep 17 00:00:00 2001 From: TEC Date: Wed, 31 Mar 2021 23:47:58 +0800 Subject: [PATCH] org: Add font-lock rule for inline export snippets * lisp/org.el (org-set-font-lock-defaults): Add font-lock rule for inline export snippets. --- lisp/org.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index f4d069504..240f745c7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5719,6 +5719,11 @@ (defun org-set-font-lock-defaults () ;; Description list items '("^[ \t]*[-+*][ \t]+\\(.*?[ \t]+::\\)\\([ \t]+\\|$\\)" 1 'org-list-dt prepend) + ;; Inline export snippets + '("\\(@@\\)\\([a-z-]+:\\).*?\\(@@\\)" + (1 'font-lock-comment-face t) + (2 'org-tag t) + (3 'font-lock-comment-face t)) ;; ARCHIVEd headings (list (concat org-outline-regexp-bol -- 2.30.1 --=-=-=--