all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Help GNU Emacs <help-gnu-emacs@gnu.org>
Cc: Drew Adams <drew.adams@oracle.com>
Subject: Any packages using ThingAtPointPlus for activation?
Date: Mon, 02 Jan 2023 13:12:04 +0300	[thread overview]
Message-ID: <e6749e3132950dfa68c7c792b59cd654.support1@rcdrun.com> (raw)

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/



             reply	other threads:[~2023-01-02 10:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-02 10:12 Jean Louis [this message]
2023-01-02 17:08 ` [External] : Any packages using ThingAtPointPlus for activation? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e6749e3132950dfa68c7c792b59cd654.support1@rcdrun.com \
    --to=bugs@gnu.support \
    --cc=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.