Package: emacs;
Reported by: Trevor Arjeski <tmarjeski <at> gmail.com>
Date: Tue, 1 Oct 2024 15:37:02 UTC
Severity: normal
Found in version 29.4
Done: "J.P." <jp <at> neverwas.me>
Bug is archived. No further changes may be made.
View this message in rfc822 format
From: help-debbugs <at> gnu.org (GNU bug Tracking System) To: Trevor Arjeski <tmarjeski <at> gmail.com> Subject: bug#73580: closed (Re: bug#73580: 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool faces) Date: Wed, 02 Oct 2024 22:48:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report #73580: 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool faces which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 73580 <at> debbugs.gnu.org. -- 73580: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73580 GNU Bug Tracking System Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "J.P." <jp <at> neverwas.me> To: Trevor Arjeski <tmarjeski <at> gmail.com> Cc: 73580-done <at> debbugs.gnu.org, emacs-erc <at> gnu.org Subject: Re: bug#73580: 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool faces Date: Wed, 02 Oct 2024 15:47:22 -0700Trevor Arjeski <tmarjeski <at> gmail.com> writes: > Thanks for the detailed explanation. I did go through with the > "traditional" approach of adding 'nick-or-keyword, but sadly gave up. Actually, I think I steered you wrong with that outline thingy (apologies if that led to a wild goose chase). As you've rightly observed, the only implementation of `nick-or-keyword' is for "current-nick", and it behaves rather unintuitively (the one for "keyword" is a no-op). From the doc: `nick-or-keyword' - highlight the nick of the user who typed your nickname, or all instances of the current nickname if there was no sending user Anyway, mimicking that behavior for "fool" and "pal" obviously won't do. I think we'd instead want a new variant, something like a `keyword-all' to highlight all occurrences of a given nick, whether they be in a speaker tag, an opening address "mention: ", or otherwise. > Honestly, the more I looked at ERC, the more I realized that I don't > want pals to be highlighted at all. This makes my first patch irrelevant > since the whole idea is to use one single face color every time a nick > appears (similar to weechat's nick highlighting). The same goes for a > fool, who may appear dimmed, but when someone else mentions the fool you > will see their nick as the color that erc-nicks assigns. I believe what I said above applies here too re the either/or proposition imposed by the "match types" currently on offer. >> If you're saying `nicks' _should_ highlight your own >> speaker tags (or should optionally do so), please explain. > > This is again about consistency with seeing your own nick within > brackets (<your_nick>) and in messages that other people send (when > erc-current-nick-highlight-type is 'nick-or-keyword). Hm, I guess I was confused by the `erc-my-nick-face' in ((equal nick (erc-current-nick)) 'erc-my-nick-face)))) because that concerns the face your speaker tag appears in when you submit a comment at the prompt. Confusingly, it's actually unrelated to `erc-current-nick-face', which is the face your mentions appear in after being treated by `match' (or, as noted above, the face your mentioners appear in with match types `nick-or-keyword' and `nick'). To avoid such confusion in the future, I think we should supplement those non-namespaced faces in erc-match.el with preferred aliases, like `erc-match-current-nick' (new faces aren't supposed to be suffixed with "-face", I've learned). Anyway, FWIW, there are actually existing, though perhaps somewhat roundabout ways to force all occurrences of your nick to use the same face (if that's ultimately what you're after): With `match': (use-package erc :custom (erc-modules `(nicks ,@erc-modules))) (use-package erc-match :custom-face (erc-current-nick-face ((t ( :weight unspecified :foreground unspecified :inherit erc-my-nick-face))))) Without `match': (use-package erc :custom (erc-modules `(nicks ,@(remq 'match erc-modules)))) (use-package erc-nicks :custom-face (erc-nicks-trev <at> Libera.Chat-face ((t (:inherit (erc-button-nick-default-face erc-my-nick-face)))))) Perhaps one of these should go in the manual's Sample Config. > Not sure what to do! I think we can just close this bug for now. I've gone ahead and done that, but feel free to continue discussing should anything related arise (though you may have to unarchive the bug beforehand if weeks go by). Cheers.
[Message part 3 (message/rfc822, inline)]
From: Trevor Arjeski <tmarjeski <at> gmail.com> To: bug-gnu-emacs <at> gnu.org Subject: 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool faces Date: Tue, 01 Oct 2024 18:35:54 +0300[Message part 4 (text/plain, inline)]The erc-nicks module does not respect erc-pal-face and erc-fool-face when assigning a face for a nick, specifically when a user writes a message that includes a nick of a pal or fool, leading to the faces being different in the nick tag (<your_nick>) and the message (ex. "your_nick: hi"). Reproduction config: (use-package erc :defer t :config (custom-set-faces `(erc-pal-face ((t (:foreground "red"))))) (setopt erc-modules (seq-union '(nicks) erc-modules)) :custom (erc-nicks-colors '("yellow")) (erc-pals '("trev"))) In the above config, you will notice that "<trev>" will be red, but when someone mentions "trev" in a message, the nick will be yellow (instead of red). Attached is a proposed patch. Feedback needed and welcome![0001-Make-erc-nicks-respect-pal-and-fool-faces.patch (text/x-patch, attachment)][Message part 6 (text/plain, inline)]In GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0) Windowing system distributor 'The X.Org Foundation', version 11.0.12101013 System Description: Arch Linux Configured using: 'configure --with-x-toolkit=gtk3 --with-native-compilation=aot --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --with-tree-sitter --localstatedir=/var --with-cairo --disable-build-details --with-harfbuzz --with-libsystemd --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_CTYPE: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: erc-track-mode: t erc-track-minor-mode: t erc-spelling-mode: t erc-ring-mode: t erc-netsplit-mode: t erc-menu-mode: t erc-match-mode: t erc-list-mode: t erc-irccontrols-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t erc-scrolltobottom-mode: t erc-imenu-mode: t erc-pcomplete-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-autojoin-mode: t erc-networks-mode: t global-git-commit-mode: t shell-dirtrack-mode: t server-mode: t envrc-global-mode: t envrc-mode: t editorconfig-mode: t ws-butler-global-mode: t ws-butler-mode: t global-treesit-auto-mode: t diff-hl-flydiff-mode: t global-diff-hl-mode: t diff-hl-mode: t electric-pair-mode: t rainbow-delimiters-mode: t apheleia-global-mode: t apheleia-mode: t corfu-popupinfo-mode: t global-corfu-mode: t corfu-mode: t marginalia-mode: t vertico-mode: t which-key-mode: t global-ligature-mode: t ligature-mode: t global-auto-revert-mode: t global-display-line-numbers-mode: t display-line-numbers-mode: t desktop-save-mode: t recentf-mode: t save-place-mode: t straight-use-package-mode: t straight-package-neutering-mode: t override-global-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t column-number-mode: t line-number-mode: t auto-fill-function: do-auto-fill transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/trev/.emacs.d/straight/build/external-completion/external-completion hides /usr/share/emacs/29.4/lisp/external-completion /home/trev/.emacs.d/straight/build/transient/transient hides /usr/share/emacs/29.4/lisp/transient /home/trev/.emacs.d/straight/build/jsonrpc/jsonrpc hides /usr/share/emacs/29.4/lisp/jsonrpc /home/trev/.emacs.d/straight/build/eglot/eglot hides /usr/share/emacs/29.4/lisp/progmodes/eglot /home/trev/.emacs.d/straight/build/xref/xref hides /usr/share/emacs/29.4/lisp/progmodes/xref /home/trev/.emacs.d/straight/build/project/project hides /usr/share/emacs/29.4/lisp/progmodes/project /home/trev/.emacs.d/straight/build/flymake/flymake hides /usr/share/emacs/29.4/lisp/progmodes/flymake /home/trev/.emacs.d/straight/build/erc/erc-button hides /usr/share/emacs/29.4/lisp/erc/erc-button /home/trev/.emacs.d/straight/build/erc/erc-backend hides /usr/share/emacs/29.4/lisp/erc/erc-backend /home/trev/.emacs.d/straight/build/erc/erc-ibuffer hides /usr/share/emacs/29.4/lisp/erc/erc-ibuffer /home/trev/.emacs.d/straight/build/erc/erc-compat hides /usr/share/emacs/29.4/lisp/erc/erc-compat /home/trev/.emacs.d/straight/build/erc/erc-capab hides /usr/share/emacs/29.4/lisp/erc/erc-capab /home/trev/.emacs.d/straight/build/erc/erc hides /usr/share/emacs/29.4/lisp/erc/erc /home/trev/.emacs.d/straight/build/erc/erc-status-sidebar hides /usr/share/emacs/29.4/lisp/erc/erc-status-sidebar /home/trev/.emacs.d/straight/build/erc/erc-identd hides /usr/share/emacs/29.4/lisp/erc/erc-identd /home/trev/.emacs.d/straight/build/erc/erc-replace hides /usr/share/emacs/29.4/lisp/erc/erc-replace /home/trev/.emacs.d/straight/build/erc/erc-sasl hides /usr/share/emacs/29.4/lisp/erc/erc-sasl /home/trev/.emacs.d/straight/build/erc/erc-speedbar hides /usr/share/emacs/29.4/lisp/erc/erc-speedbar /home/trev/.emacs.d/straight/build/erc/erc-notify hides /usr/share/emacs/29.4/lisp/erc/erc-notify /home/trev/.emacs.d/straight/build/erc/erc-pcomplete hides /usr/share/emacs/29.4/lisp/erc/erc-pcomplete /home/trev/.emacs.d/straight/build/erc/erc-list hides /usr/share/emacs/29.4/lisp/erc/erc-list /home/trev/.emacs.d/straight/build/erc/erc-autoaway hides /usr/share/emacs/29.4/lisp/erc/erc-autoaway /home/trev/.emacs.d/straight/build/erc/erc-xdcc hides /usr/share/emacs/29.4/lisp/erc/erc-xdcc /home/trev/.emacs.d/straight/build/erc/erc-networks hides /usr/share/emacs/29.4/lisp/erc/erc-networks /home/trev/.emacs.d/straight/build/erc/erc-page hides /usr/share/emacs/29.4/lisp/erc/erc-page /home/trev/.emacs.d/straight/build/erc/erc-truncate hides /usr/share/emacs/29.4/lisp/erc/erc-truncate /home/trev/.emacs.d/straight/build/erc/erc-lang hides /usr/share/emacs/29.4/lisp/erc/erc-lang /home/trev/.emacs.d/straight/build/erc/erc-sound hides /usr/share/emacs/29.4/lisp/erc/erc-sound /home/trev/.emacs.d/straight/build/erc/erc-fill hides /usr/share/emacs/29.4/lisp/erc/erc-fill /home/trev/.emacs.d/straight/build/erc/erc-loaddefs hides /usr/share/emacs/29.4/lisp/erc/erc-loaddefs /home/trev/.emacs.d/straight/build/erc/erc-ring hides /usr/share/emacs/29.4/lisp/erc/erc-ring /home/trev/.emacs.d/straight/build/erc/erc-join hides /usr/share/emacs/29.4/lisp/erc/erc-join /home/trev/.emacs.d/straight/build/erc/erc-desktop-notifications hides /usr/share/emacs/29.4/lisp/erc/erc-desktop-notifications /home/trev/.emacs.d/straight/build/erc/erc-stamp hides /usr/share/emacs/29.4/lisp/erc/erc-stamp /home/trev/.emacs.d/straight/build/erc/erc-netsplit hides /usr/share/emacs/29.4/lisp/erc/erc-netsplit /home/trev/.emacs.d/straight/build/erc/erc-goodies hides /usr/share/emacs/29.4/lisp/erc/erc-goodies /home/trev/.emacs.d/straight/build/erc/erc-track hides /usr/share/emacs/29.4/lisp/erc/erc-track /home/trev/.emacs.d/straight/build/erc/erc-ezbounce hides /usr/share/emacs/29.4/lisp/erc/erc-ezbounce /home/trev/.emacs.d/straight/build/erc/erc-common hides /usr/share/emacs/29.4/lisp/erc/erc-common /home/trev/.emacs.d/straight/build/erc/erc-imenu hides /usr/share/emacs/29.4/lisp/erc/erc-imenu /home/trev/.emacs.d/straight/build/erc/erc-services hides /usr/share/emacs/29.4/lisp/erc/erc-services /home/trev/.emacs.d/straight/build/erc/erc-spelling hides /usr/share/emacs/29.4/lisp/erc/erc-spelling /home/trev/.emacs.d/straight/build/erc/erc-match hides /usr/share/emacs/29.4/lisp/erc/erc-match /home/trev/.emacs.d/straight/build/erc/erc-menu hides /usr/share/emacs/29.4/lisp/erc/erc-menu /home/trev/.emacs.d/straight/build/erc/erc-dcc hides /usr/share/emacs/29.4/lisp/erc/erc-dcc /home/trev/.emacs.d/straight/build/erc/erc-log hides /usr/share/emacs/29.4/lisp/erc/erc-log /home/trev/.emacs.d/straight/build/eldoc/eldoc hides /usr/share/emacs/29.4/lisp/emacs-lisp/eldoc /home/trev/.emacs.d/straight/build/seq/seq hides /usr/share/emacs/29.4/lisp/emacs-lisp/seq Features: (shadow sort mail-extr emacsbug vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs bug-reference magit-patch magit-subtree magit-extras magit-gitignore magit-ediff ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util face-remap debug backtrace semantic/symref/grep grep semantic/symref semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pulse dabbrev files-x cl-print erc-ibuffer erc-log erc-notify erc-page erc-services erc-sound erc-speedbar speedbar ezimage dframe erc-truncate erc-xdcc erc-dcc shortdoc help-fns radix-tree network-stream nsm erc-track erc-spelling flyspell ispell erc-ring erc-nicks erc-netsplit erc-menu erc-match erc-list erc-goodies erc-imenu erc-pcomplete erc-button erc-fill erc-stamp erc-join cus-start epa-file erc erc-backend erc-networks erc-common erc-compat erc-loaddefs term/xterm xterm nerd-icons-dired nerd-icons nerd-icons-faces nerd-icons-data nerd-icons-data-mdicon nerd-icons-data-flicon nerd-icons-data-codicon nerd-icons-data-devicon nerd-icons-data-sucicon nerd-icons-data-wicon nerd-icons-data-faicon nerd-icons-data-powerline nerd-icons-data-octicon nerd-icons-data-pomicon nerd-icons-data-ipsicon magit-bookmark magit-submodule magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit package url-handlers magit-repos magit-apply magit-wip magit-log which-func magit-diff smerge-mode git-commit log-edit message sendmail yank-media puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor shell server magit-mode browse-url benchmark magit-git magit-base magit-section cursor-sensor crm dash apheleia apheleia-rcs apheleia-dp apheleia-formatters apheleia-utils apheleia-log apheleia-formatter-context casual-ibuffer casual-ibuffer-filter ibuf-ext casual-ibuffer-settings casual-ibuffer-version casual-ibuffer-utils ibuffer ibuffer-loaddefs casual-dired casual-dired-settings dired-aux casual-dired-version casual-dired-sort-by casual-dired-utils casual-dired-variables elint checkdoc lisp-mnt thingatpt image-dired image-dired-tags image-dired-external image-dired-util xdg image-mode exif wdired dired-x dired dired-loaddefs casual-avy casual-avy-version casual-lib casual-lib-version org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete org-list org-footnote org-faces org-entities noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu calendar cal-loaddefs org-version org-compat org-macs imenu transient format-spec envrc inheritenv editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch ws-butler treesit-auto treesit cape corfu-doc-terminal avl-tree generator corfu-doc corfu-terminal popon orderless consult bookmark undo-fu ace-window avy xref project compile text-property-search comint ansi-osc ring comp comp-cstr warnings mule-util jka-compr time-date diff-hl-flydiff diff diff-hl log-view pcvs-util vc-dir ewoc vc rainbow-mode ansi-color color vc-git diff-mode vc-dispatcher parinfer-rust-mode parinfer-rust-changes parinfer-rust track-changes parinfer-rust-helper url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-parse auth-source eieio eieio-core password-cache json map url-vars mailcap elec-pair rainbow-delimiters init erc-init cus-edit pp cus-load icons erc-autoloads markdown-mode-autoloads geiser-guile-autoloads geiser-autoloads rust-mode-autoloads parinfer-rust-mode-autoloads eglot-autoloads track-changes-autoloads jsonrpc-autoloads flymake-autoloads project-autoloads external-completion-autoloads eldoc-autoloads vterm-autoloads nerd-icons-dired-autoloads nerd-icons-autoloads diff-hl-autoloads magit-autoloads with-editor-autoloads magit-section-autoloads dash-autoloads rainbow-mode-autoloads apheleia-autoloads casual-ibuffer-autoloads casual-dired-autoloads casual-avy-autoloads casual-lib-autoloads transient-autoloads envrc-autoloads inheritenv-autoloads editorconfig-autoloads rainbow-delimiters-autoloads ws-butler-autoloads treesit-auto-autoloads cape-autoloads corfu-doc-terminal-autoloads corfu-doc-autoloads corfu-terminal-autoloads popon-autoloads orderless-autoloads corfu-popupinfo byte-opt corfu corfu-autoloads consult-autoloads marginalia marginalia-autoloads vertico compat compat-30 vertico-autoloads compat-autoloads info seq-autoloads undo-fu-autoloads ace-window-autoloads avy-autoloads which-key which-key-autoloads xref-autoloads use-package-diminish diminish diminish-autoloads doom-themes-ext-org doom-nord-theme pcase doom-themes doom-themes-base doom-themes-autoloads finder-inf rx ligature ligature-autoloads autorevert filenotify display-line-numbers desktop frameset recentf tree-widget wid-edit saveplace edmacro kmacro straight-autoloads straight subr-x cl-extra help-mode cl-macs gv use-package-bind-key bind-key easy-mmode cl-seq use-package-core cl-loaddefs cl-lib bytecomp byte-compile early-init rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 879903 1108074) (symbols 48 37842 200) (strings 32 188756 93623) (string-bytes 1 7685901) (vectors 16 93443) (vector-slots 8 2283381 1172880) (floats 8 774 3386) (intervals 56 25857 51054) (buffers 984 53))
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.