* bug#49690: 28.0.50; ERC makes a button of `let' but not `let*'
@ 2021-07-21 22:42 Emanuel Berg via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-22 12:24 ` Lars Ingebrigtsen
2021-07-22 12:28 ` J.P.
0 siblings, 2 replies; 7+ messages in thread
From: Emanuel Berg via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-07-21 22:42 UTC (permalink / raw)
To: 49690
ERC makes a button of `let' (and fontifies accordingly to
(erc-button erc-input-face)) but not of `let*'
(erc-input-face).
Maybe has something to do with asterisk? :)
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0)
of 2020-10-23 built on ebih
Repository revision: 558065531beaaae78810508f267415c6953e8e47
Repository branch: master
System Description: Debian GNU/Linux 11 (bullseye)
Configured features:
XPM JPEG TIFF GIF PNG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY LIBSELINUX GNUTLS FREETYPE HARFBUZZ ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Group
Minor modes in effect:
erc-list-mode: t
erc-menu-mode: t
erc-networks-mode: t
erc-track-mode: t
erc-track-minor-mode: t
erc-netsplit-mode: t
cursor-sensor-mode: t
show-paren-mode: t
erc-match-mode: t
erc-button-mode: t
erc-ring-mode: t
erc-pcomplete-mode: t
erc-autojoin-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-move-to-prompt-mode: t
erc-readonly-mode: t
erc-scrolltobottom-mode: t
gnus-undo-mode: t
shell-dirtrack-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-compression-mode: t
buffer-read-only: t
transient-mark-mode: t
Load-path shadows:
/home/incal/quicklisp/dists/quicklisp/software/slime-v2.26.1/slime hides /usr/share/emacs/site-lisp/elpa-src/slime-2.26.1/slime
/home/incal/quicklisp/dists/quicklisp/software/slime-v2.26.1/slime-autoloads hides /usr/share/emacs/site-lisp/elpa-src/slime-2.26.1/slime-autoloads
/home/incal/quicklisp/dists/quicklisp/software/slime-v2.26.1/slime-tests hides /usr/share/emacs/site-lisp/elpa-src/slime-2.26.1/slime-tests
~/.emacs.d/emacs-init/isbn-verify hides /home/incal/.emacs.d/elpa/isbn-verify-2.0.0/isbn-verify
~/.emacs.d/emacs-init/signal hides /home/incal/.emacs.d/elpa/signal-20160816.1438/signal
~/.emacs.d/lisp/abbrev hides /usr/local/share/emacs/28.0.50/lisp/abbrev
~/.emacs.d/emacs-init/misc hides /usr/local/share/emacs/28.0.50/lisp/misc
Features:
(shadow emacsbug w3m-save erc-list erc-menu erc-networks
erc-track erc-netsplit eieio-opt speedbar ezimage dframe ...)
Memory information:
((conses 16 503773 102880)
(symbols 48 116129 5)
(strings 32 213243 14204)
(string-bytes 1 7404404)
(vectors 16 54254)
(vector-slots 8 1383807 214374)
(floats 8 511 680)
(intervals 56 4498 1632)
(buffers 992 61))
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#49690: 28.0.50; ERC makes a button of `let' but not `let*'
2021-07-21 22:42 bug#49690: 28.0.50; ERC makes a button of `let' but not `let*' Emanuel Berg via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-07-22 12:24 ` Lars Ingebrigtsen
2021-07-22 13:59 ` J.P.
2021-07-22 14:39 ` Emanuel Berg via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-22 12:28 ` J.P.
1 sibling, 2 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-22 12:24 UTC (permalink / raw)
To: 49690
Emanuel Berg <moasenwood@zoho.eu> writes:
> ERC makes a button of `let' (and fontifies accordingly to
> (erc-button erc-input-face)) but not of `let*'
> (erc-input-face).
>
> Maybe has something to do with asterisk? :)
Do you mean it fontifies "let" and "let*" if those are nicks? Or in
some other context?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#49690: 28.0.50; ERC makes a button of `let' but not `let*'
2021-07-21 22:42 bug#49690: 28.0.50; ERC makes a button of `let' but not `let*' Emanuel Berg via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-22 12:24 ` Lars Ingebrigtsen
@ 2021-07-22 12:28 ` J.P.
2021-07-23 11:17 ` Lars Ingebrigtsen
[not found] ` <874kclffed.fsf@gnus.org>
1 sibling, 2 replies; 7+ messages in thread
From: J.P. @ 2021-07-22 12:28 UTC (permalink / raw)
To: 49690; +Cc: emacs-erc
[-- Attachment #1: Type: text/plain, Size: 617 bytes --]
Emanuel Berg <moasenwood@zoho.eu> writes:
> Maybe has something to do with asterisk? :)
Sounds reasonable to me.
As a quick experiment, adding the rest of the symbol constituents (of
the visible ASCII complement from `lisp-data-mode-syntax-table') to the
relevant `erc-button-alist' member's regexp appears to open things up.
At least it makes `let*' and `ring-insert+extend' light up, as well as
`-->' and `dash-expand:&hash?'. But who knows? Maybe folks more familiar
with this module will have brighter ideas.
(Also, it looks like this stuff touches every message, so we should
probably be somewhat careful.)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Expand-erc-button-list-regexp-for-lisp-symbols.patch --]
[-- Type: text/x-patch, Size: 1181 bytes --]
From 005ba012f497d86ec2337bb484d3098df4001039 Mon Sep 17 00:00:00 2001
From: "F. Jason Park" <jp@neverwas.me>
Date: Thu, 22 Jul 2021 04:13:42 -0700
Subject: [PATCH] Expand erc-button-list regexp for lisp symbols
* lisp/erc/erc-button.el (erc-button-list): Add additional
non-alphanumeric characters to elisp regexp so symbols like `let*' are
recognized.
---
lisp/erc/erc-button.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index cb9af92ba1..272734785d 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -130,7 +130,8 @@ erc-button-alist
("<URL: *\\([^<> ]+\\) *>" 0 t browse-url-button-open-url 1)
;;; ("(\\(\\([^~\n \t@][^\n \t@]*\\)@\\([a-zA-Z0-9.:-]+\\)\\)" 1 t finger 2 3)
;; emacs internal
- ("[`]\\([a-zA-Z][-a-zA-Z_0-9]+\\)[']" 1 t erc-button-describe-symbol 1)
+ ("[`]\\([-a-zA-Z!$%&*+./:<=>?@^_{|}~][-a-zA-Z_0-9!$%&*+./:<=>?@^_{|}~]+\\)[']"
+ 1 t erc-button-describe-symbol 1)
;; pseudo links
("\\bInfo:[\"]\\([^\"]+\\)[\"]" 0 t Info-goto-node 1)
("\\b\\(Ward\\|Wiki\\|WardsWiki\\|TheWiki\\):\\([A-Z][a-z]+\\([A-Z][a-z]+\\)+\\)"
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#49690: 28.0.50; ERC makes a button of `let' but not `let*'
2021-07-22 12:24 ` Lars Ingebrigtsen
@ 2021-07-22 13:59 ` J.P.
2021-07-22 14:39 ` Emanuel Berg via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 7+ messages in thread
From: J.P. @ 2021-07-22 13:59 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 49690
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Do you mean it fontifies "let" and "let*" if those are nicks? Or in
> some other context?
I think he's referring to the buttonizing of function and variable names
in IRC message text, specifically spans containing valid Emacs lisp
symbols surrounded by `quotes', much like they appear in doc strings.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#49690: 28.0.50; ERC makes a button of `let' but not `let*'
2021-07-22 12:24 ` Lars Ingebrigtsen
2021-07-22 13:59 ` J.P.
@ 2021-07-22 14:39 ` Emanuel Berg via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 7+ messages in thread
From: Emanuel Berg via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-07-22 14:39 UTC (permalink / raw)
To: 49690
Lars Ingebrigtsen wrote:
>> Maybe has something to do with asterisk? :)
>
> Do you mean it fontifies "let" and "let*" if those are
> nicks? Or in some other context?
When you use `this' syntax it becomes a fontified button and
if it has a docstring somewhere, e.g., `if', hitting that
button takes you to the docstring, same as C-h f if RET.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#49690: 28.0.50; ERC makes a button of `let' but not `let*'
2021-07-22 12:28 ` J.P.
@ 2021-07-23 11:17 ` Lars Ingebrigtsen
[not found] ` <874kclffed.fsf@gnus.org>
1 sibling, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-23 11:17 UTC (permalink / raw)
To: J.P.; +Cc: 49690, emacs-erc
"J.P." <jp@neverwas.me> writes:
> (Also, it looks like this stuff touches every message, so we should
> probably be somewhat careful.)
[...]
> + ("[`]\\([-a-zA-Z!$%&*+./:<=>?@^_{|}~][-a-zA-Z_0-9!$%&*+./:<=>?@^_{|}~]+\\)[']"
> + 1 t erc-button-describe-symbol 1)
Thanks. I think this will potentially lead to too many false positives,
though, so I've just added a few of those characters to the second [] in
Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#49690: 28.0.50; ERC makes a button of `let' but not `let*'
[not found] ` <874kclffed.fsf@gnus.org>
@ 2021-07-23 11:31 ` J.P.
0 siblings, 0 replies; 7+ messages in thread
From: J.P. @ 2021-07-23 11:31 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 49690, emacs-erc
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Thanks. I think this will potentially lead to too many false positives,
> though, so I've just added a few of those characters to the second [] in
> Emacs 28.
Fantastic, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-07-23 11:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-21 22:42 bug#49690: 28.0.50; ERC makes a button of `let' but not `let*' Emanuel Berg via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-22 12:24 ` Lars Ingebrigtsen
2021-07-22 13:59 ` J.P.
2021-07-22 14:39 ` Emanuel Berg via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-22 12:28 ` J.P.
2021-07-23 11:17 ` Lars Ingebrigtsen
[not found] ` <874kclffed.fsf@gnus.org>
2021-07-23 11:31 ` J.P.
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.