all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Brian Adkins <lojicdotcom@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Buffer specific hide-list in ERC
Date: Tue, 04 Aug 2009 18:25:35 -0400	[thread overview]
Message-ID: <m2tz0n8bds.fsf@68-243-151-250.pools.spcsdns.net> (raw)
In-Reply-To: m28wi0egw7.fsf@gmail.com

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/


  reply	other threads:[~2009-08-04 22:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-03 15:17 Buffer specific hide-list in ERC Brian Adkins
2009-08-03 18:40 ` Edward O'Connor
     [not found] ` <mailman.3778.1249324869.2239.help-gnu-emacs@gnu.org>
2009-08-03 19:54   ` Brian Adkins
2009-08-03 21:17     ` Brian Adkins
2009-08-04 22:25       ` Brian Adkins [this message]
2009-08-04 23:06         ` Johan Bockgård
     [not found]         ` <mailman.3894.1249427215.2239.help-gnu-emacs@gnu.org>
2009-08-05 11:57           ` Brian Adkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2tz0n8bds.fsf@68-243-151-250.pools.spcsdns.net \
    --to=lojicdotcom@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.