From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/16284 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.gnus.user Subject: Article: Toggle headers visibility Date: Fri, 17 May 2013 01:42:40 +0200 Organization: Aioe.org NNTP Server Message-ID: <87obcav6dr.fsf@VLAN-3434.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1368747917 17431 80.91.229.3 (16 May 2013 23:45:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 May 2013 23:45:17 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Fri May 17 01:45:19 2013 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ud7rI-0003NL-Dq for gegu-info-gnus-english@m.gmane.org; Fri, 17 May 2013 01:45:16 +0200 Original-Received: from localhost ([::1]:48909 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud7rI-0000q8-1r for gegu-info-gnus-english@m.gmane.org; Thu, 16 May 2013 19:45:16 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 46 Original-NNTP-Posting-Host: SWN/nubmpQxYKwY7hPy4YA.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:IzxknyabtGM2HsQtvpAuxHmOOLU= Original-Xref: usenet.stanford.edu gnu.emacs.gnus:87411 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:16284 Archived-At: I'm trying to get the headers not to show (none of them). This I managed to do with the call below marked with [1]. (The code is pasted last.) But, sometimes I need the data in the headers: 1) Are those stored in local variables? If so, that would be easier, to write access defuns like `kill-article-author' and the like. 2) If not, I'd like to strike a command, view the headers (some of them), move point (etc.), and get them. So I wrote the defun at [2]. That actually works, only I have to read the article again manually from the summary - is there a way to do it programatically, like `gnus-article-redraw' or something? But, once I've done that, I try to hide the headers again. But, then, the defun at [3] won't have any affect (or rather, the highlight of the From header face changes - ? - that's all). But, didn't it work the first time around? I'm pretty confused by this, so any explanations would be great. If you have another solution to this problem, I'd be happy to read that, as well. Cheers. The code: ;;; headers ;; won't work the second time - [3] (defun gnus-article-hide-headers () "Hide all headers when showing an article." (interactive) (setq gnus-visible-headers "^XXX") ) ;; works - [2] (defun gnus-article-show-some-headers () "Show those headers that I've needed so far." (interactive) (setq gnus-visible-headers "^From:\\|^Newsgroups:") ) (gnus-article-hide-headers) ; first, the XXX method works [1] (defalias 'hide-headers 'gnus-article-hide-headers) (defalias 'show-headers 'gnus-article-show-some-headers) -- Emanuel Berg - programmer (hire me! CV below) computer projects: http://user.it.uu.se/~embe8573 internet activity: http://home.student.uu.se/embe8573