From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John Kitchin Newsgroups: gmane.emacs.orgmode,gmane.emacs.devel Subject: Re: Font lock in org+elisp confused with ?\[ Date: Fri, 2 Apr 2021 09:03:53 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000084b24d05befcfb56" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7830"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Org-mode , Arthur Miller , Emacs developers To: Tim Cross Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Fri Apr 02 15:04:54 2021 Return-path: Envelope-to: geo-emacs-orgmode@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lSJTp-0001ts-1S for geo-emacs-orgmode@m.gmane-mx.org; Fri, 02 Apr 2021 15:04:53 +0200 Original-Received: from localhost ([::1]:32876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSJTo-00048m-3K for geo-emacs-orgmode@m.gmane-mx.org; Fri, 02 Apr 2021 09:04:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSJTB-00048P-0Z; Fri, 02 Apr 2021 09:04:14 -0400 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:33597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lSJT8-0004fz-0O; Fri, 02 Apr 2021 09:04:11 -0400 Original-Received: by mail-wr1-x433.google.com with SMTP id o16so4721026wrn.0; Fri, 02 Apr 2021 06:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew-cmu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MYJgj3oKxifE2IneFru79u++S/BiJYC5RtcORymm9PI=; b=IK9373Z8xVzcUAiNY/SeQzRDyH4Q/LwbKGiMhl8ZKPC/jziGWqgXcgfxN+usw3OaHm RcmnBD3gfIRsllMzaP9jbcb2lNQdgY/cDatub+SmqoH/VFqgXeM//fOfoakvfhOWbgfS Uu5zFFxnnDkd4dV44Un53QowulUjSWOjIiiaiFwjevYub6eBjXBhZYBZA33tQoV430JY BoXiUjuDF4TmKejnfC2u0f1mFs7dkY/CWBGmTS6PfCraCDvvM+LeuSUdEtg6MgpU+d/h tnRzAai5Al2kmjboqwqqaekZdXo0N0YF2B25rAfM6GHt2msl/V5z/t9K3pXazJdnx01c vxAg== 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=MYJgj3oKxifE2IneFru79u++S/BiJYC5RtcORymm9PI=; b=YHiACHjPZpVPuhtoMVrP/lTnVo+QfMYbUVmARs4yoMmUsrjwqsplnV9+VdyvBjMrvA ZW0woD84BtriFVxi3MpiQXFljAsD4yX8cwO1hpdJN3TMiQ+KGCQk8FsYErI/+MXb1MkB Vty5RG1U3HfAmV31aXJU7Cf9CL6f9MnAqtHUsIDbPt3KLfAUr67MImgcb+Dw09W135qe uQ7t/OdUTwkVdyXuZj1a8i2tmdp/gUEWQpS0mm/ivKoCslUtX/OjZYplnnVTmdjWN0qA ZoCSvlZogXKSUR8d2lGtpcjgG1fO5GVmuDcPzIbN262fhefHfDw9ltXp9nMhrx86wKOP H9+g== X-Gm-Message-State: AOAM5336NJp+2aM9yLiwHtD07Uxrz9OcnXzkx6Gy+hhYhZTTS72MSHso 1tKVvbJKSxwKWem5RGIdFVEAt3GKum8Ww8Scxxk= X-Google-Smtp-Source: ABdhPJx0OX6Z4zqlpdj1zjUDXH51pJmGjEX9JlUFowbw1F+io8BAAu+Ni0mKq3m7im1TyknxdAMmsHW31g4xqZXfX8U= X-Received: by 2002:a5d:65d2:: with SMTP id e18mr14957712wrw.256.1617368644365; Fri, 02 Apr 2021 06:04:04 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=johnrkitchin@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-orgmode" Xref: news.gmane.io gmane.emacs.orgmode:135791 gmane.emacs.devel:267295 Archived-At: --00000000000084b24d05befcfb56 Content-Type: text/plain; charset="UTF-8" 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. John ----------------------------------- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Fri, Apr 2, 2021 at 12:24 AM Tim Cross wrote: > I'm forwarding this to the emacs-orgmode list as this is something org > maintainers probably need to see. > > On Thu, 1 Apr 2021 at 15:43, Arthur Miller wrote: > >> >> Is it me or is it a bug? >> >> When in org mode in an elisp block, this seems to confuse syntax >> checker: >> >> #+begin_src emacs-lisp >> (progn >> (if (= (following-char) ?\]) >> (forward-char -1)) >> ) >> #+end_src >> >> Identation seems to think it is one level extra, and it also shows as >> error. Same of course when testing for ?\[. >> >> It does evaluate correctly. Ordinary elisp buffer does not have problem >> with this, only when in code blocks in org-mode or elisp mode.I can send >> in some screenshot with errors if needed. >> >> >> > > -- > regards, > > Tim > > -- > Tim Cross > > --00000000000084b24d05befcfb56 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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-mi= smatch seems to work to fix it.

John

--------------------------------= ---
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Departm= ent of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA= 15213
412-268-7803


On Fri, Apr 2, = 2021 at 12:24 AM Tim Cross <the= ophilusx@gmail.com> wrote:
I'm forwarding this to the emacs-org= mode=C2=A0list as this is something org maintainers probably need to see.= =C2=A0

On Thu, 1 Apr 2021 at 15:43, Arthur Miller <arthur.miller@live.com> wrote:=

Is it me or is it a bug?

When in org mode in an elisp block, this seems to confuse syntax
checker:

#+begin_src emacs-lisp
(progn
=C2=A0 (if (=3D (following-char) ?\])
=C2=A0 =C2=A0 =C2=A0 (forward-char -1))
=C2=A0 )
#+end_src

Identation seems to think it is one level extra, and it also shows as
error. Same of course when testing for ?\[.

It does evaluate correctly. Ordinary elisp buffer does not have problem
with this, only when in code blocks in org-mode or elisp mode.I can send in some screenshot with errors if needed.




--
regards,

Tim

=
--
Tim Cross

--00000000000084b24d05befcfb56--