GithubHelp home page GithubHelp logo

Comments (15)

leathekd avatar leathekd commented on August 21, 2024

Hmm, that's odd. Was it working under some other theme? While I don't believe theme choice should affect the highlighting as erc-hl-nicks creates a new face on the fly, stranger things have happened.

erc-hl-nicks highlights any word in a buffer where:

  • erc-channel-users is set
  • the word is a channel user
  • the word (trimmed of special characters) isn't in the list of nicks to skip
  • and the word doesn't have a face that we don't want to highlight over (e.g. erc-notice-face)

Could any of that explain what you're seeing?

The code is here if you're interested: https://github.com/leathekd/erc-hl-nicks/blob/master/erc-hl-nicks.el#L185

from erc-hl-nicks.

bradwright avatar bradwright commented on August 21, 2024

erc-channel-users appears to be set, and 3/4 don't apply for me (I have no values for any of those). I'm using the ZNC bouncer though, I wonder if that's a problem? It might report users differently.

from erc-hl-nicks.

bradwright avatar bradwright commented on August 21, 2024

The format is like so:

("nick"
       ([erc-server-user "nick" "server.com" "~nick" nil nil
                         (#<buffer #example-chat>)]
        .
        [erc-channel-user nil nil nil]))

from erc-hl-nicks.

leathekd avatar leathekd commented on August 21, 2024

Hmm, I haven't been able to reproduce this. I also use ZNC and it's working fine.

  • What other ERC modules are you using?
  • Are there any messages in the Messages buffer that might indicate something is up?
  • Can you toggle debug-on-error and reproduce? Do you get any errors?

I grepped the erc code and found an instance where it'll return the default face in erc-get-fg-color-face. It should log an error or write to the messages buffer.

from erc-hl-nicks.

bradwright avatar bradwright commented on August 21, 2024

Here are my modules:

(pcomplete services netsplit fill button match track completion 
readonly networks ring autojoin noncommands irccontrols move-to-prompt 
stamp menu list hl-nicks)

Nothing useful in *Messages*, even after using debug-on-error

from erc-hl-nicks.

bradwright avatar bradwright commented on August 21, 2024

For extra reference this is my entire ZNC configuration:

https://github.com/bradleywright/emacs-d/blob/master/modes/znc.el

from erc-hl-nicks.

 avatar commented on August 21, 2024

I'm also having some trouble with this... I had erc-highlight-nicknames working in Emacs23 but I recently upgraded to Emacs24 and thought I'd give ERC another go, but neither erc-highlight-nicknames nor your erc-hl-nicks seems to work at all.

Is there any setup beyond (require 'erc-hl-nicks) and then adding hl-nicks to the erc-modules list?

from erc-hl-nicks.

 avatar commented on August 21, 2024

On further investigation, it's not just hl-nicks... in fact ERC wasn't displaying any faces at all... and this was caused by interference with global-whitespace-mode. Turning off whitespace makes ERC colors show up (no other major modes that I use have color problems because of that... Any thoughts on how I might enable global whitespace mode globally, but disable it per-ERC buffer?

from erc-hl-nicks.

leathekd avatar leathekd commented on August 21, 2024

Interesting, thanks for the info! I was never able to reproduce this issue, perhaps this was what I was missing. I'll look into whitespace mode.

In the meantime, I believe you can use M-x whitespace-mode to disable the mode for a particular buffer. I could be wrong though. I'll update when I know more.

from erc-hl-nicks.

leathekd avatar leathekd commented on August 21, 2024

uh, wow. I just enabled global-whitespace-mode and it stripped all of the faces from an existing erc buffer.

from erc-hl-nicks.

leathekd avatar leathekd commented on August 21, 2024

Ok, I don't yet have a clue what whitespace-mode is doing to ERC buffers, but adding this to my init.el and restarting (or eval this and then close and reopen all ERC buffers). Apparently whatever whitespace-mode does is permanent, simply turning it off didn't allow new entries to be colorized.

(setq whitespace-global-modes '(not erc-mode))

from erc-hl-nicks.

 avatar commented on August 21, 2024

Ah yeah, that is working now, thanks. Looking back, my issue was probably different than what the original reporter was experiencing. Sorry for the spam!

from erc-hl-nicks.

leathekd avatar leathekd commented on August 21, 2024

No problem. The issue may yet be related. At least this is the only time I've seen any text in an ERC buffer with just the default face. Even text that isn't highlighted should have erc-default-text as its face.

Not to mention: https://github.com/bradleywright/emacs-d/blob/master/modes.el#L290

:)

Thanks.

from erc-hl-nicks.

leathekd avatar leathekd commented on August 21, 2024

Hey, @bradleywright I don't know if you were emailed about this, but there is a potential workaround to the issue you were seeing above.

from erc-hl-nicks.

bradwright avatar bradwright commented on August 21, 2024

Ah awesome, thanks for bumping!

from erc-hl-nicks.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.