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 OG7PG3ILiWDsRwAAgWs5BA (envelope-from ) for ; Wed, 28 Apr 2021 09:14:58 +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 oHR0F3ILiWBzSwAAB5/wlQ (envelope-from ) for ; Wed, 28 Apr 2021 07:14:58 +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 E2D261CECC for ; Wed, 28 Apr 2021 09:14:57 +0200 (CEST) Received: from localhost ([::1]:54964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbePN-0003tn-3O for larch@yhetil.org; Wed, 28 Apr 2021 03:14:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbeOr-0003tU-7z for emacs-orgmode@gnu.org; Wed, 28 Apr 2021 03:14:21 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:33665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbeOp-0004FH-2a for emacs-orgmode@gnu.org; Wed, 28 Apr 2021 03:14:21 -0400 Received: by mail-pj1-x1033.google.com with SMTP id b14-20020a17090a6e0eb0290155c7f6a356so1577722pjk.0 for ; Wed, 28 Apr 2021 00:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:in-reply-to:message-id:date :mime-version; bh=ycHBssdBU2+uHmv0bR8WCLS46APCRYpe8HQyM8x+32U=; b=FJxt4XicYLIX8D5eh3sAQpKupBuJkO477EigBXKgL1KX3THFxXv+yXl9Wrcrj2OvOY 1VFbY8cTZ2j4SnC2MpGUNBeOOQdj3oGl9318JVi+e1CMh371JwbuODoiGz9Cd4E9Ri6b saA4T97rcmxNmeaIJ2VuCU6hwyyK5H071k7lQHqZGP65M3+Afffn/LXyD3nRrOwlGvKY pcrfBDyJ84FPK+xRC0HUbcJAM+OE1NlLV+vCQXfiVoMun5ucISm8KgGYnT6WV/pqUpiC BjCvXy5B4x9MxngNmhPL5YO8vOM58q+5wAWv1VyuG07Dr61PIgdK1lDYILhrqFhY0J4q bFdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject :in-reply-to:message-id:date:mime-version; bh=ycHBssdBU2+uHmv0bR8WCLS46APCRYpe8HQyM8x+32U=; b=D/Ftn1DZx7Wuje319nvcTaEH8L6Cju0cnrGiibRmL0hkGTrlnjLTKWwJHfqByqlPo6 aFGDF6DQcgWV8MdWti5eFbPipiV8DVgG3z2Y/WKex5CsuropnR2LyUuu1oAAFE6FPJBE BjO2sVODPZYb6GlKJReuyOxQgekRvF8WuGh3sRT3pH9RsQ1HWKNhXj1QBszyWQyDSXi2 Ggy2521xBmh9UhXC88RWAmBFMCu3+qTAxTKU8ezCDFiuQr+uZglnw0Jky+dCoe34FiCR 3ieWd7wOgCoF5ezY22d11jYSUbrkwWC88SAWTE+PkjskWcMI1ofvL9JzXU+boYm8HYNC EgqQ== X-Gm-Message-State: AOAM53271sDJ4RIa2jT326Af3zg7rnL1DdC/JW2OsNXkihbxPFck55NM nDSi1ZMJEBYQ/VNZGAtvHkcBLC1wkxQ= X-Google-Smtp-Source: ABdhPJy2h2i+i/Kb+alpVMwezAzMzxjoYrCKXvry4qC4qPlPHKiW4ncKCd9cRvJ1F18LuHMmrGX8kw== X-Received: by 2002:a17:902:6a87:b029:e6:6a3d:29e8 with SMTP id n7-20020a1709026a87b02900e66a3d29e8mr27622444plk.10.1619594056955; Wed, 28 Apr 2021 00:14:16 -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 y195sm975979pfb.11.2021.04.28.00.14.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 00:14:16 -0700 (PDT) References: <87pmzf4bd0.fsf@gmail.com> User-agent: mu4e 1.4.15; emacs 28.0.50 From: Timothy To: org-mode-email Subject: Re: [PATCH] Fontification for inline src blocks In-reply-to: <87pmzf4bd0.fsf@gmail.com> Message-ID: <87pmye51a3.fsf@gmail.com> Date: Wed, 28 Apr 2021 15:14:13 +0800 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=tecosaur@gmail.com; helo=mail-pj1-x1033.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=1619594098; 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=ycHBssdBU2+uHmv0bR8WCLS46APCRYpe8HQyM8x+32U=; b=Od6UMUFZQWKAT/3SoHj1w0kYxqwJG23UfnRzTPT0Ch70YLwNyTr3PpgV1OQ/NGfWE5isek pH+yZeyiu/kw1UTapvGx1qJlqYEitwPaCt9jRmm4YqRU2RD+vSIjME8ky1RD1tLlPIkXL4 OC6PI7p0Esngub6yy4pBq6G0Artiorfq9zIStPXFcNgZBgBO9a7ubhiWisAi7bXkDl8oej NVLf4XIf4G33C+sAE+PABVefwA+KUDc7+ju26O+xlM/kPfPr81nhwN+ewCY1x1bvx9xr5m qs4QR5IoaLGboAP7CUOL+F3KrrpzRiydyk77iaw//JMc5FSz4WQnmb/8n12mKQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619594098; a=rsa-sha256; cv=none; b=isVxvJOuxZz3ZZXi8F4M3fbuGnxHESA1milChmwd4x8Z4369sCaSIa0e7BqVA1UAZYIBnH V0tOsljno5meCeoV9EKq7uqNK3nHWVKYzVOr3k296VLkzzGhSNVY1UBjp66QI+X7HIF+Ut A4/dHpFaTtQUWL9cpxGdWliHAPi+h8YwGrtTWxkumriePfFtTIISA+OVU6DyU/63HINLSE VIcLwIzoN3Brv8vaGREAB0vqSI6PGCj3XcssCFmQryou5ei+0rmz7+jjGz4JiWKlB2oyi7 5+S180RgY1uH4Kg1okIOHr4j/9u27bxqOgGyBAVJj77vEvkDqbjR2kBOl5uHKA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=FJxt4Xic; 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.15 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=FJxt4Xic; 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: E2D261CECC X-Spam-Score: -3.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: TDCPSviknYun Timothy writes: > Hi All, > > I've been using inline src blocks a fair bit more recently, and I've > thought it's a pity how bad they look as they are currently without > fontification. A little digging into Org internals and font-lock later > and we have this patch. I could speak about what's been done, but I > think a screenshot does a much better comparison. > > For more details, see the attached patch. Since this affects font-lock, display performance is obviously a key concern, and so I have two things to note on that front: 1. I have been using this patch for over a month at this point, frequently in a ~10k line Org file (my Emacs config), and there has been no noticeable performance degradation 2. The most expensive part of this is the native syntax highlighting, which is only used when `org-src-fontify-natively' is t, and the second most expensive part (results formatting) is only performed when `org-inline-src-prettify-results' (a new variable) is t. In brief: I don't anticipate any significant performance implications of this patch, though of course second opinions would be great :) -- Timothy