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 <arthur.mil...@live.com>
To: John Kitchin <jkitc...@andrew.cmu.edu>
CC: Charles Millar <mill...@verizon.net>, emacs-orgmode@gnu.org <emacs-orgmode@gnu.org>

John Kitchin <jkitc...@andrew.cmu.edu> 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:

#+begin_src emacs-lisp
(defmacro gt (n1 n2)
  `(> ,n1 ,n2))

(defmacro gte (n1 n2)
  `(>= ,n1 ,n2))

(defmacro lt (n1 n2)
  `(< ,n1 ,n2))

(defmacro lte (n1 n2)
  `(<= ,n1 ,n2))

;; example usage

(dolist (s templist)
 (while (lt (length s) l)
 (setq s (concat s " ")))
 (push (concat "[ " s " ]") kwdlist))

#+end_src

Reply via email to