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 yMRpIiDtnGE1hAAAgWs5BA (envelope-from ) for ; Tue, 23 Nov 2021 14:31:12 +0100 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 aN4sHiDtnGGrZwAAB5/wlQ (envelope-from ) for ; Tue, 23 Nov 2021 13:31:12 +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 269952121E for ; Tue, 23 Nov 2021 14:31:12 +0100 (CET) Received: from localhost ([::1]:38740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpVsw-0005HN-TJ for larch@yhetil.org; Tue, 23 Nov 2021 08:30:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpVre-0005G6-L4 for emacs-orgmode@gnu.org; Tue, 23 Nov 2021 08:29:38 -0500 Received: from [2a00:1450:4864:20::532] (port=44608 helo=mail-ed1-x532.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpVrc-0000yB-P1 for emacs-orgmode@gnu.org; Tue, 23 Nov 2021 08:29:38 -0500 Received: by mail-ed1-x532.google.com with SMTP id l25so75270149eda.11 for ; Tue, 23 Nov 2021 05:29:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=6TrIFltc6cMxkbZRfDjei93iAwFGyZrTTGz1T6hlUas=; b=G2tsOexUJ3voMDdSCHe3N2NXL2Ribir6TjF9RGkRTvzaXZrXSxNpdhFnqPe+XE1QXb oRTp0ATEzr/mbuZf/gbrGnV6XgsbJ9mWx7T36lE/zZnnEUbrrsFUE++JzHUYRmzUgs87 l3tUxhztHCwFEYizyYFaIRBkMwuO+Pa8EgrYKM4LtW3o+0oB3m9jETgNtxUzQNrH5Vrb HwRF6CNu7gnObqD7RxMoM5hctAd+liJhY8GNPln+yEY/2tr90aivYwnOeb8NJ+jpYCLy EJbUOboc+wzrVh/dDhA/sy/Xj80DfamMeUEs0KWPYL7DttoKgjxCkjkpJn0KVccZSVrJ siHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=6TrIFltc6cMxkbZRfDjei93iAwFGyZrTTGz1T6hlUas=; b=howa+QLjVqcgkNmvymEp1WkrkKI5uO2Qx1WAPWKTyYLnfHRuhED8Te45j4IJt+orBl gU/u12SGGjMpBP8ZlgmVV6JM89I8PzoSpklYjjKes7bdKv2YVjla1y/2ekunKcqi316s zpfkH1MdX9SRuXpPSFkuTHaf5IW/nJJa0b/dlxM1oKs7N+ptNatCWQ1vy9Qx4IdDZq5Z E6jzkUizDhEX0m/BSBYGUfat4I1yUcMsJG4mJ4qfHy4NV291i/shbeBNPxGEdnJU4J1u ktLzBBVZy7jnsTZ9Uwr33XDwnkSZFo2bZbiR2bOgWbBsvH8w1mmgDbeo+gmy5MQI65mb kYfA== X-Gm-Message-State: AOAM533Zux7KpDFP5U0LvYl0XiqkByvv3FV5eJ6jMUomhWkhf5KC2gc0 7mW3owjuYaX2EPEDZx+/JMw= X-Google-Smtp-Source: ABdhPJzYyb1QsdNwh9E3IwRz3JIo7QMhwmKAZ0rMmcCCKh6+7rJXisTVSp+yt5m+hVh0On728HGDUQ== X-Received: by 2002:aa7:cdd9:: with SMTP id h25mr9120089edw.130.1637674165283; Tue, 23 Nov 2021 05:29:25 -0800 (PST) Received: from localhost ([141.105.67.194]) by smtp.gmail.com with ESMTPSA id yd20sm5187792ejb.47.2021.11.23.05.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 05:29:24 -0800 (PST) From: Ihor Radchenko To: Timothy Subject: Re: [PATCH] Fontification for inline src blocks In-Reply-To: <87y25g5jip.fsf@gmail.com> References: <87pmzf4bd0.fsf@gmail.com> <87o86d7g05.fsf@gmail.com> <875ysk76bo.fsf@gmail.com> <87a6hwpeew.fsf@localhost> <87zgpw5lt9.fsf@gmail.com> <87k0h0b6mv.fsf@localhost> <87y25g5jip.fsf@gmail.com> Date: Tue, 23 Nov 2021 21:30:49 +0800 Message-ID: <87wnkzf186.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::532 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=yantar92@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=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: , Cc: org-mode-email 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=1637674272; 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=6TrIFltc6cMxkbZRfDjei93iAwFGyZrTTGz1T6hlUas=; b=CZkIJlJJ0R4OFhkYS3dlvIpBnzrgPUdSaprAbODibj9NsyklWZMD5XT0HuAbP/t1BWg1Qz zAZ7Yzf/33X5hl62qa/ShAKNsDq8knDirb4oOFz0S14K6UYjKvoT8xza/ruf51e3Bptzdg /JsMb9cyESAFtxThxxL/3OHsWC8VLOYjmH87aJzlZJuurXERvJUoMr+85YvyMNJcIK0rN1 T576h1uJjP/9cHHHyaI2wOnBwXs/7X7WHqWDIrxptlH6HUDlAgsALGRHLXhE6RmGR5w+3A OITsNNZx7eOTixohl8KXzXFKzaszraObGg4U2JiQAXT4hJXpfXTGGOCKAnj3Iw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637674272; a=rsa-sha256; cv=none; b=WAjp42zBoUucIPKvM/N+Nwlh9YMM4dvu+tLBr4jF0KSdkF+v42l0jkAJClQF3c3R2jDz8d S9jTDHqUiBElfCtKxyW7sOrIC42WOnXQ2Vzrujd41e4KmePCS4IqlzTyJzOp9T2e1ALhAV J3X0h36kIDVv5LSoEvFQZpgAtdzxdrB9MExWIp6uiHe7zXXiiF+w9vHbZDWqk7Ke+AbLxO cZym6DN5uUhuy4ZB066wmfWM8544mOEqiLMN5fJ/4gd+IRrGTd6lv6U6ozEmV4hyGbMT24 qHFuWOabEVRhgapZsq5w5tV9SZfXaTETvP3ss97BwKbh272UnBTLZE56UREsOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=G2tsOexU; 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: -3.58 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=G2tsOexU; 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: 269952121E X-Spam-Score: -3.58 X-Migadu-Scanner: scn0.migadu.com X-TUID: bJHFVXNGpNOX Timothy writes: >> I can see the purpose. However, it still looks like overcomplication. >> org-element-context takes care about this issue simply by narrowing to >> current element (inline src block is an object and hence must end within >> current element). > > Well, one simple change we could do is just replace > org-inline-src-fontify-max-length with the addition of `(save-excursion > (search-forward "\n" limit nil) (point))' to the restriction. That's an option. Though you should also consider a paragraph ending at EOB. Searching for "\n" will fail with error then. >> Sounds like an omission in org-element-context. At least, the parser >> could return :contents-begin and :contents-end. Then, you would also not >> need to re-implement the parser. > > Perhaps. However frankly I don=E2=80=99t think it would do that much to r= educe the > complexity, and what=E2=80=99s in this patch seems to work fairly nicely. I am mostly thinking in terms of https://list.orgmode.org/87tug8t8ql.fsf@gmail.com/T/#t Otherwise, your variant is fine for me. Best, Ihor