[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Any word in mail-mode is recognized as (thing-at-point 'symbol)
From: |
Jean Louis |
Subject: |
Re: Any word in mail-mode is recognized as (thing-at-point 'symbol) |
Date: |
Tue, 3 Jan 2023 16:17:24 +0300 |
User-agent: |
Mutt/2.2.9+54 (af2080d) (2022-11-21) |
* Michael Heerdegen <michael_heerdegen@web.de> [2023-01-03 13:41]:
> Jean Louis <bugs@gnu.support> writes:
>
> > > That's not what it does. Whatever you mean by "defined symbol" you
> > > have to check yourself (e.g. using `intern-soft').
> >
> > It becomes confusing. Is any word in any text buffer than "symbol"?
>
> Drew explained a lot of background that should help. The short answer
> is more or less "yes".
Thank you, I have clarified some confusion. For now I have
improved. It will get fun when I start designing various impact by
using prefixes like C-1 C-2 etc.
(defun hyperscope-action-button ()
(interactive)
(cond ((thing-at-point 'uuid) (rcd-db-uuid-action (thing-at-point 'uuid)))
((thing-at-point 'url) (browse-url (thing-at-point 'url)))
((thing-at-point 'email) (rcd-write-email user-full-name
user-mail-address (thing-at-point 'email) (thing-at-point 'email)))
((and (thing-at-point 'symbol) (boundp (symbol-at-point)))
(find-variable (symbol-at-point)))
((and (thing-at-point 'symbol) (fboundp (symbol-at-point)))
(find-function (symbol-at-point)))
((thing-at-point 'number) (hyperscope-isolate (thing-at-point 'number)))
((thing-at-point 'word) (funcall (cond ((fboundp 'wordnut-search)
'wordnut-search)
((fboundp 'dictionary-search)
'dictionary-search))
(thing-at-point 'word)))
(t (rcd-message "Hyperscope action not defined."))))
By using prefixes like C-1, C-2, I can tell for example
for (thing-at-point 'word):
- without prefix, look up in local or remote server dictionary
- for C-0 try to expand the word
- for C-1 is to quote the word with single quotes
- for C-2 is to quote the word with double quotes
- for C-3 look up the word in online WWW dictionary like Wiktionary or Duden
- etc. etc.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/