From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/35414 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: gnus-summary-execute-command Date: 19 Mar 2001 14:29:51 +0900 Organization: Emacsen advocacy group Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035171162 2957 80.91.224.250 (21 Oct 2002 03:32:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:32:42 +0000 (UTC) Cc: kawabata@exa.onlab.ntt.co.jp (KAWABATA, Taichi) Return-Path: Original-Received: (qmail 1011 invoked by alias); 19 Mar 2001 05:29:55 -0000 Original-Received: (qmail 1006 invoked from network); 19 Mar 2001 05:29:55 -0000 Original-Received: from clients.web-hosting.com (HELO jpl.org) (207.228.244.9) by gnus.org with SMTP; 19 Mar 2001 05:29:55 -0000 Original-Received: from yamaoka@jpl.org œby jpl.org (jpl.org [207.228.245.242]) (8.11.1/8.11.1) id f2J5Tsc17255 œMon, 19 Mar 2001 14:29:54 +0900 (JST) Original-To: ding@gnus.org X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/21.0.100 Original-Lines: 83 Xref: main.gmane.org gmane.emacs.gnus.general:35414 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:35414 --=-=-= Hi, I have a suggestion that the command `gnus-summary-execute-command' should work with the extra headers which is specified in `gnus-extra- headers' and/or `nnmail-extra-headers', for instance: (setq gnus-extra-headers '(To Newsgroups) nnmail-extra-headers gnus-extra-headers gnus-ignored-from-addresses "Katsumi Yamaoka") It is useful because of some mailing lists have their own identification only in the To field. Here is a patch for it: 2001-03-19 05:28:00 Katsumi Yamaoka * gnus-kill.el (gnus-execute): Work with the extra headers. * gnus-sum.el (gnus-summary-execute-command): Ditto. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=extra-headers.patch --- gnus-kill.el~ Sun Oct 29 21:57:13 2000 +++ gnus-kill.el Mon Mar 19 05:28:00 2001 @@ -641,18 +641,30 @@ marked as read or ticked are ignored." (save-excursion (let ((killed-no 0) - function article header) + function article header extras) (cond ;; Search body. ((or (null field) (string-equal field "")) (setq function nil)) ;; Get access function of header field. - ((fboundp - (setq function - (intern-soft - (concat "mail-header-" (downcase field))))) - (setq function `(lambda (h) (,function h)))) + ((cond ((fboundp + (setq function + (intern-soft + (concat "mail-header-" (downcase field))))) + (setq function `(lambda (h) (,function h)))) + ((when (setq extras + (member (downcase field) + (mapcar (lambda (header) + (downcase (symbol-name header))) + gnus-extra-headers))) + (setq function + `(lambda (h) + (gnus-extra-header + (quote ,(nth (- (length gnus-extra-headers) + (length extras)) + gnus-extra-headers)) + h))))))) ;; Signal error. (t (error "Unknown header field: \"%s\"" field))) --- gnus-sum.el~ Thu Mar 15 21:57:38 2001 +++ gnus-sum.el Mon Mar 19 05:28:00 2001 @@ -7409,9 +7409,11 @@ (list (let ((completion-ignore-case t)) (completing-read "Header name: " - (mapcar (lambda (string) (list string)) - '("Number" "Subject" "From" "Lines" "Date" - "Message-ID" "Xref" "References" "Body")) + (mapcar (lambda (header) (list (format "%s" header))) + (append + '("Number" "Subject" "From" "Lines" "Date" + "Message-ID" "Xref" "References" "Body") + gnus-extra-headers)) nil 'require-match)) (read-string "Regexp: ") (read-key-sequence "Command: ") --=-=-=--