From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64108 Path: news.gmane.org!not-for-mail From: Ted Stern Newsgroups: gmane.emacs.gnus.general Subject: hiding long To and Cc headers in *Article* buffer Date: Wed, 13 Dec 2006 11:53:15 -0800 Organization: The Boeing Company Message-ID: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1166039689 26330 80.91.229.10 (13 Dec 2006 19:54:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Dec 2006 19:54:49 +0000 (UTC) Original-X-From: ding-owner+M12631@lists.math.uh.edu Wed Dec 13 20:54:48 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by dough.gmane.org with esmtp (Exim 4.50) id 1GuaBi-0002Tw-35 for ding-account@gmane.org; Wed, 13 Dec 2006 20:54:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1GuaB7-0004At-Dz; Wed, 13 Dec 2006 13:54:09 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1GuaB5-0004AX-KD for ding@lists.math.uh.edu; Wed, 13 Dec 2006 13:54:07 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.63) (envelope-from ) id 1GuaB1-0004vb-Hf for ding@lists.math.uh.edu; Wed, 13 Dec 2006 13:54:07 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1GuaB0-0002AY-00 for ; Wed, 13 Dec 2006 20:54:02 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GuaAZ-0005I2-BG for ding@gnus.org; Wed, 13 Dec 2006 20:53:35 +0100 Original-Received: from orca.drizzle.com ([216.162.192.15]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Dec 2006 20:53:35 +0100 Original-Received: from dodecatheon by orca.drizzle.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Dec 2006 20:53:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 128 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: orca.drizzle.com User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.91 (gnu/linux) Cancel-Lock: sha1:3IFmzfLw9qQTFIaMEK7X1K+NEmE= X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:64108 Archived-At: --=-=-= Content-Type: text/plain Hi all, At my extremely large and MS-centric company there is an ingrained and uncorrectable habit of maintaining explicit mailing lists in MS Outlook, and putting the entire mailing list explicitly into the To: or Cc: fields. When I receive these messages in Gnus, I have to scroll down for several pages to actually see the text (which is usually much shorter than the address list!). Before I got added onto one of these mailing lists, I never needed to worry about it and was happily setting gnus-visible-headers to a certain regular expression. But now ... What I'm looking for is either (1) some sort of "washing" method to remove just the To and Cc fields or (2) toggle gnus-visible-headers to a regexp that does not include To or CC. As a hack, I came up with something for 2, but my elisp skills are rudimentary and I'm getting the commandp syntax wrong. Any advice on fixing my solution or getting a (1)-style solution would be much appreciated! Thanks, Ted -- dodecatheon at gmail dot com Frango ut patefaciam -- I break so that I may reveal --=-=-= Content-Type: application/x-emacs-lisp Content-Disposition: inline; filename=.gnus-vis-headers Content-Transfer-Encoding: quoted-printable Content-Description: gnus-visible-headers toggle function, broken (defun my-gnus-set-visible-headers (&optional arg) "Set gnus-visible-headers to display a reasonable set of headers. If argument is entered, hide To and Cc headers." (if arg (setq gnus-visible-headers (concat "^\\(" (regexp-opt '( "Apparently-To" "Bcc" "Content-Type" "Date" "Fcc" "Followup-To" "From" "Gcc" "Gnus-Warning" "Keywords" "Mail-Copies-To" "Mail-Followup-To" "Message-ID" "Newsgroups" "Organization" "Posted-To" "Reply-To" "Resent-From" "Subject" "Summary" "User-Agent" "X-Keywords" "X-Mailer" "X-Report-\\(un\\)?spam" "X-Sent" "X-\\(Cray\\|My\\|Uwash\\)-[^:]*" )) "\\):" ) ) (setq gnus-visible-headers (concat "^\\(" (regexp-opt '( "Apparently-To" "Bcc" "Cc" "Content-Type" "Date" "Fcc" "Followup-To" "From" "Gcc" "Gnus-Warning" "Keywords" "Mail-Copies-To" "Mail-Followup-To" "Message-ID" "Newsgroups" "Organization" "Posted-To" "Reply-To" "Resent-From" "Subject" "Summary" "To" "User-Agent" "X-Keywords" "X-Mailer" "X-Report-\\(un\\)?spam" "X-Sent" "X-\\(Cray\\|My\\|Uwash\\)-[^:]*" )) "\\):" ) ) )) ;; run the function with no arguments (my-gnus-set-visible-headers nil) (define-key gnus-summary-mode-map (kbd "C-c h") 'my-gnus-set-visible-header= s) ;; ;; Local Variables: ;; mode: emacs-lisp ;; End: --=-=-=--