From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 61iLHXMSj2CGDQAAgWs5BA (envelope-from ) for ; Sun, 02 May 2021 22:58:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EA2YGHMSj2AWdAAAB5/wlQ (envelope-from ) for ; Sun, 02 May 2021 20:58:27 +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 F0D5815C15 for ; Sun, 2 May 2021 22:58:26 +0200 (CEST) Received: from localhost ([::1]:48800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldJAY-0007yx-4d for larch@yhetil.org; Sun, 02 May 2021 16:58:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldJAC-0007yn-2m for emacs-orgmode@gnu.org; Sun, 02 May 2021 16:58:04 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:44780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldJAA-0006dk-Hz for emacs-orgmode@gnu.org; Sun, 02 May 2021 16:58:03 -0400 Received: by mail-wr1-x434.google.com with SMTP id l13so1906128wru.11 for ; Sun, 02 May 2021 13:58:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=8Xb/S1ZggdQecCppSP20/WlZdRa424L8NtOPvmje59I=; b=nUdYL8tXMs624VBwHVd96aO+AszOBkwmgDZL/ZmQTX0+e1Uw6JVG5PSHnn2O4ZOtsn ZRnZ6/5+/AxsRPYAzMFVzmuoL88a/g4fmduMOR/RAnvU9x0CsO36RJk2T7wTX/Sje9eT Uliw509vwIuTlFgyoDv/mCY1xJX6e8CMbMm6HwNHT2apqXVm7DImHR716t0LoEn8nhb5 mnr0Q23ltNeXzEg5xATAw8mqh6DZEy0LDB8kUUoAZdHl2zlPWQ4WKrpOZC07AhS5tn5E cOtqYmJY6jDQf687b6vI4rXTqwt0WgByff3/RnOIFNCDIzZRAwM2ECMwZIB+zY/4ChFh KAGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=8Xb/S1ZggdQecCppSP20/WlZdRa424L8NtOPvmje59I=; b=bzxLGxKJCRBgVrWl6PULzfd4ZsSt0hQzdgBG9lFxSQpLEL5Eb0U84/WttyzLcf9tM0 zO5f9tOKpCHxdcTxicWL0ybR0Ax/B+qu2BeN3Dh0/t+RF4eu9IvtJW7wXY1IMGhHXYjV i2dae50wtkdVm7k4T4acnwbxEkv4IQi1NKoX2nMGZl5m7tF5BS/7XBlZmqzu68EBDfMi 8RubksXKYSqzjYnMrc3u23DNGqyA0rNOMKphidtxIP/ELNlC6MWUcNnIgWgkfFIRdq7y 3gnDwgqCS5HcMUlaGFaERVnPIIs4ufc6yt/3jd8S3fx9gmrGPvz+6t2RU2K0/H6q1nAj qZHg== X-Gm-Message-State: AOAM5322DyoaKZomW5yTdAUUsDL9zN4JGaTeSX9PCH4dmot/+AdlT7MS ECd2fiaR5CklKv3Wk8O4eD1pIYZK2v+XK7C+d637CtscUUqs+g== X-Google-Smtp-Source: ABdhPJy4lBOVHsmhJrWblW7nDCa16eq0P99cZjzjjMxJotegvrY1/RGFJAGSz/wTTZeQqyiuB9pyQoRC1nGZhHDwiTQ= X-Received: by 2002:adf:e845:: with SMTP id d5mr20440717wrn.96.1619989081396; Sun, 02 May 2021 13:58:01 -0700 (PDT) MIME-Version: 1.0 References: <87pmzf4bd0.fsf@gmail.com> <87pmye51a3.fsf@gmail.com> <87zgxcgaba.fsf@gmail.com> In-Reply-To: <87zgxcgaba.fsf@gmail.com> From: Tom Gillespie Date: Sun, 2 May 2021 13:57:50 -0700 Message-ID: Subject: Re: [PATCH] Fontification for inline src blocks To: Timothy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=tgbugs@gmail.com; helo=mail-wr1-x434.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: , Cc: org-mode-email 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=1619989107; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=8Xb/S1ZggdQecCppSP20/WlZdRa424L8NtOPvmje59I=; b=FlqE51EdtLqkrBwWwXx81JEGhoK9AV2f9AJimGUO3uhmhcSSaICmfYq5JmPWwU74q3a4xC HkmqfmwLDueHrdhdYKJTcFB0f9uaXk0683pa+dyP271OmqS/uOtayKkPwVbnqZRPPCo+mg UgAc1cc9Bt7f6eaR3HHYjhMGH0M5S+9UVBfDvERwcpv1M5NaX1xIgHHVaqDf2dSJIxl6MG nG2eLKwmSMf9G1xWup63hkDha3LmVt8C+izhKb379nywhro1B8LjLnm8XKfYXaRaOTo8qp mwIrpZQQg4H/LYwFtQiCu0hA/DfDDDzjlHMT+J+KNx6cUR0x0VjjNH9Qd2r03g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619989107; a=rsa-sha256; cv=none; b=A6YRyzNXtjzykCKX1/BpnLZzgqUxkC9FNC9mTp0ojc1u6x3FQF37z5ZJR54HuaClcKle1w raSDf56PbqkVI5MgAL9Mhs4NJq454Dn5K2ejQa0TWSBV34JGsXytqxoLmjUOuM7OOkdq0A r90ZODaQy3XTfx57p9qiIKo1MEJZm6i1cf/JyoU010KnNf+J4wVber/MO7QFN2ILWFp7vD apydzns+ad7ub9GX2iFMtaejT5FoXvjzX6WY5psaFJJRJcStwvYUGsjfWHgZKURntJTmzV kzOlQNYQK1peaBh2ti7rPXzm8aGD5Gved1U9XRTruBVlrDq7ix45viMincWvSw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=nUdYL8tX; 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.16 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=nUdYL8tX; 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: F0D5815C15 X-Spam-Score: -3.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: HOwJ2H7/ej2j Hi Timothy, It seems to work more or less as expected. A few comments below. Best, Tom 1. I think there needs to be a function to toggle org-inline-src-prettify-results as there is e.g. for hyperlinks. I was quite confused by the prettified results. 2. I'm also not sure that this approach to prettify is a good idea. There are issues with unexpected killing/yanking and basic navigation behavior of the prettified text which seem worse than the already troublesome issues with hyperlinks. I'm not sure we can do anything about this though? 3. I'm not sure about the default choice for prettified delimiters. I see there is already a way to customize the delimiters by providing a cons. I think a default value of '("" . "") might be a better choice since =E2=9F=A8 and =E2=9F=A9 being hardcoded seems like it introduces comp= letely alien characters. Going with empty strings also seems consistent with the behavior for hyperlinks. 4. There is an interaction with rainbow delimiters that there isn't an easy solution for. I wish there was a syntax type that was "this is a paren for electric pair mode but not for font locking." 5. I'm not sure that the faces selected for src_ and lang are the right ones. Is there any issue with adding new faces specifically for those rather than reusing existing faces? I thought that matching the font locking of #+begin_src lines might make sense, but then I realized that that doesn't make sense because that is for blocks more generally.