From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Brian Adkins Newsgroups: gmane.emacs.help Subject: Re: Buffer specific hide-list in ERC Date: Tue, 04 Aug 2009 18:25:35 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249425726 1910 80.91.229.12 (4 Aug 2009 22:42:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Aug 2009 22:42:06 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 05 00:41:59 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MYShg-0007k5-VM for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Aug 2009 00:41:57 +0200 Original-Received: from localhost ([127.0.0.1]:44992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYShg-0005XN-8o for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Aug 2009 18:41:56 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!feeder.eternal-september.org!eternal-september.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-X-Trace: news.eternal-september.org U2FsdGVkX1+9Xtd4PP3wpIZKfJ17ZaPICeifIM76etwD13+Q4MiY/f/IxlyQYXA6pYDzxV2IsoFNq3BShz9JofND/JFwDzbhUqg1zOHJLwQDT+sUSrkx1KUpB+Q0N/4tUejkjkG7PmCNT6/n9PIWmA== Original-X-Complaints-To: abuse@eternal-september.org Original-NNTP-Posting-Date: Tue, 4 Aug 2009 22:33:20 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1/qjOQBIBe2YMIzGf/nbYTbY90IvVKmZug= Cancel-Lock: sha1:g1cQbGfEhQjmv8jPmgiNu0b74cs= sha1:hd/U470smoYpHReQXUY81rJYtvM= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin) Original-Xref: news.stanford.edu gnu.emacs.help:171572 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66750 Archived-At: Brian Adkins 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/