leathekd / erc-hl-nicks Goto Github PK
View Code? Open in Web Editor NEWNickname Highlighting for ERC
Nickname Highlighting for ERC
May want to ensure that you're looking-at a '<' before invoking forward-word in erc-hl-nicks
If someone is making the effort to manage a list of pals and fools, I guess erc-hl-nicks shouldn't stomp all over them.
Hi,
When I'm using ERC without erc-hl-nicks and my nickname gets mentioned somewhere, I get the channel name highlighted in the modeline with a specific color (like red to standout).
After installing erc-hl-nicks, whenever someone mentions my nickname somewhere like before, I do get the channel name in the modeline but with the default color, just like if someone talked in the channel but didn't mention me.
How can I fix this?
Thanks for the help.
ps: let me know if you want me to provide my ERC conf or something else, but I tried with a minimal config and the issue persisted
erc-hl-nicks-highlight-p returns false for all CamelCase or underscore_ etc nicks because the function erc-hl-nicks traverses each message a word at a time so nicks which span words are never found.
Line 339 in be18192
Not sure where this comes from, but it looks like another require is required. (or a defun I suppose)
Sometimes the generated colors feel out of place with my theme. Supporting a list of colors would be cool (other options I've tried for this so far aren't as consistent with the actual highlighting as this package), but I'd be happy with having a max contrast.
After installing erc-hl-nicks, on a fresh startup of emacs erc-hl-nicks-color-for-nick gives the aforementioned error.
This doesn't happen if I use erc-hl-nicks immediately after installing it, such as M-x erc-hl-nicks-enable RET, only when first starting up. To fix this issue I (require 'cl) in a scratch buffer.
My suspicion is that the (eval-when-compile...) brings in cl for the duration of my emacs session when I install it first, but is no longer there when I start a new session.
See line 264 of erc-hl-nicks.el in HEAD.
Please take this bug report as friendly suggestion :)
The following code, at the very end of erc-hl-nicks.el
, loads the module, even if it's not added to erc-modules
. While I understand the good intention, automatically loading code, without the user's consent, may cause unexpected behavior, which is very hard to debug.
(eval-after-load 'erc
'(progn
(unless (featurep 'erc-hl-nicks)
(require 'erc-hl-nicks))
(add-to-list 'erc-modules 'hl-nicks t)))
I just experienced, such a situation: I was debugging why erc-track did not colorize my mode-line, when I'm mentioned on a channel (essentially, I was running into #12 ). Even with all erc- and theming customizations disabled, erc-track did not behave as expected. It took a while before I realized that neither my ERC customizations, nor my the caused the issue. Finally, I ended up going line-by-line through my init.el
and was quite surprised that everything worked as expected, until I executed (package-initialize)
. (package-initialize)
autoloaded erc-hl-nicks, which caused the colors to vanish.
Putting point over my own nick and running M-x describe-face
just returns "default".
GNU Emacs 24.0.95.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
of 2012-04-02 on bob.porkrind.org
Using this theme:
Hi there,
This is a very useful package, thanks! Did you ever consider contributing it back to ERC itself so that it would reach more users?
ERC is distributed with Emacs itself, so it would need a copyright assignment from all significant contributors. AFAICT, that should be only you, as the limit is those that have roughly added 15 lines of code, give or take. You can read more about that here: https://www.gnu.org/licenses/why-assign.html
Other than that, I'm sure the ERC maintainer would be open to discussing exactly how you could maintain it in the same way as now, for example by continuously merging your version into the one that would then be distributed with Emacs.
Thanks again, and looking forward to hearing what you think!
You seem to know your way around the erc API, and I would be very thankful if you could help me about something in core that is very much related to this plugin.
I've tried reading the erc source code to understand how to apply a filter, much like erc-hl-nicks-skip-nicks
when erc-nick-default-face
is added. However, I cannot figure out how to do it. None of the usesites of erc-nick-default-face
give me any clue as to what is happening.
What I want to do is to (with stock Emacs and erc) not apply erc-nick-default-face
to a manually maintained list of usernames. This is because some users pick annoying usernames that are used in everyday communication, such as a
or so
.
My workaround is to set a custom face for erc-nick-default-face
, removing the bold text, and then use erc-hl-nicks
with
(use-package erc-hl-nicks
:init
(setq erc-hl-nicks-skip-nicks '("so")))
which I admit is very nice and I may continue to use this plugin. But I'd also like, almost for my own sanity at this point, work out how to disable the out-of-the-box highlighting. Could you please provide some pointers?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.