[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Buffer specific hide-list in ERC
From: |
Brian Adkins |
Subject: |
Re: Buffer specific hide-list in ERC |
Date: |
Tue, 04 Aug 2009 18:25:35 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin) |
Brian Adkins <lojicdotcom@gmail.com> writes:
> [...]
> On the off chance that this is useful to anyone else. Here's
> the code I came up with to set the erc-hide-list variable for a
> specific channel:
>
> ; Set the global variable to hide the list of message types
> (setq erc-hide-list '("JOIN" "PART" "QUIT" "MODE" "NICK"))
>
> (add-hook 'erc-join-hook
> (lambda ()
> (if (equal "#MyIRCChannel" (buffer-name))
> (set (make-local-variable 'erc-hide-list) '()))))
>
> Thanks Edward for pointing me in the right direction. It's amazing how
> extensible and well thought out Emacs is.
It turns out this isn't working as well as I thought. It does set the
variable local to the buffer (as verified by C-h v), but some messages
that I wanted to see were still being hidden even with erc-hide-list
being nil in the buffer.
I tried flipping it so that the default was nil and I set it to the
list above for all channels other than the ones in which I wanted to
see the messages. As an example:
--- snip ---
erc-hide-list is a variable defined in `erc.el'.
Its value is
("JOIN" "PART" "QUIT" "MODE" "NICK")
Local in buffer #foo; global value is nil
--- snip ---
But I was still seeing "quit", "nick", etc. messages in the channel.
I suppose it has something to do with erc-hide-list being incompatible
with the buffer local mechanism.
--
Brian Adkins
http://lojic.com/