help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: [External] : Any packages using ThingAtPointPlus for activation?


From: Jean Louis
Subject: Re: [External] : Any packages using ThingAtPointPlus for activation?
Date: Tue, 3 Jan 2023 23:23:45 +0300
User-agent: Mutt/2.2.9+54 (af2080d) (2022-11-21)

* Drew Adams <drew.adams@oracle.com> [2023-01-03 22:55]:
> > > > (defun hyperscope-action-button (&optional prefix)
> > > >   (interactive "p")
> > > >   (cond ((thing-at-point 'uuid) (rcd-db-uuid-action (thing-at-point
> > > > 'uuid)))
> > >
> > > I suggest you don't invoke `thing-at-point' multiple
> > > times needlessly.  Use `let', to do the work only once.
> > 
> > I would rather like to have universal thing at point that would
> > identify all possible elements at once and give me list of it.
> 
> (That seems unrelated to the text you quoted.)

Seem to be. Though Eduardo created concept function that finds the
thing at point among many. When such function would exist and be
polished, then using `let' also becomes easier. You referred to let
inside of `cond' but me, I would let using `let' to get the preferred
thing-at-point before the `cond'. That could be possible when
thing-at-point would be recognized by some priority by some function.

> I don't see the point of that, but that doesn't
> mean it has no point.  Why would you want to
> spend time gathering all (of some set, presumably)
> the possible things at point?

It is because you did not meet GNU Hyperbole,
https://www.gnu.org/s/hyperbole, The Everyday Hypertextual Information
Manager, and tried M-RET on various things.

Even while writing this I have used M-RET to jump quickly to word
definition, and URL, and what else. It shortens my work.

The point of gathering things at point, those whihc may be usable, is
to shorten work, depending on what user wish and want.

For example in your paragraph below, I know nothing about
`run-hook-with-args-until-success' but I can press M-RET on it which
is for me faster than figuring out if it is function or variable. By
using quicker jump, I go straight to source or description and
understand about it better. 

> I suppose I can imagine your wanting to try to get THING1 first, and
> if there is none, then try to get THING2, etc. That's something else
> again.  You could easily write code that does that, given a list of
> THINGS.  Cf. `run-hook-with-args-until-success'.

That is not just about things which are defined, there are different
meanings and different actions depending of the context, and when all
get gathered into one key, then using text becomes easier. If it is
URL, go and jump for it, but if I do prefix, maybe I want URL
downloaded. That is all handy as it shortens work. What if it looks as
file like "/tmp/my-file.txt"? Why not visit the file if I clicked on
it. What if it is PDF, and wish to open it with external viewer? And
PDF is on remote host? Something like https://www.example.com/my.pdf
would then need only M-RET (referring to GNU Hyperbole concept) for
the my.pdf to be downloaded and opened in external viewer, or with
prefix internal Docview, or with different prefix to be printed. 

It is object relationship recognition and jump from and to each other.

Imagine screen or temporary buffer with profile of a person:

UUID 8b592aaaaa71-b8fc-4f45-8f7f-69ef0528ba17

Joe Doe

Kawasaki Road,
Wakimaki, 12345

Phone (mobile): +12345678901
E-mail: wakimaki@example.com

I would also need to implement automatic buttons, with `buttonize' or
similar function so that those preferred things get marked, or
underlined or become visible hyperlinks. 

In fact I would like doing it only temporarily, while a key is
held. Something like holding `C-backspace' and while holding it to see
the hyperlinks, and when releasing it, to remove visible hyperlinks.

Then M-RET on UUID goes to the full profile of a person, and then:

- with prefix C-1 M-RET, go to listing of cash accounts for which
  person is responsible, we talk money;

- with different prefix, see his balances and outstanding demands;

- with different prefix, see his pictures;

- with different prefix, see his ID documents

- with different prefix, go into communication screen, to communicate
  with that person, initiate call, SMS, XMPP message, e-mail, receive
  call and make note, etc.

- on mobile phone, ask if to call, or send SMS by using Twilio;

- on e-mail, compose e-mail

- on XMPP, compose chat message

And so on.

The point is that single key, any key, or on this case Hyperbole's
well known M-RET becomes universal hyperlinking tool.

Then it is very easy to teach staff members:

- File receipt for accounting by using prefix C-1 (in Dired) -- and
  here they will already know it is M-RET key to be used with that
  prefix.

- See accounting for person with prefix C-2

- Visit communication center for that person with prefix C-3

It is much shorter to teach people, as once they know M-RET (or other
key) then many things get connected together all around one key, with
slight differences.

Better so, rather than teaching them how to invoke M-x functions where
each function has different name and are easier to forget.

> > How do I recognize if function is defined?
> 
> As I said: `fboundp'.  Or if you want to include only
> real functions (not macros etc.), then `functionp'.

Good, thank you, that I don't forget it.


-- 
Jean

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

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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