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: Robert Weiner
Subject: Re: how to run a elisp-function
Date: Tue, 11 May 2021 19:59:13 -0400


On Tue, May 11, 2021 at 1:16 PM Jean Louis <bugs@gnu.support> wrote:
* 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 must have been typing on my phone and it got jumbled.  The sentence should have been:

"If you know Elisp, you can use the fully general defib, as there are now 3 ways to define implicit button types to accommodate different levels of users:
     defal - define an action link type - simplest, no technical knowledge really necessary
     defil - must understand regular expressions but not Elisp, provides more flexible control over implicit button appearance and argument substitution
     defib - full Elisp flexibility for programmers.

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

Thanks.

(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

The first line always has to have something significant to identify contexts by, otherwise, the amount of text that would have to be searched becomes excessive since there are many different tests that do searches.

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'.

Hyperbole buttons can span multiple lines but the first part of the text within the delimiters must be on the first line togehter with the opening delimiter.

(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.

Sure, we should be able to fix that.

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.

Nice.

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

Great.  We do think this opens up new Hyperbole applications for non-professional programmers.

I look forward to hearing more about your uses as we roll out this version.

reply via email to

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