From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EFG1NMb9nl9fIwAA0tVLHw (envelope-from ) for ; Sun, 01 Nov 2020 18:26:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2BdiMMb9nl9AXAAAB5/wlQ (envelope-from ) for ; Sun, 01 Nov 2020 18:26:14 +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 66D069403A6 for ; Sun, 1 Nov 2020 18:26:14 +0000 (UTC) Received: from localhost ([::1]:56930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZI3Q-0007nZ-UI for larch@yhetil.org; Sun, 01 Nov 2020 13:26:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYgD7-0000yf-WA for emacs-orgmode@gnu.org; Fri, 30 Oct 2020 22:01:42 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:39820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYgD5-00059Q-Qq for emacs-orgmode@gnu.org; Fri, 30 Oct 2020 22:01:41 -0400 Received: by mail-lj1-x231.google.com with SMTP id m16so8860694ljo.6 for ; Fri, 30 Oct 2020 19:01:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=5MmBRkNRKVpKMNJwCS/I9affLwR/V/OuMla2Kn53q5c=; b=O//yvquMnvlNapHECH4DV0DeqB5xBp5YLh4P+ezcyvjZ/INltkV0fG8H5WqtYYN0D6 7BQHiJfHYsxm2fzfGA6qqbHItaiKRKjbmPBlSFl7CWG+7TIqzblooHf0laVY/j03l4Cu MfjLwBzurXlaeAXphCdK8q/U40JXHNTpWvpF/IxlKL5uthJg3WWMgOxY3aT+abJ/wl1F 5h0tKGMXj1Lb7SX2L0F1pJFRa+25F/j9vhJm5DqlVWAhd0Ei4sqjUOKMGWlqOUt/RaWB x6/1Dk9FQFo5dRBOBz0jrcY3j1USrgp3/JSGUke88Lf6UvcRse0WBzYdIxnKu45fel96 kQcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5MmBRkNRKVpKMNJwCS/I9affLwR/V/OuMla2Kn53q5c=; b=XSC2dkAvdX7rDPW8qrCPLEUrdX5wotJZCTL2QHD4R0ln42rJ8aUtF3eH7vPUaiJH+v 1egZ3SK+5qVRBhpMIgUtdaHh3ek8WluiXR+24VJYEm5uj4ddiM06FhjS/7XR3WzVdCC2 P03Ib52NuE2igjZLLnjJXFfgJnL29S7R0N5UJIvdPEtFDC0gSncjgv/hq+ZPO3fqRW2k MCpHSIGFzNEccQ2EPOREv/Eq/bPitGT5WwVjBT2+RM7Eaf4GYYRpIhx/fnmxMmjoP9uw 5VwMkChkwZfCLrcJ6ci+VDWC8N62RNrN09Fvibto7OPD9iSX+odBu8TFCCDl0lb+Uv/q 9AJg== X-Gm-Message-State: AOAM531GJjmix8J4MINAeevDqayTCWBgq9jO9mAH18yIk9Zuo+bYeIUr XAZLYwBQz/D81YP/92RUIlhoj3QW2EyP7SoQW0n0dnjx2bg= X-Google-Smtp-Source: ABdhPJyEnYepC4WDc4g8wxwophoXtyKOCSYwfzI7aG88itHlI8UqF53KprkbbpbMS/pKgCk5ILpUwZGd2yYzCPa0+FQ= X-Received: by 2002:a2e:87d2:: with SMTP id v18mr2090899ljj.371.1604109695134; Fri, 30 Oct 2020 19:01:35 -0700 (PDT) MIME-Version: 1.0 From: Sebastian Gimeno Date: Sat, 31 Oct 2020 03:01:24 +0100 Message-ID: Subject: Org mode fontification error in # in python and ipython source blocks To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="0000000000008f2e0905b2ede410" Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=changimeno@gmail.com; helo=mail-lj1-x231.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, HTML_MESSAGE=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-Mailman-Approved-At: Sun, 01 Nov 2020 13:25:30 -0500 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=O//yvquM; 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-Spam-Score: -0.71 X-TUID: V254qWvpWMsG --0000000000008f2e0905b2ede410 Content-Type: text/plain; charset="UTF-8" Hi, I am using emacs 27.1 and org-plus-contrib 20201026. I am having problems with the fontification of python and ipython source blocks when the code contains curly brackets "{}" (other course blocks are ok). For instance, the following snippet #+BEGIN_SRC python :results drawer import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.show() a=1 print("a={}".format{a}) #+END_SRC does not fontify correctly in either python or ipython source blocks. As a consequence, when exporting the org file to HTML (C-c C-e h h), it fails with the following message: font-lock-fontify-keywords-region: Invalid function: # If changing the code snippet to: #+BEGIN_SRC python :results drawer import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.show() a=1 print("a=%s" % a) #+END_SRC the block fontifies and the file is exported to HTML correctly. Can you reproduce this behaviour? Many thanks in advance! --0000000000008f2e0905b2ede410 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I am using emacs 27= .1 and=20 org-plus-contrib 20201026.

I am having problems with the fontification o= f python and ipython source blocks when the code = contains curly brackets "{}" (other course blocks are ok). For in= stance, the following snippet
#+BEGIN_SRC python :results drawer
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.show()
a=3D1
print("a=3D{}".format{a})
#+END_SRC

does not fontify correctly in either python or ipytho= n source blocks.

As a consequence, when exporting the org file to HTML (C-c C-e h h), it = fails with the following message:

font-lock-fontify-keywords-region: Invalid function: #<subr p=
rogn>

If changing the code snippet to:

#+BEGIN_SRC python :results drawer
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.show()
a=3D1
print("a=3D%s" % a)
#+END_SRC

the block fontifies and the file is exported to HTML correctly.

Can you reproduce this behaviour?

Many thanks in advance!

--0000000000008f2e0905b2ede410--