hyperbole-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to run a elisp-function


From: Jean Louis
Subject: Re: how to run a elisp-function
Date: Tue, 11 May 2021 20:13:57 +0300
User-agent: Mutt/2.0.6 (2021-03-06)

* Robert Weiner <rswgnu@gmail.com> [2021-05-10 17:17]:
> 
> > On May 9, 2021, at 12:18 PM, Jean Louis <bugs@gnu.support> wrote:
> > 
> > Or maybe already exists the way to change the brackets?
> 
> Yes, see defil instead for more flexible ibtype definitions without
> having to know Elisp.  If you know Elisp, you can use the fully
> general defib, as there are now 3le els if ibtype def to accomodate
> different levels if users.

I cannot find variable or function named `3le', neither `els', and I
don't understand that last sentence.

I think with `defil' you got it straight into the heart!

(defil rcd-eval "⟦" "⟧" ".*" "{M-: \\& RET}")

But there is 

⟦1⟧ works, gives 1, but I would not, I would like it with spaces after and 
before delimiters:

(defil rcd-eval "⟦ " " ⟧" ".*" "{M-: \\& RET}") 

⟦ 1 ⟧ works, gives 1

⟦ 
1
⟧ it does not work, pitty

I would really prefer that it does work.

This is because I have snippets that are included into any kind
of text for pre-processing purposes:

RCD Template Interpolation System for Emacs
https://hyperscope.link/3/7/1/3/3/RCD-Template-Interpolation-System-for-Emacs.html

⟦ (anything) ⟧ or ⟦ anything ⟧ evaluates, and I can change the
delimiters easily. I use that RCD Template Interpolation extensively
in mass emails and Website Revision System. Now I am thinking, I could
change my function to look back and forward and do the same as `defil'
in this case.

To preview, I use the preview function, but your system would give me
the way to immediately preview those buttons which are on one line,
without getting new buffer for preview. 

My regular expression works over multiple lines, those on multiple
lines I would not be able to handle with `defil'.

(defil rcd-eval "⟦ " " ⟧" ".*" "{M-: \\& RET}") 

⟦ (emacs-version) ⟧ -- works well with the above function.

⟦ (emacs-version)⟧ -- eval-expression: Symbol’s value as variable is void: & [3 
times]

Maybe you wish to improve something there.

For me, personally, and accidentally, this is very usable.

For example I have this type of snippets in my templates:

⟦ (usd-gbp (- (gold-price-kg 2) (pct-minus (gold-price-kg 2) .30))) ⟧
  which evaluates to → "£ 25104.35" by using GNU Hyperbole

Which gives me preview of those snippets before the final evaluation.

I just think this can be useful for so many versatile applications.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]