From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IK/rJk62aGCtlgAAgWs5BA (envelope-from ) for ; Sat, 03 Apr 2021 20:39:10 +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 oLkAHk62aGCVXgAAbx9fmQ (envelope-from ) for ; Sat, 03 Apr 2021 18:39:10 +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 BB3B9247C0 for ; Sat, 3 Apr 2021 20:39:09 +0200 (CEST) Received: from localhost ([::1]:53652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSlAq-0000uX-Ur for larch@yhetil.org; Sat, 03 Apr 2021 14:39:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSlAL-0000tp-Hn; Sat, 03 Apr 2021 14:38:39 -0400 Received: from mail-oln040092074075.outbound.protection.outlook.com ([40.92.74.75]:63297 helo=EUR04-DB3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSlAJ-0005Xu-53; Sat, 03 Apr 2021 14:38:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eSYkgwDK2ulV++oNQ5V0NVrMTPt3wM2fMtevXAQGmBR4cEMbK8lZUeaBlzhVVvIjk1jhGo2ZibmmtD9L+BVdh5llMiwU5qMhhiBR3b+mLCsrPLSaA2b2ywOMO7Co72mvuq3DM2l0OQ5DeRvjL4JFVaxw0o3w4dzYibAJt86ZPYegRePzrq0ecUDbigZCc2C7/TnDcCqu7fdCSOxL2EB9tZ5BLegC09h5Y0f1GDL3HSpFXVZ4TGlA3PMHA2zhVQobgoqTxOAme3q6/JtZTzfLw67n7c6lLpOZEebI80nK6MpxIxGsqmTmOQI2lQwLttH9Pv6DDINCsbFgwPCrBYdSIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=os8yfA88wVZTAd0aT883Eeg4HtVflkjYVB+4xwBAogo=; b=LpE9f7jTXXUgiE/LfndQi1PE/OCo6df3fmE0KLhlY2XPayzjEP3kepgCUwrea0wR9VBsOV2EPsDQbmO89Gqu7Nycw8L4J7ohulbrDsBbKlWt2bDV2uG/g2xIVL9nODaQA4yETcUKN8MArI0h14b03f2l6yFMOlAHxXeTVB5a4dUt1u+S1tZZQ/u8HeUrNHAnSsPx355x+qvkmlWTA/UDfyjMyxGgokBJS1QQMjcFvrpAJPm0RyTaDrj7wZWzdIYjoES3EpmvbeIpZr03qIPRTtmAb0vj//Ci7KfBhYmLw+9UDABs/tF1Gp/7ZSH1WeGGRf5c9aACDqbynWA9gl2jwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=os8yfA88wVZTAd0aT883Eeg4HtVflkjYVB+4xwBAogo=; b=cP/pwbKruDM52moW1e8pOY/KpBm3vJ6gxxmz4gkllE9hBNKxj44I9vNwa4kOoSrEItIcDgTsuCTRQO3Xn/2EiXbM7Oh5djm++AtTTRlwVEPGQQOp7Q4gQAT1kQVDLGx+RDPQB5KDRdMOFtIMCiB08NS8uGgfJF1ft7gaddEn8BiNJ5ymCq/M5EiiFjy6yuFxanFptKiPlp2LOP1ah+5qFibvM2DjtbqSsUynppaqHhPWOYOV4dgvr1FW2+r/1Bavt37MOM/eTNKmsMCCL7IVNyZUVU6aJB4LMp8iioDUkuhS7wW80FEAcEigevGlylrNFkI2AwhryvaJb8WWDq2fZw== Received: from HE1EUR04FT015.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::49) by HE1EUR04HT017.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.28; Sat, 3 Apr 2021 18:38:32 +0000 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:7e0d::46) by HE1EUR04FT015.mail.protection.outlook.com (2a01:111:e400:7e0d::74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.28 via Frontend Transport; Sat, 3 Apr 2021 18:38:32 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:58D65616048A1696B6CC869648C729692267007695E07D38266921051E2AE34C; UpperCasedChecksum:1B515375FD41C1F5BE29B5831384F60DEFAA6FD1304E2FEEC71625C2451278E2; SizeAsReceived:7716; Count:46 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b%6]) with mapi id 15.20.3999.032; Sat, 3 Apr 2021 18:38:32 +0000 From: Arthur Miller To: John Kitchin Subject: Re: Font lock in org+elisp confused with ?\[ References: Date: Sat, 03 Apr 2021 20:38:28 +0200 In-Reply-To: (John Kitchin's message of "Fri, 2 Apr 2021 09:03:53 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt) Content-Type: text/plain X-TMN: [m/vtpfq0ut84ZWMsEWtJNmodrD/RMwPI] X-ClientProxiedBy: AS8PR04CA0085.eurprd04.prod.outlook.com (2603:10a6:20b:313::30) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <82sg47tdqz.fsf@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from HP-Laptop.homepc (81.232.177.30) by AS8PR04CA0085.eurprd04.prod.outlook.com (2603:10a6:20b:313::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.26 via Frontend Transport; Sat, 3 Apr 2021 18:38:29 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 8a67f028-6dd4-4561-e9ee-08d8f6cfae45 X-MS-TrafficTypeDiagnostic: HE1EUR04HT017: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XnGMfqpjUKcfFmnyu1d4Zm+RDcvfblcyILU6ivjMFAo6Uw8f948v9s3dft9v3Ap5Lw5z8XeBSlaWVtZMLIjvrUygKBKARDCd7vGMs2kF/g5Y1W0EAnHqLXPWjH32muhUFXdoy2YNUpjLeWA4aLWw1gv74gwAj2A7Q/p48OscSiRLL8UaIUhfMnI0hAuiDfy8ntpO9qYYKYNClFAgrDvc98sceMFt8Z3nCb+ZLwqTr2UwR8D53zKfT/zHYAJA/owr1t2Lm6dsOis4TCp9lM85LCC0vh6TjAaIp/4iIN26Nr46j6ryZthAW0Z0tXsii5OxvZGz/k9kl+by5bOQJXVm04LL1mFzjKG3+P3e+7HaHAFaeUHtgHDj23wZAimBQL0r15HK7rAm+XkQNESneiXyFeJUW4K1byJ+ZhckdIHVLHQWvfIRvevBeZn9bEiM52ZH X-MS-Exchange-AntiSpam-MessageData: XVWMR17yyI8vpozlmD/fe50O5Y0gzKmGE5pAnLG+YP9eRWBFGwxQmf1kwR7yKAoIVao6SCy4Msb/AaR8j2eL3JcyYKPeujjnB0M1ouAh51JXZAvIf0UvkTBCKHhy5zbG6Ru5s8ihCppzNCXGIZmxtg== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a67f028-6dd4-4561-e9ee-08d8f6cfae45 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2021 18:38:31.9637 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT015.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT017 Received-SPF: pass client-ip=40.92.74.75; envelope-from=arthur.miller@live.com; helo=EUR04-DB3-obe.outbound.protection.outlook.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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 , Emacs developers Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617475150; 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=os8yfA88wVZTAd0aT883Eeg4HtVflkjYVB+4xwBAogo=; b=LOQK/trmcvvmHIaVoE1X3FPfx0XzXbdaHa1BMIvFWW8gTgkd94CcwHaGQy0/1aKW4ioLFf SRwN+DhXONWxmlmaiPTCqYCEZWLlMc6CMD4/Uz+7VLk3A7DCLJuxhCuEhCxBxPCaK3TiWK Evzd9EQ/mBpOSVuDvrJnpF2w9+YjjaT79ihmomh4yhC5jkF0LC+dulqipy8X6bjF23cZ8k QXerXQEAViD267ZLvUEieBjtAWdaY4qXwnVBh9j7qQg9mAoFkz6wnnF6KC3h9uLk8COxOO /CphWMTFJuqzE9ygDgJSCeCz9qy62LrXKPZO+sE9HfP7+rG95v/ggEmsnalBUg== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1617475150; a=rsa-sha256; cv=pass; b=TCsi9b8kKjVZSCRCT5A/7LJEAi9/7O3j7q8bykVxqWWY74OStjnzWRfOF6XKnnrklVb4fi nyiFdo1AWvmisn1W1NrDLYPteDkEXX78DOMynPXuPPBi/iz3Ozej4DU3NCjYwZZkaCyKee 8hZeHQ//Et5FEnaaU2ySGWiemLpuhODyJf9+2+pCV7BLadX/VrK/0mroy1gQc5+mL/6lln i0aHAOcHfa4Wy++RgchnWmgMJg7Zu+1Mb4SGSFuHj2BVwYOjk9i+j/yANnTNm/1gOtDZ3C P4YUmk6qJcLkN1ayreKcBhXdpLxGiWMMto5RPRQhPULG+5rIFzuSkZsUsUhFsQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b="cP/pwbKr"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); 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: -4.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b="cP/pwbKr"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=live.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: BB3B9247C0 X-Spam-Score: -4.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: a5ie2h8Fr+l2 John Kitchin writes: > This is related to the issues with <> in src blocks. [ and ] have open and close syntactical meanings like < and > do in org files. A similar solution as found in > https://emacs.stackexchange.com/questions/50216/org-mode-code-block-parentheses-mismatch seems to work to fix it. Indeed, the code from SX works, I took the simpler version and converted it to work with square brackets: #+begin_src emacs-lisp (defun org-mode-sqbr-syntax-fix (start end) (when (eq major-mode 'org-mode) (save-excursion (goto-char start) (while (re-search-forward "[]\\[]" end t) (when (get-text-property (point) 'src-block) ;; This is a ?[ or ?] in an org-src block (put-text-property (point) (1- (point)) 'syntax-table (string-to-syntax "_"))))))) (defun org-setup-sqbr-syntax-fix () "Setup for characters ?[ and ?] in source code blocks. Add this function to `org-mode-hook'." (setq syntax-propertize-function 'org-mode-sqbr-syntax-fix) (syntax-propertize (point-max))) (add-hook 'org-mode-hook 'org-setup-sqbr-syntax-fix) #+end_src I have confirmed that code runs when I load my org file, but there seems to be something else than that callback involed, later on, evaluating and changing those properties back. I still see same error in the babel-block. However when I run fix explicitly on that code block (I converted it to interactive "r" for test), then syntax is fine. So it seems there is some other callback involved. Sorry little bit late answer, I thought I sent this a day ago or so, but apparently I didn't. Thanks for the help.