erc-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Erc-discuss] Re: faces for events not in erc-track-faces-priority-list


From: Andrew Yates
Subject: [Erc-discuss] Re: faces for events not in erc-track-faces-priority-list
Date: Mon, 25 Jun 2007 23:07:52 -0400
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux)

Andrew Yates <address@hidden> writes:

> I am trying to configure erc so that I am only notified of JOIN/PARTs
> (which use the erc-notice-face) in a few channels. I am trying to do
> this by using erc-track-priority-faces-only in conjuction with a
> moddified erc-track-faces-priority-list.
<snip>
> Does anyone know of a way to accomplish this? The best solution I've
> come up with so far is to modify erc-track-exclude-types so that a
> list of events to ignore can be specified on a per-channel basis, such
> as: (("emacs" "JOIN" "PART" "NICK")).

I decided to go ahead and implement this. It's basic, but gets the job done.
Here's the patch for anyone interested:
--- erc-track.el-arch   2007-06-25 23:04:01.000000000 -0400
+++ erc-track.el        2007-06-25 23:04:30.000000000 -0400
@@ -101,6 +101,12 @@
   :group 'erc-track
   :type 'erc-message-type)
 
+(defcustom erc-track-exclude-alist nil
+  "Alist for ignoring message types on a per-channel basis.
+It should look something like ((\"#emacs\" \"JOIN\" \"PART\"))"
+  :group 'erc-track
+  :type '(alist :key-type string :value-type (repeat string)))
+
 (defcustom erc-track-exclude-server-buffer nil
   "*If true, don't perform tracking on the server buffer; this is
 useful for excluding all the things like MOTDs from the server and
@@ -807,7 +813,11 @@
             (not (erc-message-type-member
                   (or (erc-find-parsed-property)
                       (point-min))
-                  erc-track-exclude-types)))
+                  erc-track-exclude-types))
+            (not (erc-message-type-member
+                   (or (erc-find-parsed-property)
+                       (point-min))
+                  (cdr (assoc this-channel
   erc-track-exclude-alist)))))
        ;; If the active buffer is not visible (not shown in a
        ;; window), and not to be excluded, determine the kinds of
        ;; faces used in the current message, and unless the user





reply via email to

[Prev in Thread] Current Thread [Next in Thread]