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 vvRiAeATj2BJEAAAgWs5BA (envelope-from ) for ; Sun, 02 May 2021 23:04:32 +0200 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 SBkMON8Tj2BGYgAAbx9fmQ (envelope-from ) for ; Sun, 02 May 2021 21:04:31 +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 42667AEFF for ; Sun, 2 May 2021 23:04:31 +0200 (CEST) Received: from localhost ([::1]:55818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldJGQ-0002dl-Fo for larch@yhetil.org; Sun, 02 May 2021 17:04:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldJG2-0002cg-Pd for emacs-orgmode@gnu.org; Sun, 02 May 2021 17:04:06 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:35342) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldJG0-0001rk-SC for emacs-orgmode@gnu.org; Sun, 02 May 2021 17:04:06 -0400 Received: by mail-pg1-x535.google.com with SMTP id q10so2342846pgj.2 for ; Sun, 02 May 2021 14:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:message-id :date:mime-version:content-transfer-encoding; bh=7S82TIGCNVl20zshWaBYzAtrRt3wtsv8HREG9uNSyfY=; b=lAu8lqt9Q6g4ygUW5SEbJM7/khu6SUHlh3i4yEgwvdfjZPxDclEwwQQK3Bapz3SQhP zD9F4NugsI8QI00SAAgnkDyx8yNoH526d0CSIrgm5ljLC/Mv+MJZwPET3/SIBJoaxVvI QOgoKLOBYFgIxic0rKmegtkCbWSJwZebxBX0vonWYlIEs+Nd+mflN5bpiXedH2fUD3MU SqtUxbJnw2zQrZXsWfCoft39dRlWu8G04OGMiROqDsE5Uy2UkMVMLfn5O3BysDOZlaxs QkV5tt+KUZC3tE3FGCZd+VKpbkNrBS3YINHPmQh4QVaPJjyHSby8OVTegFokz3AdeYWc eYBg== 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:cc:subject :in-reply-to:message-id:date:mime-version:content-transfer-encoding; bh=7S82TIGCNVl20zshWaBYzAtrRt3wtsv8HREG9uNSyfY=; b=morqCB/QhMWtxxorvjMI2+Z9lI01EH90p4aqLZM1aMBTdfhSDsnXhMToZoDMW+N851 RUCeHDlheTnzS7UWoSVXXMWRXvGC8EjM2x3IXiGu23CXwQFqEnM97JnNcVx6lNNgSi+i 1iM0yq18+n2vbR1ZCuQIi2VcMUZejaS3IFxESxsq9aPIa5UQuOBYuZZpNKzqVBByT45O FP1G7B9eVRKJWFivTIu0Kld0sRC2G3KlShMcFPQ7+PVBDtZJawOCMHbOHJIkFeWmRNFZ j+/JtccBIUtpWGiQ99Yu+cDtxDdrLBQNqvOY8Ajj9lFswQmh50czsc9DHYFMbLuVSpih fYrA== X-Gm-Message-State: AOAM5333U9AwhUs71xu4WHEKYixfd7uld78ZnW3kWeEF3MX69kQQdm+W bLfb1jLFQVBDWRQBEC3tMTI= X-Google-Smtp-Source: ABdhPJzqTqn00FAknaiAXqiXBHZRPIve8Gw2WEEjj1rqBzt9z646i5PxpYhvqfdWASAbGtKoVHQpig== X-Received: by 2002:a05:6a00:c82:b029:261:86c7:9ed7 with SMTP id a2-20020a056a000c82b029026186c79ed7mr15929107pfv.42.1619989443143; Sun, 02 May 2021 14:04:03 -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 p22sm15774756pjg.39.2021.05.02.14.04.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 14:04:02 -0700 (PDT) References: <87pmzf4bd0.fsf@gmail.com> <87pmye51a3.fsf@gmail.com> <87zgxcgaba.fsf@gmail.com> User-agent: mu4e 1.4.15; emacs 28.0.50 From: Timothy To: Tom Gillespie Subject: Re: [PATCH] Fontification for inline src blocks In-reply-to: Message-ID: <87r1iog85d.fsf@gmail.com> Date: Mon, 03 May 2021 05:03:59 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=tecosaur@gmail.com; helo=mail-pg1-x535.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=1619989471; 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=7S82TIGCNVl20zshWaBYzAtrRt3wtsv8HREG9uNSyfY=; b=kZhvi3vgeyUUngaLUUu4kdlzbL2mpiPO1ufve2vYuSLW781EEWPXsaOlA31LeysWVyE7to hfNDvQLTselzu9zM4rUYfr/aIbgT1TWU4qPBdu0O5+le5ErYSTbA4Y4u5Px/KO06VAT1OZ YfgCOmRdeQk7jntMooxKx3vHiSGwKRnL8thSyw1MiVvcV83iVsWNJ2Hy5ETOrPdsF9WV69 dtrfGx1gWJ2j4NF+cx45GtTxJsdphJl2w7Hpx+yc3oDGeAUQ5qc9wZsVriobHdHkSIfoAG 2EgaSL65YzuyHD8CbjaFngGyiFCPEXl8QiA9eIG2CHOtUZn5Y/rQXuSoGkRcnA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619989471; a=rsa-sha256; cv=none; b=poxYVSz4uVrI/9+Crj82y3SKwSlyqGGzvgL9vyi/znRNzSn8cLqai24klNd2A44sDS4aR3 9jm7Vmfab+aBZnx486ItD6tVkkqWfyhY85/xkg9lb94itUxdzP2jIvuCukvSl3wW4HEnNN gnUo9OvqwjsntkEJlQP2v/mKzhCuwdITsH7cX6XU345rBsjr4LQdgGTSdfUXVEOuzaxJCc Y2r/3e4tEXgh2H3Xy7zlZNIhp4wBhf/+M5eYuGVQ4ECphVRzHQ/IpciNiJi4I2eleFYd48 qmiD6TUWAzeCuAGEwJnmOLhiMaZ5qTGhrEJd753BOpBACKFlI8j4oUEPRjmHbA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=lAu8lqt9; 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=lAu8lqt9; 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: 42667AEFF X-Spam-Score: -3.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8fidNi30m5hJ Thanks for trying this! Tom Gillespie writes: > 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. I see. I imagine the expected behaviour of such a function would be to toggle org-inline-src-prettify-results and redisplay? > 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? If there is something that can be done, I'd love to hear about it. I'm no aware of anything 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 co= mpletely > alien characters. Going with empty strings also seems consistent with > the behavior for hyperlinks. Hmmm, yes. Perhaps something else would make for a better default. I'm open to suggestions on this, I just didn't personally like any of the ASCII chars I tried when writing this. > 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." This sounds like something worth being aware of, that nothing can really (currently) be done about. > 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. I don't know if adding faces is a big deal or not, so I tried to pick "sensible choices" from the current set. Further input on this would be appreciated (particularly more people's thoughts). -- Timothy