Here's some emacs-lisp code in a babel block:
#+begin_src emacs-lisp
(defun factor (number)
(labels
((*factor (divisor number)
(if (> (* divisor divisor) number)
(list number)
(if (= (mod number divisor) 0)
(cons divisor (*factor divisor (/ number divisor)))
(*factor (+ divisor 1) number)))))
(*factor 2 number)))
#+end_src
So in the org buffer I get a parentheses matching problem, i.e., that very last ) at the bottom is flagged as one too many. It flashes red and check-parens
flags it as well. Trouble is, this is not an error, i.e., the same code in scratch is perfectly paren-matched, likewise when I bring it up in the Org Source C-c '
window. BTW, this code compiles and runs giving good output. Any ideas what org-mode is doing here? I've got (show-paren-mode 1)
. When I turn it off, obviously, no problem because no highlighting matching parens.
.org
suffix. I'm on Emacs 26.2 and Org mode version 9.2.3 (9.2.3-11-g42abf5-elpaplus @ /.../.emacs.d/elpa/org-plus-contrib-20190429/) – 147pm Apr 29 '19 at 19:17check-parens
and get the problem. Go intoC-c '
problem disappears. – 147pm Apr 29 '19 at 20:06