From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6EL8MimiZ2CtTQEAgWs5BA (envelope-from ) for ; Sat, 03 Apr 2021 01:00:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oIbtLCmiZ2CEAQAA1q6Kng (envelope-from ) for ; Fri, 02 Apr 2021 23:00:57 +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 773C38090 for ; Sat, 3 Apr 2021 01:00:57 +0200 (CEST) Received: from localhost ([::1]:37092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSSme-0002pQ-Eg for larch@yhetil.org; Fri, 02 Apr 2021 19:00:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSSlg-0002og-Kn; Fri, 02 Apr 2021 18:59:56 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:44550) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lSSlf-0002Yx-4Q; Fri, 02 Apr 2021 18:59:56 -0400 Received: by mail-wm1-x32f.google.com with SMTP id j4-20020a05600c4104b029010c62bc1e20so2951169wmi.3; Fri, 02 Apr 2021 15:59:53 -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; bh=9+5zrHWj2XwrNUtGKCKBPjTDlJmgE3NjqHL/YaLumW8=; b=fifY5soRmfk83amt1FWUt1mM4CgculYVcsYaRNut05DrJqq2m3nomrvJCUsbj+Yc8y GmS/HYA3hmi6MTndieKGLBV1wLQTa2hzdUfLTxsEGykzpHUnETacgC1cOx3j9UZy6siN K5gNDcxld28JOH0j3GS+SIhx+TiRh70Gg20zbA43mP2KHTZx+6fiOywLkMaYOsE6V5+O IrxDUGowyLiLzw2RyyGNXgQKPmh7ccMFMgtVwIIN99tQ8MjoH0VV3sIc0BbHhzqA5jvx FoYlS9u/qj6AfPO8m7GdEsYAK4MLKA90uB1GDvstm1YYGGlEo2dcQ6+s7HRH0zBIgP8N QuwQ== 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; bh=9+5zrHWj2XwrNUtGKCKBPjTDlJmgE3NjqHL/YaLumW8=; b=OLL/8kuZr5DkNmDAsIs99gUcYpvFt2x41wR0Spat6G0QhZPrwBZrHanvdwDxrPPpUB QBjLSswwKyqepwXmHBIY/ke98np7kxxVaPRfUi2kvEJzpm8dUQnyL+2+hYvIgMiCApDJ VrPg0M6m5srFEvfdFKG3+BcfDAcB10vjJehakgd7l7ltfxVUll+wZASwHw9+L8IoP0Wi R48uaPgJz3Xhbv3tbPTFy3/Z0YkYT55HUnQzFjIxKo0mCdPcElkqCegUoF2Cy8XbOhW+ R5RcNFhkzYvzUyoKEraic1lNq4ZVGWZelBAe8FMjuB7vbRk3NGx0KJfFRM1yQ+NIajDy h7Zg== X-Gm-Message-State: AOAM531vnA7vZyFuKuyaC3WtX6kvqCMOtRFLh2ikdb4/SOBe07fi+UyR ctbvUQRZFjWq2fmz/BFUmgDN3X3jd6e86diUMQw= X-Google-Smtp-Source: ABdhPJw9A6iUUcVwLiSv8Cc/pL+cHxYnOaMXshr0nggPhutcvSATFGgtB2UDWmQLq9klIVilyLVNPIIS+u4PELPootc= X-Received: by 2002:a05:600c:3514:: with SMTP id h20mr14837430wmq.45.1617404392458; Fri, 02 Apr 2021 15:59:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Tom Gillespie Date: Fri, 2 Apr 2021 15:59:41 -0700 Message-ID: Subject: Re: Font lock in org+elisp confused with ?\[ To: John Kitchin Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=tgbugs@gmail.com; helo=mail-wm1-x32f.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: Tim Cross , Org-mode , Arthur Miller , Emacs developers 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=1617404457; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9+5zrHWj2XwrNUtGKCKBPjTDlJmgE3NjqHL/YaLumW8=; b=iWAOp5VI5EQG2zLYxm1myE2AU5mGw4c194kOC+Y/i9X95gvQ5bdfnlyht4jTIJFWLrmCBs MvfKYWh3Oqjf3b7P+7x5wSlkNUi02BWMNZrW6mHiTMXpjyv6CoJL8S8qHVn242WO6SIUh8 qkZoIRmFUzC9EXW6tMP4+5foznSS9fyBdGQqkmmRMwaYScWJfYZB6jHsshmBhEt10P8h1m x2rEaTCaCMpu1pPT8+kRoDyyvPgJtlsD/eyojJvWn/pB3SwLDcWKhSUyQKCmRNEY76gFQ4 SC7ISdZ8YPogdq7km1vNn3p/oMMTX3Q+TBysh7UJx0YMRZcuyet3mMaqy2g1xg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617404457; a=rsa-sha256; cv=none; b=OQf4PQD211Qq1PgB0vfGSTRHVmS7UX21fTqZaM731dUXBctB/oL0OhB8U75h57OhsXkJ5e X4+dQXlMluQQz9UtURNShrryXJPL11A63fIoIhwqXPGUP6KbtpulSq3tVv7ec/i5Yd/2R7 LJIaECg83f/IA2S7/OZW4LZCFo3LJslonoJeEgBC8YIgtP5SMLyv2fiyz6rZW+iYHEwJrz XKFB1aj++iw48e+d85euKvQag/E9Ej7NTGfWq9IbDSWHV6heFf4vCSnJ67UGrDMa7BM/CA jLhnD2X2NSsq/P9xJ9rxuIMDOMoxXeKZjog1ta+JAZwtBov+pa1Na1B8ryLBIw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=fifY5soR; 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.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=fifY5soR; 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: 773C38090 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: mpyP93yDCLTX Reposting my reply to the emacs-devel thread here as well. The hack I mention that has performance issues was derived from John's solution for the <> issue (though the performance issues are all of my own creation). Best, Tom This is a known issue with org babel blocks. It is due to the fact that org babel translates the font locking for the language but not the syntax propertization. Another frequent cause is the bash case statement. The end result is that unmatched parens leak out from the babel blocks and wreak havoc elsewhere in the org file unless you balance out the parens e.g. in a comment. I have a hacked fix for this, but it has horrible performance, especially with line numbers enabled. I think that a proper solution would run arbitrary syntax propertization on subsets of a buffer without having to continually check where those subsets start or end.