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 cHBxA1FIn19tWgAA0tVLHw (envelope-from ) for ; Sun, 01 Nov 2020 23:44:17 +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 OcviOlBIn1/jNgAA1q6Kng (envelope-from ) for ; Sun, 01 Nov 2020 23:44:16 +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 51D4C940105 for ; Sun, 1 Nov 2020 23:44:16 +0000 (UTC) Received: from localhost ([::1]:51268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZN1B-0001Yb-Q7 for larch@yhetil.org; Sun, 01 Nov 2020 18:44:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZN0q-0001Y6-6U for emacs-orgmode@gnu.org; Sun, 01 Nov 2020 18:43:52 -0500 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:36331) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZN0o-0007c5-Ez for emacs-orgmode@gnu.org; Sun, 01 Nov 2020 18:43:51 -0500 Received: by mail-lf1-x131.google.com with SMTP id h6so15116786lfj.3 for ; Sun, 01 Nov 2020 15:43:49 -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=2tFQNUAVPw6kuTaHiT4G51L57c3TuJZ37kMQNw14ZJY=; b=mRIqLuqFnO4jNQbNmdw2j5viSnE9EMF5D//ywj/FmQ5jW6TeW9QlaNYZgpGNIjADmp g5bZEDn03AOIVj1Inf8ijnRKMFRf5fjEwF4ZICY4ZnpPdYlv5D5LxFluiROcOS0Ten3J tIc+ShQzO4NgHssS3eT4pBM0vywLlAXAchM2QGDy1f8a7yahzGcEJrB8iN/9WJMGd8jJ VddieH2hZyWIWOD3+UZ3ke//5acXg8tAT9yr+EXDRcd18t2tsptR8/pGu93wBgSF17s1 RFaSHVGs5rNUQ3TTFf5LaPxyVjz7Que7dUJx5Vdwp+Cl51Njbth8kS5L/4hT5TQJssfg ANZA== 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=2tFQNUAVPw6kuTaHiT4G51L57c3TuJZ37kMQNw14ZJY=; b=JjkcwrDX7PqH6vrd+RVapRFc1CQ9svfFHzINgmjVTuWeKmnNcE5wZB21W0MtrAQnmT GzRgyoUl6hS6vCFwW888x+zx7xcqD3033Pw+psrYwt9d4v5bQ3NvKn4/0yb626cEtpag gDVtalmp2Sn+++FqFFQqQ8MeDWpnxk/pMkyrMoCutQAT9F2oPYm5zPFIk/7KgAkW3NCi sPOtUPodgCGP1Y/S6WoX4a9AeJKt3jQ4eKq52NywDNVePVy4Tfolml1cLHo0jpNzV7Rq WsgLmZ7c4DN1sMv5bc8hbZBv3MBOobHEIpmQljSdbqPrC/AiGXAIs7OBXuhQ90nYKJH9 3mag== X-Gm-Message-State: AOAM533UBx0RV/Uk04Nl3tRXS1JGWh+ZhRmsveftvTUKmKRg+PBhadu5 y6SbHt75ip7ummtY2orMpDQod6sGy+QF0JcA6NM= X-Google-Smtp-Source: ABdhPJzX2SYjEBauOebzwWO7mTuRHiz9VvYWIecQCbBKqiygRWrZtXcFptcuUB84ewqJWCJYnWGznOFUCn4oG457Pog= X-Received: by 2002:a19:810:: with SMTP id 16mr4741700lfi.460.1604274227684; Sun, 01 Nov 2020 15:43:47 -0800 (PST) MIME-Version: 1.0 References: <87d00wq18o.fsf@gmail.com> In-Reply-To: <87d00wq18o.fsf@gmail.com> From: Sebastian Gimeno Date: Mon, 2 Nov 2020 00:43:35 +0100 Message-ID: Subject: Re: Org mode fontification error in # in python and ipython source blocks To: Jack Kamm Content-Type: multipart/alternative; boundary="00000000000076aa4d05b314339f" Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=changimeno@gmail.com; helo=mail-lf1-x131.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: emacs-orgmode@gnu.org 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=mRIqLuqF; 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: fQ5FYMjZYYzS --00000000000076aa4d05b314339f Content-Type: text/plain; charset="UTF-8" Hi Jack, thanks for replying! The error does not happen using "emacs -q" (built-in package: org 9.3). I haven't tried with the git version yet. i will and let you know. Cheers, Sebastian On Sun, Nov 1, 2020 at 9:19 PM Jack Kamm wrote: > Hi Sebastian -- > > > 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: # > > I'm unable to reproduce this behavior on emacs 27.1 and git > master. Fontification and export work fine with this code block for me. > > Does the error still happen when you use emacs -q ? Or if you use git > master? > > Jack > > --00000000000076aa4d05b314339f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Jack,

thanks for replying= !

The error does not happen using "emacs= -q" (built-in package: org 9.3). I haven't tried with the git ver= sion yet. i will and let you know.

Cheers,
Sebastian

On Sun, Nov 1, 2020 at 9:19 PM Jack Kamm <jackkamm@gmail.com> wrote:
Hi Sebastian --

> I am having problems with the fontification of python and ipython sour= ce
> blocks when the code contains curly brackets "{}" (other cou= rse 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=3D1
> print("a=3D{}".format{a})
> #+END_SRC
>
> does not fontify correctly in either python or ipython source blocks.<= br> >
> As a consequence, when exporting the org file to HTML (C-c C-e h h), i= t
> fails with the following message:
>
> font-lock-fontify-keywords-region: Invalid function: #<subr progn&g= t;

I'm unable to reproduce this behavior on emacs 27.1 and git
master. Fontification and export work fine with this code block for me.

Does the error still happen when you use emacs -q ? Or if you use git
master?

Jack

--00000000000076aa4d05b314339f--