Re: Bug Re: Greater than, less than bug in emacs-lisp source block

2021-09-07 Thread John Kitchin
My current solution (which already differs from the last one I posted here...) is here: https://github.com/jkitchin/scimax/blob/master/scimax-org-src-blocks.el#L61 It is more selective, and only changes the syntax inside these src blocks: "jupyter-python" "python" "emacs-lisp" and does not chan

Re: Bug Re: Greater than, less than bug in emacs-lisp source block

2021-09-07 Thread Eric S Fraga
I believe this has been mentioned in passing in this thread but I'll repeat just in case: Unless you are working with xml or HTML in your org documents, and even then, having these two lines in your org configuration (e.g. org-mode-hook): (modify-syntax-entry ?< ".") (modify-syntax-entry ?

Re: Bug Re: Greater than, less than bug in emacs-lisp source block

2021-09-05 Thread Greg Minshall
hi, all. Arthur Miller wrote: > Well, in this case it is a tool deficiency, if you don't like gt, than use > use "greater-than", it can't be more clear intent? After all, this is a lisp, > and > '>' is just a symbol name, like any other. For the inclusion of code, yes, but > that is why we have

Re: Bug Re: Greater than, less than bug in emacs-lisp source block

2021-09-05 Thread Arthur Miller
Tim Cross writes: > Arthur Miller writes: > >> I haven't tested the updated version of JK's proposal, but looking at the >> source >> it seems to be a tad bit resource heavy. If it isn't a hassle for the OP to >> use >> aliases like lt, gt or similar, I would suggest that either using macros o

Re: Bug Re: Greater than, less than bug in emacs-lisp source block

2021-09-05 Thread Tim Cross
Arthur Miller writes: > I haven't tested the updated version of JK's proposal, but looking at the > source > it seems to be a tad bit resource heavy. If it isn't a hassle for the OP to > use > aliases like lt, gt or similar, I would suggest that either using macros or > simple defalias to ren

Re: Bug Re: Greater than, less than bug in emacs-lisp source block

2021-09-04 Thread Arthur Miller
Tim Cross writes: > John Kitchin writes: > >> My previous solution seems like it stopped working for some reason. Here is >> a new version that "should" only change syntax >> inside src-blocks, but not inside strings. >> >> It looks like this does not impact html blocks, or xml blocks. >> >> It

Re: Bug Re: Greater than, less than bug in emacs-lisp source block

2021-09-04 Thread Tim Cross
John Kitchin writes: > My previous solution seems like it stopped working for some reason. Here is a > new version that "should" only change syntax > inside src-blocks, but not inside strings. > > It looks like this does not impact html blocks, or xml blocks. > > It is probably possible to mak

Re: Bug Re: Greater than, less than bug in emacs-lisp source block

2021-09-03 Thread John Kitchin
My previous solution seems like it stopped working for some reason. Here is a new version that "should" only change syntax inside src-blocks, but not inside strings. It looks like this does not impact html blocks, or xml blocks. It is probably possible to make it mode specific if needed. (defun

Re: Bug Re: Greater than, less than bug in emacs-lisp source block

2021-09-03 Thread Tim Cross
I think what is happening here is that org is bumping up against fundamental design limitations of Emacs. In basic terms, much of Emacs' underlying design is based on an assumption that a file only has a single major mode. Org works hard to get around this limitation, but it comes with cost - usu

Re: Bug Re: Greater than, less than bug in emacs-lisp source block

2021-09-03 Thread John Kitchin
That is probably a matter of opinion. If you use angle brackets as delimiters, e.g. in html, xml in src-blocks, then the current syntax definition makes sense because you can use them to find open and closing brackets, navigate them, etc.. If you don't use those, it makes less sense, and maybe isn

Fwd: Greater than, less than bug in emacs-lisp source block

2021-09-03 Thread Charles Millar
Thank you, Arthur. Forwarded Message Subject: Re: Greater than, less than bug in emacs-lisp source block Date: Fri, 03 Sep 2021 00:36:23 +0200 From: Arthur Miller To: John Kitchin CC: Charles Millar , emacs-orgmode@gnu.org John Kitchin writes: I think this issue is

re: Bug Re: Greater than, less than bug in emacs-lisp source block

2021-09-03 Thread Charles Millar
Thank you, John. I will give it a try. However, is this a bug that should be fixed within org source code? Charlie Millar On 9/2/21 2:24 PM, John Kitchin wrote: I think this issue is described in https://emacs.stackexchange.com/questions/50216/org-mode-code-block-parentheses-mismatch. There

Re: Greater than, less than bug in emacs-lisp source block

2021-09-02 Thread Arthur Miller
John Kitchin writes: > I think this issue is described in > https://emacs.stackexchange.com/questions/50216/org-mode-code-block-parentheses-mismatch. > There are also some > solutions there. I wasn't able to get that to work in my Emacs. I did something simpler though, that seems to work for me

Re: Greater than, less than bug in emacs-lisp source block

2021-09-02 Thread John Kitchin
I think this issue is described in https://emacs.stackexchange.com/questions/50216/org-mode-code-block-parentheses-mismatch. There are also some solutions there. John --- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Car

Greater than, less than bug in emacs-lisp source block

2021-09-02 Thread Charles Millar
Set up: GNU Emacs 28.0.50 (build 344, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0) of 2020-12-31 Org mode version 9.4.6 (release_9.4.6-637-gd70f28 @ /usr/local/share/org-mode/lisp/) The following code will evaluate #+begin_src emacs-lisp (defun Foo () (if (= 2 4) bar)) #+e