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 +GWAK0NWn1/BOAAA0tVLHw (envelope-from ) for ; Mon, 02 Nov 2020 00:43:47 +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 IM1jJ0NWn18lYAAAB5/wlQ (envelope-from ) for ; Mon, 02 Nov 2020 00:43:47 +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 529EE9404D2 for ; Mon, 2 Nov 2020 00:43:47 +0000 (UTC) Received: from localhost ([::1]:40484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZNwo-0004ZS-Bf for larch@yhetil.org; Sun, 01 Nov 2020 19:43:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZNvH-0003tP-00 for emacs-orgmode@gnu.org; Sun, 01 Nov 2020 19:42:11 -0500 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]:36806) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZNvF-0005D9-7f for emacs-orgmode@gnu.org; Sun, 01 Nov 2020 19:42:10 -0500 Received: by mail-lj1-x229.google.com with SMTP id x6so13163162ljd.3 for ; Sun, 01 Nov 2020 16:42:08 -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=WNYDrBK8i++sX3NAcIDSa83uHXymvoz3VTVLnTeq5+I=; b=CcVpgduv5ieBM7ltgTlFtGC9mFLotzNsFtSlqvrzbuaNODqj6WzBnFpGT897QrN4hl jSXkJJDaF2gWvktmGAsDnHDZ1Q3p7i9q5oG+PJD+zPaLGuTDU9uKBMDovemHjWD/+/pP amfxGC5tCC0lLdozZdZqsiFUhxXjfLh+mT/+xBe/DVIhch3WaKQH0mwYESx4yInkcNnp K9itbzKCT/oxSLfl1qTgQiJ8Al9SBuzAQ01/tGLTwJ7Pw0X2Vc2QuPDr+icLAqTGZYtC biYR4Ho5z2PaSbwx6dG6IRTyyIIoTPkYtlhfh2lr1VoVPpXYnahuCMOh3nQqxTGA3JjV snMw== 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=WNYDrBK8i++sX3NAcIDSa83uHXymvoz3VTVLnTeq5+I=; b=DmvXRjPBOlRwULkByQwDnErCo27p/4H4rbuhJwvW0IE8D264ahSdyPAbfSxhD9EN8m hGAHUD7WjB9I/Le73mO4xZUqrYScpeDKA+j+i53FSSZrHE7QjczOE07VnV4Uoh8fPENN ao4ql0YhSoDHO0dvUb607waOCCQuU3Wf1z1653UWnhAKVH3fCfmE55w48sXFVNPsl06j yQJkK6u4/9dUjDQeSDnesjSCbVvvs4wxeXdFm0hQGJqB9u7KmrXvgOyHOWwZNpnUxIBU VhMLhY3Iy5IvfZbTAhlnhUQiBWRhR6gyuy3ZdVeAtjBtWdZsd5UyU2YuDk7R8YruUeFj E2ew== X-Gm-Message-State: AOAM530+0v8TbyyZkT1o9w567iLITVPaAI6CeHlqGp7PZn9MzfZSkUtm XXyLOnMUA9TvFx6PEIV1CkcMHvevvJOnyeHh5wo= X-Google-Smtp-Source: ABdhPJwnOvt/rf8DLlo6XtwoSYPxnljEnfLUjMXGOYxHxi8eKgwPaMrL5FIPMFXEO2P97VUdS5rhyqPA6JdBX1/jw68= X-Received: by 2002:a2e:9bd1:: with SMTP id w17mr5209131ljj.122.1604277727260; Sun, 01 Nov 2020 16:42:07 -0800 (PST) MIME-Version: 1.0 References: <87d00wq18o.fsf@gmail.com> In-Reply-To: From: Sebastian Gimeno Date: Mon, 2 Nov 2020 01:41:55 +0100 Message-ID: Subject: Re: Org mode fontification error in # in python and ipython source blocks To: Jack Kamm Content-Type: multipart/alternative; boundary="0000000000000df21305b3150434" Received-SPF: pass client-ip=2a00:1450:4864:20::229; envelope-from=changimeno@gmail.com; helo=mail-lj1-x229.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=CcVpgduv; 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: IHU2B/PqsMZQ --0000000000000df21305b3150434 Content-Type: text/plain; charset="UTF-8" Hi Jack, I have cloned the git master. Running without configuration ("make vanilla"), emacs correctly fontifies the source block and it also gets exported to HTML. It seems that it is a configuration problem. Sorry for not double checking first! Many thanks for your help! Cheers, Sebastian On Mon, Nov 2, 2020 at 12:43 AM Sebastian Gimeno wrote: > 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 >> >> --0000000000000df21305b3150434 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Jack,

I have cloned the g= it master. Running without configuration ("make vanilla"), emacs = correctly fontifies the source block and it also gets exported to HTML. It = seems that it is a configuration problem. Sorry for not double checking fir= st!

Many thanks for your help!
<= br>
Cheers,
Sebastian


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

--0000000000000df21305b3150434--