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: Re: [External] : Any packages using ThingAtPointPlus for activation? Date: Tue, 3 Jan 2023 23:23:45 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19888"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) Cc: Help GNU Emacs To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 03 23:02:28 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 1pCpMZ-0004uA-8D for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 03 Jan 2023 23:02:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCpM8-0000OC-FT; Tue, 03 Jan 2023 17:02:01 -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 1pCpM1-0000N0-MD for help-gnu-emacs@gnu.org; Tue, 03 Jan 2023 17:01:54 -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 1pCpLz-0003m2-92 for help-gnu-emacs@gnu.org; Tue, 03 Jan 2023 17:01:53 -0500 Original-Received: from localhost ([::ffff:197.239.10.238]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000055D77.0000000063B4A5AE.000027A0; Tue, 03 Jan 2023 15:01:17 -0700 Mail-Followup-To: Drew Adams , Help GNU Emacs Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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:142114 Archived-At: * Drew Adams [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/