From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id G/lbHL7voF8tTgAA0tVLHw (envelope-from ) for ; Tue, 03 Nov 2020 05:50:54 +0000 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 INsUGL7voF9yBgAA1q6Kng (envelope-from ) for ; Tue, 03 Nov 2020 05:50:54 +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 8F56D940237 for ; Tue, 3 Nov 2020 05:50:53 +0000 (UTC) Received: from localhost ([::1]:60716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZpDX-0003Bq-3j for larch@yhetil.org; Tue, 03 Nov 2020 00:50:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZpD4-0003AY-3w for emacs-orgmode@gnu.org; Tue, 03 Nov 2020 00:50:22 -0500 Received: from mail-vs1-xe35.google.com ([2607:f8b0:4864:20::e35]:42557) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZpD1-0005ba-J4 for emacs-orgmode@gnu.org; Tue, 03 Nov 2020 00:50:21 -0500 Received: by mail-vs1-xe35.google.com with SMTP id w25so8822485vsk.9 for ; Mon, 02 Nov 2020 21:50:16 -0800 (PST) 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=+50IXOC8ulWdXSNjIbPRCQoi+uohiPjj9ok8Y5UPnIs=; b=fB6/4daULVr7tZvhFZfvdQwFTW87l0APl7y9jliTFKOMl7qKyN0LGdwUqyuVltwfn+ JApgLD0zBCIxkCNaQD9vUejNy1Gn3/SIlJSAxnTfgsfJ+Fc4mduJ0Akf0Z6SUh+Lw/YL 8eeq4Z37UP8dLJllQ+1fYTjXUvAu1TbORnUFbYq3BXVzXSvHK4AtcGLgN2roioWYiAV6 2Z6R8eIru5DuH0llVpr5DN5/I5pYaeJ2LjjlwqtJVT3iUsT2T3HPKzZMN8LKyUUiKgw1 MTwLKVUt8mOF4bWJMtZD0NPMH9Hy+SsMBSuX6K8VXLbpgfTwaraCgC3Fo3tITwdRseWe 9txA== 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=+50IXOC8ulWdXSNjIbPRCQoi+uohiPjj9ok8Y5UPnIs=; b=WRZg9xk2nKxRbZmEzBKRMeLpWJ20kJWB2J5JVeq3YOD+dVQyiTjTSE0j/g0ye4uvOA 6U1pavp3SmabkZr/+ifWfzx+a3E4m1jbPKse5Sw9BM5vE9725WASmqFjFhpWBLQJxM6Z rDrBQkt3Zkie4uQBhHQewPdtarRwSZMd3DLLpNvplol0cO3hVGNPF4pKsnmdsL2lwc9x obgfYpdrft3yLgy7nQJEuMaN/aXKRp8ELXtxTtOY5Mil1uFKyiyR36ZlGwBlXYHm81HN wsO0mpy3jyEfVkRZXKDXZaOR0IryOsMalvYMnbgTDpEQIiO2XDo9UOltBj7rdbjfJRft tuug== X-Gm-Message-State: AOAM531le7TX5LeZF3nRzhvd+gQxxAdX/VJfjhTqxgsEWdJjiBJkKPeT B0VZAYL2AdZf23U/X+kCWIq0HdJ0ZpyvYYWBaA== X-Google-Smtp-Source: ABdhPJyy/NqHdG+gqei8VchoqWA3gKu1WgU+JM5eV+a+e+hfiwBrrLe2JDVxkYT4iqz+H8KPdX2aBjG99JVu3pcUI7Q= X-Received: by 2002:a67:f3d1:: with SMTP id j17mr10937435vsn.53.1604382616203; Mon, 02 Nov 2020 21:50:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: stardiviner Date: Tue, 3 Nov 2020 13:49:49 +0800 Message-ID: Subject: Re: Org mode fontification error in # in python and ipython source blocks To: Sebastian Gimeno Content-Type: multipart/alternative; boundary="000000000000ec364505b32d6fc6" Received-SPF: pass client-ip=2607:f8b0:4864:20::e35; envelope-from=numbchild@gmail.com; helo=mail-vs1-xe35.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-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: Org-mode 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=fB6/4daU; 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: -1.71 X-TUID: okfGQzm0Okj3 --000000000000ec364505b32d6fc6 Content-Type: text/plain; charset="UTF-8" I have same problem sometimes in different babel languages. I would like to know what caused this problem too. Can you send me a message after you solved problem? Thanks in advance. :) smile [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ On Mon, Nov 2, 2020 at 2:26 AM Sebastian Gimeno wrote: > 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! > --000000000000ec364505b32d6fc6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have same problem sometimes in different babel languages= .
I would like to know what caused this problem too.
Can you se= nd me a message after you solved problem? Thanks in advance. :) smile

= [stardiviner]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &= lt;Hack this world!>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GPG key ID: 47C32433<= br>IRC(freeenode): stardiviner =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Tw= itter:=C2=A0 @numbchild
Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36=C2= =A0 CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


On Mon, Nov 2, 2020 at 2:26 AM Sebastian Gimeno <changimeno@gmail.com> wrote:
=
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!

--000000000000ec364505b32d6fc6--