unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Any packages using ThingAtPointPlus for activation?
@ 2023-01-02 10:12 Jean Louis
  2023-01-02 17:08 ` [External] : " Drew Adams
  2023-01-03  6:16 ` Any packages using ThingAtPointPlus for activation? Eduardo Ochs
  0 siblings, 2 replies; 19+ messages in thread
From: Jean Louis @ 2023-01-02 10:12 UTC (permalink / raw)
  To: Help GNU Emacs; +Cc: Drew Adams

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/



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-01-06 18:21 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-02 10:12 Any packages using ThingAtPointPlus for activation? Jean Louis
2023-01-02 17:08 ` [External] : " Drew Adams
2023-01-03 12:41   ` Jean Louis
2023-01-03 19:54     ` Drew Adams
2023-01-03 20:23       ` Jean Louis
2023-01-03 22:47         ` Drew Adams
2023-01-04  8:46           ` Jean Louis
2023-01-04 15:42             ` Drew Adams
2023-01-04 16:03             ` Eduardo Ochs
2023-01-05  5:42               ` Jean Louis
2023-01-05  8:37   ` ThingAtPointPlus, and extending things at point Jean Louis
2023-01-05 17:00     ` [External] : " Drew Adams
2023-01-06 15:49       ` Jean Louis
2023-01-06 16:23       ` Jean Louis
2023-01-06 17:30         ` Drew Adams
2023-01-06 17:43           ` Jean Louis
2023-01-06 18:21             ` Drew Adams
2023-01-03  6:16 ` Any packages using ThingAtPointPlus for activation? Eduardo Ochs
2023-01-03 13:10   ` Jean Louis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).