emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Tim Cross <theophilusx@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>,
	Arthur Miller <arthur.miller@live.com>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Font lock in org+elisp confused with ?\[
Date: Fri, 2 Apr 2021 09:03:53 -0400	[thread overview]
Message-ID: <CAJ51ETpah5QXNBTZW8tU246r639RdKERJisV4Z4t1GiPH9b3MA@mail.gmail.com> (raw)
In-Reply-To: <CAC=50j_VTka35R76mUMN3pLQDi5e=FyE_5XXydc3HvnYE3UZQw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1400 bytes --]

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 <theophilusx@gmail.com> 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 <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
>>   (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
>
>

[-- Attachment #2: Type: text/html, Size: 2567 bytes --]

  reply	other threads:[~2021-04-02 13:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AM9PR09MB497740C52C6EE5A5680C9D84967B9@AM9PR09MB4977.eurprd09.prod.outlook.com>
2021-04-02  4:23 ` Font lock in org+elisp confused with ?\[ Tim Cross
2021-04-02 13:03   ` John Kitchin [this message]
2021-04-02 22:59     ` Tom Gillespie
2021-04-03 18:38     ` Arthur Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ51ETpah5QXNBTZW8tU246r639RdKERJisV4Z4t1GiPH9b3MA@mail.gmail.com \
    --to=jkitchin@andrew.cmu.edu \
    --cc=arthur.miller@live.com \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=theophilusx@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).