scripts icon indicating copy to clipboard operation
scripts copied to clipboard

buffer_autoset.py: Allow for highlighting words in all channels except some?

Open 8573 opened this issue 7 years ago • 1 comments

I'd like to use buffer_autoset.py to highlight some words (say, "foo" and "bar"), in all freenode channels, except that I don't want to highlight "foo" in the #foo channel.

I've set buffer_autoset.buffer.irc.freenode.#*.highlight_words_add to foo,bar, which works to highlight the words across freenode. I've then set buffer_autoset.buffer.irc.freenode.#foo.highlight_words_del to foo, but "foo" still gets highlighted in #foo.

I've also tried using highlight_words_add in place of highlight_words_del, as I thought buffer_autoset.buffer.irc.freenode.#foo.highlight_words_add might override buffer_autoset.buffer.irc.freenode.#*.highlight_words_add; this also did not prevent "foo" from being highlighted in #foo.

I now suspect that highlight_words_del only un-highlights words that are listed in weechat.look.highlight. Regardless, is there a way to highlight a word except in certain channels? If so, how; if not, should there be?

(/version: WeeChat 1.7 [compiled on Jan 15 2017 06:41:25])

8573 avatar Apr 12 '17 05:04 8573

I now suspect that highlight_words_del only un-highlights words that are listed in weechat.look.highlight.

Actually, it doesn't even seem to do that — I have Robigalia in both weechat.look.highlight and buffer_autoset.buffer.irc.freenode.#robigalia.highlight_words_del, and "Robigalia" still gets highlighted in #robigalia.

8573 avatar Mar 17 '19 19:03 8573