hyperbole-users
[Top][All Lists]
Advanced

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

Re: [Hyperbole-users] Need more usage examples (Was: Subscription within


From: Jean Louis
Subject: Re: [Hyperbole-users] Need more usage examples (Was: Subscription within Hyperbole did not work, do I need to repeat sending bugs?)
Date: Fri, 30 Oct 2020 11:35:43 +0300
User-agent: Mutt/+ (1036f0e) (2020-10-18)

* Robert Weiner <rswgnu@gmail.com> [2020-10-30 07:45]:

> You are in luck.  We are in the process of adding a feature that
> lets you define your own button types just by using regular
> expressions, essentially no other programming knowledge required.
> Soon you will hear about it.  We could support your Hyperscope with it
> too.

I hope that multiple such buttons can be defined. 

As Hyperscope takes buffers from the database I still have to find way
how to provide buttons on the fly without ./.hypb

> If you just want to programmatically insert buttons of existing
> button types, I would study the “hbut.el” and “hbdata.el”
> files in the main Hyperbole package directory, “${hyperb:dir}”;
> press the action key on any of these quoted paths. There are functions
> there to create and modify all categories of buttons and their
> meta-data with a fair bit of documentation.

Small remark: Do you see above quotes? “hbut.el” so the action key
does not work on such.

I am studying and what I figure out, maybe I am wrong, Hyperbole scans
for .hypb file and takes list of button labels. So it does not take
into memory button action, only label. When label is selected then it
goes for the action.

> > Somewhere after entering the directory or upon opening of a file you
> > must have setup some hook, maybe hproperty:but-create or other
> > hook. Help me. Then this hook is looking into .hypb and assigning
> > buttons.
> 
> hbut:act activates a button, looking up its metadata, if any, in
> .hypb and parsing it into the hbut:current in-memory representation
> of a button.  Hbdata.el handles all the internal button mechanics.

Does that mean that by entering file Hyperbole is scanning the file,
takes labels as I said above, and then if button is activated, then
looks again in the file to find the action for the label. If that is
so, why not take both labels and actions from ./.hypb and then have it
in memory ready without accessing two times the file ./.hypb

> > Is .hypb then converted into some Lisp structure of buttons that
> > buffer is using?
> > 
> > If that is so, then I just need to find the name of list structure and
> > I can already create buttons on the fly. Am I right?
> 
> Yes.  Remember to create implicit buttons you just spit out text
> from your program in a certain Textual pattern and that is it.

That I know. No problem for implicit buttons.

I am looking for explicit button solution.

Is there a way to access some variable from within let us say HYPB so
that I get defined labels and actions?

Or is upon the action looked again into the ./.hypb file?

If latter then I would not have possibility to create data from .hypb
on the fly in memory without having .hypb file

-- 
Jean Louis



reply via email to

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