unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "J.P." <jp@neverwas.me>
To: Trevor Arjeski <tmarjeski@gmail.com>
Cc: 73580-done@debbugs.gnu.org, emacs-erc@gnu.org
Subject: 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 -0700	[thread overview]
Message-ID: <87cykicebp.fsf__31661.1651725665$1727909321$gmane$org@neverwas.me> (raw)
In-Reply-To: <871q0zgdg6.fsf@gmail.com> (Trevor Arjeski's message of "Wed, 02 Oct 2024 10:40:25 +0300")

Trevor Arjeski <tmarjeski@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@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.





      parent reply	other threads:[~2024-10-02 22:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01 15:35 bug#73580: 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool faces Trevor Arjeski
2024-10-01 17:56 ` Trevor Arjeski
2024-10-02  3:39 ` J.P.
     [not found] ` <87y137i36d.fsf@neverwas.me>
2024-10-02  7:40   ` Trevor Arjeski
     [not found]   ` <871q0zgdg6.fsf@gmail.com>
2024-10-02 22:47     ` J.P. [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='87cykicebp.fsf__31661.1651725665$1727909321$gmane$org@neverwas.me' \
    --to=jp@neverwas.me \
    --cc=73580-done@debbugs.gnu.org \
    --cc=emacs-erc@gnu.org \
    --cc=tmarjeski@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).