From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79378 Path: news.gmane.org!not-for-mail From: lee Newsgroups: gmane.emacs.gnus.general Subject: accessing article information Date: Wed, 06 Jul 2011 10:17:44 +0200 Organization: my virtual residence Message-ID: <87d3hng6vr.fsf@yun.yagibdah.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1309940349 21866 80.91.229.12 (6 Jul 2011 08:19:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 6 Jul 2011 08:19:09 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27674@lists.math.uh.edu Wed Jul 06 10:19:05 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QeNK4-0007Xd-OO for ding-account@gmane.org; Wed, 06 Jul 2011 10:19:05 +0200 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 1QeNIt-0000vv-8B; Wed, 06 Jul 2011 03:17:51 -0500 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 1QeNIr-0000vk-4i for ding@lists.math.uh.edu; Wed, 06 Jul 2011 03:17:49 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1QeNIp-0007D6-Uy for ding@lists.math.uh.edu; Wed, 06 Jul 2011 03:17:48 -0500 Original-Received: from static.103.179.46.78.clients.your-server.de ([78.46.179.103] helo=static.73.179.46.78.clients.your-server.de) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1QeNIn-0005Ej-7E for ding@gnus.org; Wed, 06 Jul 2011 10:17:45 +0200 Original-Received: from lee by yun.yagibdah.de with local (Exim 4.76) (envelope-from ) id 1QeNIm-0002oS-Dm for ding@gnus.org; Wed, 06 Jul 2011 10:17:44 +0200 Mail-Followup-To: ding@gnus.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin (3.3.1 2010-03-16) analysis follows Bayesian score: 0.0000 Ham tokens: 0.000-1861--6079h-0s--0d--H*u:Emacs, 0.000-1727--5642h-0s--0d--H*u:Gnus, 0.000-1654--5403h-0s--0d--H*u:linux, 0.000-1654--5403h-0s--0d--H*UA:linux, 0.000-1603--5237h-0s--0d--H*UA:gnu Spam tokens: 0.956-4284--1445h-52906s--0d--H*r:quimby.gnus.org, 0.926-245--194h-4054s--0d--H*r:sk:static., 0.883-1567--4194h-53201s--0d--HX-Spam-Relays-External:quimby.gnus.org, 0.883-1567--4194h-53201s--0d--H*RU:quimby.gnus.org, 0.882-1361--3797h-47630s--0d--H*Ad:D*gnus.org Autolearn status: no -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 2.0 HELO_DYNAMIC_IPADDR Relay HELO'd using suspicious hostname (IP addr 1) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:79378 Archived-At: Hi, how do you access information about an article from within a `gnus-user-format-function-*' called when generating the summary buffer? The documentation says: ,---- [ info (gnus) Summary Buffer Lines ] | `u' | User defined specifier. The next character in the format string | should be a letter. Gnus will call the function | `gnus-user-format-function-X', where X is the letter following | `%u'. The function will be passed the current header as argument. | The function should return a string, which will be inserted into | the summary just like information from any other summary specifier. `---- What does the header passed to the function look like? What I'm trying to do is to write a function to display article marks: (defun gnus-user-format-function-M (header) (let ( (str "#") ) (if (equal gnus-tmp-unread gnus-unread-mark) (setq str (concat str "U")) (setq str (concat str "~"))) (if (equal gnus-tmp-read gnus-read-mark) (setq str (concat str "R")) (setq str (concat str "~"))))) This function doesn't work. When I try to enter a group that calls it via "%uM" in `gnus-summary-line-format', gnus says "no unread news". Remove the second "if" statement and it works. I've searched the documentation, looked at the source and googled, and I haven't found out what's available in the ominous header passed to the function.