From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/18953 Path: main.gmane.org!not-for-mail From: Karl Kleinpaste Newsgroups: gmane.emacs.gnus.general Subject: Got a couple weird ones here (hacking article-display-hook) Date: 19 Nov 1998 15:48:35 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035157389 8979 80.91.224.250 (20 Oct 2002 23:43:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:43:09 +0000 (UTC) Summary: Re: removing obnoxious mailing list trailers? Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id PAA17419 for ; Thu, 19 Nov 1998 15:50:51 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.1/8.9.1) with ESMTP id OAB29919; Thu, 19 Nov 1998 14:50:24 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 19 Nov 1998 14:49:38 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id OAA05688 for ; Thu, 19 Nov 1998 14:49:24 -0600 (CST) Original-Received: from beaver.jprc.com (BEAVER.JPRC.COM [207.86.147.217]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id PAA17383 for ; Thu, 19 Nov 1998 15:49:04 -0500 (EST) Original-Received: (from karl@localhost) by beaver.jprc.com (8.8.7/8.8.7) id PAA18259; Thu, 19 Nov 1998 15:48:35 -0500 Original-To: ding@gnus.org X-Face: "5(T0tZd{6}pd~YzBG8O/*EW,.]6]@`m^e;fv65W^Y&=d"M\1H}>T~4_.kcDD.O~y3k)a6h R;Nmi>9|>Nm${2IpM0^RcUEa\jcq?KOP)C&~x51l~zCHTulL^_T|u0I^kB'z@]{`2YjQu In-Reply-To: Colin Rafferty's message of "19 Nov 1998 12:09:32 -0500" Original-Lines: 60 User-Agent: Gnus/5.070051 (Pterodactyl Gnus v0.51) XEmacs/20.4 (Emerald) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:18953 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:18953 Colin Rafferty writes: > You could probably do something group-local with `gnus-signature-separator' > and `gnus-article-hide-signature'. Indeed, yes, and thanx. Those clues gave me something to work with, but unfortunately (or fortunately, as the case may be) they led me to discovering a couple odd bugs. First -- not a bug specifically, but something of an operational lack -- what I need is a means to add something to gnus-article-display-hook on a per-group basis. That is, I don't want signature hiding to be done anywhere but one particular group. This doesn't seem to exist in any form; trying to do it via either group properties with `G p' or by adding (local (var form)) in scorefiles doesn't give the right result: Both end up with buffer-local versions of gnus-article-display-hook, which are local to the *Summary* buffer, and seem to have no effect in the *Article* buffer. I can't even usefully set gnus-signature-separator via such mechanisms; edebug'ing through article-hide-signature shows (correctly, I suppose, but inconveniently) that the unmodified gnus-signature-separator is what's active in the *Article* buffer. But I can at least set gnus-signature-separator globally in .gnus, since its setting doesn't really conflict with anything elsewhere, and that's fine, I guess. So, second, I thought I'd try a different approach: Add or remove signature hiding to the global gnus-article-display-hook, on a per-group basis: (setq gnus-select-group-hook (function (lambda () (if (string-match "that.bad.mailing.list" gnus-newsgroup-name) (add-hook 'gnus-article-display-hook 'gnus-article-hide-signature t) (remove-hook 'gnus-article-display-hook 'gnus-article-hide-signature)) )) Wretched to look at, but seemingly workable. And in fact, at first glance it appears to do the right thing. However, with this in place, and thus with gnus-article-display-hook possibly altering slightly with each group entry, I've lost the ability to get a totally raw article via `C-u g'. I don't understand this one at all. I've just spent about 20 minutes with edebug'ing through gnus-summary-show-article, gnus-summary-select-article, and friends, trying to figure out what value of gnus-article-display-hook is in use at what points, and frankly I just don't get it. The best understanding I've gotten is that, at times, gnus-article-display-hook's value is a buffer-local value of '(gnus-article-hide-signature) all by itself; it doesn't seem to matter exactly, whether one has invoked `g' with an argument or not. The visual cue that something weird has happened is that, when using `C-u g', though signature hiding isn't done, nonetheless quotation coloring still happens, and most headers are still hidden. This affects all groups, once -hide-signature has been added once: Thereafter, while signature-hiding happens only in the affected group and nowhere else, I can't get a truly raw article in any group. --karl