[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Any packages using ThingAtPointPlus for activation?
From: |
Jean Louis |
Subject: |
Any packages using ThingAtPointPlus for activation? |
Date: |
Mon, 02 Jan 2023 13:12:04 +0300 |
Dear Drew,
Regarding your library:
https://www.emacswiki.org/emacs/ThingAtPointPlus
You probably know Hyperbole and how M-RET works in Hyperbole. I like
the concept and wish to use M-RET in similar fashion, though without
Hyperbole package, so to jump to various functions by using
thing-at-point plus. It gives me freedom to easier define what I need,
and if nothing found I can still include Hyperbole function on the
end.
The concept to "jump" based on some things at point, is useful. I jump
faster to various pieces of information.
Here is the preliminary function that shows the concept:
(defun hyperscope-action-button (&optional prefix)
(interactive "p")
(cond ((thing-at-point 'uuid) (rcd-db-uuid-action (thing-at-point 'uuid)))
;; the above would find UUID in databases or Org files and jump there.
((thing-at-point 'url) (browse-url (thing-at-point 'url)))
;; the above browse the URL
((thing-at-point 'email) (rcd-write-email user-full-name
user-mail-address (thing-at-point 'email) (thing-at-point 'email)))
;; the above writes the e-mail to email address found at point
((thing-at-point 'symbol)
(let ((symbol (intern (thing-at-point 'symbol))))
(cond ((fboundp symbol)
(find-function symbol))
((boundp symbol)
(find-variable symbol))
(t (rcd-warning-message "Could not find symbol `%s'"
symbol)))))
;; the above finds definition of a function similar like xref
but works outside of Emacs Lisp mode
((thing-at-point 'number) (hyperscope-isolate (thing-at-point 'number)))
;; the above would jump to elementary object in Hyperscope database
(t (rcd-message "Hyperscope action not defined.")))))
;; Or I get warning
;; Easy to define global key
(keymap-global-set "M-RET" #'hyperscope-action-button)
I want to expand the concept by following thinking:
- M-RET -- jump to default function
- C-u 0 M-RET -- capture thing at point
- C-u 1 M-RET -- share thing at point
- C-u 2 M-RET -- etc. etc. etc.
Point of this e-mail:
---------------------
Before I continue expanding the concept, it is better I ask you and others
about previous work.
Do you know of any existing package(s), apart from Hyperbole, that
deal in similar way with action keys andjumping based on what is found
under the point?
On MELPA, I see related packages, that have useful functions:
https://melpa.org/#/?q=at-point
And M-x package-list-packages did not give me some more relevant
information about "thing" and "jump".
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
- Any packages using ThingAtPointPlus for activation?,
Jean Louis <=
- RE: [External] : Any packages using ThingAtPointPlus for activation?, Drew Adams, 2023/01/02
- Re: [External] : Any packages using ThingAtPointPlus for activation?, Jean Louis, 2023/01/03
- RE: [External] : Any packages using ThingAtPointPlus for activation?, Drew Adams, 2023/01/03
- Re: [External] : Any packages using ThingAtPointPlus for activation?, Jean Louis, 2023/01/03
- RE: [External] : Any packages using ThingAtPointPlus for activation?, Drew Adams, 2023/01/03
- Re: [External] : Any packages using ThingAtPointPlus for activation?, Jean Louis, 2023/01/04
- RE: [External] : Any packages using ThingAtPointPlus for activation?, Drew Adams, 2023/01/04
- Re: [External] : Any packages using ThingAtPointPlus for activation?, Eduardo Ochs, 2023/01/04
- Re: [External] : Any packages using ThingAtPointPlus for activation?, Jean Louis, 2023/01/05
ThingAtPointPlus, and extending things at point, Jean Louis, 2023/01/05