From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AAi8GAHqYWB5swAAgWs5BA (envelope-from ) for ; Mon, 29 Mar 2021 16:53:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6LquEgHqYWATQgAA1q6Kng (envelope-from ) for ; Mon, 29 Mar 2021 14:53:53 +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 A1C1E24F21 for ; Mon, 29 Mar 2021 16:53:52 +0200 (CEST) Received: from localhost ([::1]:48094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQtH5-0004ty-Ru for larch@yhetil.org; Mon, 29 Mar 2021 10:53:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45818) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQtGi-0004tq-5B for emacs-orgmode@gnu.org; Mon, 29 Mar 2021 10:53:28 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]:45829) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQtGf-0005NA-BW for emacs-orgmode@gnu.org; Mon, 29 Mar 2021 10:53:27 -0400 Received: by mail-pj1-x1031.google.com with SMTP id kr3-20020a17090b4903b02900c096fc01deso6033407pjb.4 for ; Mon, 29 Mar 2021 07:53:24 -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=1rT43t0y9tWq850WN/mqzb2fdXNIkMPKaq8YQnNP/bw=; b=G5zyQkOAqMK0OnSevm2snpmwqPMIfDhsoeQ0cHp5AcRUizSTb6B9zTUrbnN3gpA3Q7 39rAvZzVp1VRayI6JeDstPGhXhfD7ErF/y0Rm38x3su13t4NCGQfKB8cbxgnksMlouX1 NLeeguwMtdhr3X3EIjW06CROmSJeIAy5r8F2EkhwsVumJTpkRH0dfdpWv2etWL4ZIACA ytYX46d34wHPm4qMhujitDbBB+yBc9R3XZr2p5uech9czY9N7V/eeuuo9bg3VuIW8FH1 hNEzSER41Bfl+ARsz9XamKPhZNUIgDR2FX7ptfud3SXb2FWqi9joc1go0Y5ZcgBwX6m/ N98w== 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=1rT43t0y9tWq850WN/mqzb2fdXNIkMPKaq8YQnNP/bw=; b=UgkdYD3GbI3uaZY3OJ8XvFUQHkZS9j9zBaWZMFQI+cagOmxMF5NoXzqy8ma5dpDiwt 8/PD2+Aql2mm0+9hd24dFJl+jRPKUhw2D5MdaZq+tgXmOvAX7o0wUrD/XDXcP0LckAiN +xqppaoQH9Q7JbWNCJDIjW7x2kccJ97MVCsI8eALLS+3rg9YS3Zt8pWZhz/bpxW+JuWL DKz6sgCFoO1BS4hnj7Qi0ljOW0POCRHr3dFj18D8Xf7stfKQ0M37oSB9UNdP2PMfQuvE 7bQ4/ZT/7oaV3QG9LWFdaRPX0FOk5jVFHYw6W0QN6/2f+ny3Z0LQSRBG3c0/bkFDm/0l WENQ== X-Gm-Message-State: AOAM531fULZrFxOCmGfmomaZZ0xSQ2bmBfVR3MLh2vKRApxaWBeAlbkD MCmRsO2qhOA/WKyuPBJ+CD/MD3jv7r4= X-Google-Smtp-Source: ABdhPJy2K0RZuVjVI+TZRMzkffUY++jhUcRn1vSC+17rQmf4mpjbkTOP9PVtPcSfpUlApbxrMb8adA== X-Received: by 2002:a17:90a:f2d2:: with SMTP id gt18mr26872053pjb.210.1617029603818; Mon, 29 Mar 2021 07:53:23 -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 co20sm15627677pjb.32.2021.03.29.07.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 07:53:23 -0700 (PDT) References: <87a6r6avgg.fsf@gmail.com> <87o8f2kta7.fsf@gmail.com> <4ef07c13-482d-734c-aa17-479439493c68@posteo.eu> User-agent: mu4e 1.4.15; emacs 28.0.50 From: Timothy To: sebastien.miquel@posteo.eu Subject: Re: Why is there no inline-src syntax highlighting? In-reply-to: <4ef07c13-482d-734c-aa17-479439493c68@posteo.eu> Message-ID: <87lfa6ko4h.fsf@gmail.com> Date: Mon, 29 Mar 2021 22:53:19 +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::1031; envelope-from=tecosaur@gmail.com; helo=mail-pj1-x1031.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: emacs-orgmode@gnu.org 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=1617029632; 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=1rT43t0y9tWq850WN/mqzb2fdXNIkMPKaq8YQnNP/bw=; b=p2XyfL+oxoeoVJUAbmHRRzkB8rx9MRwsRzYYKBueH2QVODMrRk2xtbhqhZ6ij2/eifE/wV GnjZ8tJ0c2wdTrYmz1/ulLl83gAMeUS4+08mXATdrid+uLybbcgYo43PidLR1zLUS420Yd Oevpa4HnKPSsVUJFWcmNarOiZeM5jooOHwa3ANDk+xNsmk/CLwPVwxNNfoBb9mJ6Yd1xC/ 4eyPHIx59DdmNwmOMfL8+V38OTmJwZI0gmQXxecaivUsb6mvkUS/rVnjV0SLN6zzFSVHVg TJC2dcYpnj54UKziDDF/ZCHPS8BJZ2olubY6oa8GLhnwbZTqOefr7AXdp/e6oQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617029632; a=rsa-sha256; cv=none; b=Sl6EjhKTuz9WOmTM6EBjF8yuSuThBK3RyUwMJMGR6VJVCNjNBk55AWwtJlYLFoqGshIM65 W8MrbfBeBiuaYesyepLOyN9NjdjgsH2PCkj4QdSFhr08siyqnjiOnJdTKzUVjXHTEmltTS BUt81knQz3DORxcInzIK7tonz7kp0cOxrQbhrQddypRlQqTrmNgIjG2ZlOLOAQKqWdGHKa 9LZXgz9yiH+5ecMF7JWkDWtMBSe9BF7q8VlItGYbe+i/C64iyCjfffIhaVrlz33KndK9gK X7+wAQCZE4QkpkhO3X07qTmKvPMDALA81BF9Mq9UO4GZvRVqsoxoFwNzhFdGcA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=G5zyQkOA; 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: -2.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=G5zyQkOA; 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: A1C1E24F21 X-Spam-Score: -2.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: +Nan8AQYO+KF Thanks S=C3=A9bastien and Ihor :) I've combined a bit of both of your suggestions. See https://github.com/tecosaur/emacs-config/commit/1afd9eaca. S=C3=A9bastien Miquel writes: > I think there are these two issues with the code : > - When an inline src blocks has no matching result part, > `org-fontify-inline-src-blocks-1` returns nil. It should return t > instead, then it will be called again, to fontify the next block. TBH I'm not quite sure what should be done here the way I've structured things, but following Ihor's suggestion and changing `when' to `while' worked. I checked with highlight-refontification and it seems like this doesn't result in spurious fortification (I guess "limit" is set well). > - If an inline src block without results is followed by a src block > with results, your function skips over the second src block. > Perhaps you should assume that only whitespace separates a src > block and its results (this is already assumed for subsequent > evaluations of the block to replace the results). Nice catch, thanks! I think I've got this handled much better now :) If you have any further advice, please don't hesitate to share. -- Timothy.