From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61857 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Re: set labels in nnml or nnfolder groups Date: Mon, 06 Feb 2006 14:22:27 +0100 Organization: Dept. of Theoretical Physics, University of Ulm Message-ID: References: <877j88zq93.fsf@mat.ucm.es> Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139232421 31620 80.91.229.2 (6 Feb 2006 13:27:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2006 13:27:01 +0000 (UTC) Original-X-From: ding-owner+m10387@lists.math.uh.edu Mon Feb 06 14:26:58 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F66O8-0002qX-GD for ding-account@gmane.org; Mon, 06 Feb 2006 14:26:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1F66Ni-0001tQ-00; Mon, 06 Feb 2006 07:26:15 -0600 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1F66Ky-0001tL-00 for ding@lists.math.uh.edu; Mon, 06 Feb 2006 07:23:24 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1F66Ks-00011o-Th for ding@lists.math.uh.edu; Mon, 06 Feb 2006 07:23:24 -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 1F66Kq-0007bk-00 for ; Mon, 06 Feb 2006 14:23:17 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1F66Ke-00020B-UL for ding@gnus.org; Mon, 06 Feb 2006 14:23:04 +0100 Original-Received: from bridgekeeper.physik.uni-ulm.de ([134.60.10.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 06 Feb 2006 14:23:04 +0100 Original-Received: from Reiner.Steib by bridgekeeper.physik.uni-ulm.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 06 Feb 2006 14:23:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Original-Lines: 75 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: bridgekeeper.physik.uni-ulm.de X-Face: 3Phac&+dw=IZHjhua]bp}LH<*p{qzj8u+8--- ;; Related URLs: ;; http://thread.gmane.org/m2n05mr2iv.fsf%40catbert.dok.org ;; http://www.fas.harvard.edu/computing/kb/kb1059.html ;; http://ilias.ca/blog/2005/09/gmail-labels-in-thunderbird.html (defcustom rs-gnus-summary-line-label-alist '(("Important" "Im") ("Work" "Wo") ("Personal" "Pe") ("To do" "TD") ("Later" "La") ("Need reply" "NR")) "Alist of regular expressions and summary line indicators." :group 'gnus-summary-format :type '(repeat (list (regexp :tag "Regexp") (string :tag "Indicator")))) ;;;###autoload (defun rs-gnus-summary-line-label (header) "Display label of message in summary line. This function is intended to be used in `gnus-summary-line-format-alist', with \(defalias 'gnus-user-format-function-X 'rs-gnus-summary-line-label). See (info \"(gnus)Group Line Specification\"). You need to add `X-Gnus-Label' to `nnmail-extra-headers' and `gnus-extra-headers', see Info node `(gnus)To From Newsgroups'." (let ((case-fold-search t) (label (or (cdr (assq 'X-Gnus-Label (mail-header-extra header))) "")) indicator) (mapc (lambda (el) (when (string-match (car el) label) (setq indicator (cadr el)))) rs-gnus-summary-line-label-alist) (if indicator indicator label))) ;;;###autoload (defun rs-gnus-summary-limit-to-label (regexp &optional not-matching) "Limit the summary buffer to articles that match a label." (interactive (list (read-string (format "%s label (regexp): " (if current-prefix-arg "Exclude" "Limit to"))) current-prefix-arg)) (gnus-summary-limit-to-extra 'X-Gnus-Label regexp not-matching)) (defalias 'gnus-user-format-function-label 'rs-gnus-summary-line-label) --8<---------------cut here---------------end--------------->8--- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/