From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Any packages using ThingAtPointPlus for activation? Date: Mon, 02 Jan 2023 13:12:04 +0300 Message-ID: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23332"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Drew Adams To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 02 11:13:06 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pCHoX-0005su-UT for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Jan 2023 11:13:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCHo5-00068U-N4; Mon, 02 Jan 2023 05:12:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCHo3-00067r-Fr for help-gnu-emacs@gnu.org; Mon, 02 Jan 2023 05:12:35 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCHo0-000546-Vi for help-gnu-emacs@gnu.org; Mon, 02 Jan 2023 05:12:35 -0500 Original-Received: from localhost ([::ffff:102.85.231.176]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000055D56.0000000063B2AE0E.00007719; Mon, 02 Jan 2023 03:12:30 -0700 Received-SPF: pass client-ip=217.170.207.13; envelope-from=support1@rcdrun.com; helo=stw1.rcdrun.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142092 Archived-At: 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/