From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80112 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: special face for marks Date: Thu, 29 Sep 2011 04:41:55 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <878vp7lm70.fsf@lifelogs.com> References: <87sjs5thro.fsf@micropit.couberia.bzh> <87sjq3xpmn.fsf@micropit.couberia.bzh> <8739i2twd3.fsf@yun.yagibdah.de> <87fwm25yfr.fsf@micropit.couberia.bzh> <878vrunop4.fsf@yun.yagibdah.de> Reply-To: ding@gnus.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1317289373 11082 80.91.229.12 (29 Sep 2011 09:42:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 29 Sep 2011 09:42:53 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M28406@lists.math.uh.edu Thu Sep 29 11:42:49 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 1R9D8j-0004XV-4r for ding-account@gmane.org; Thu, 29 Sep 2011 11:42:49 +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 1R9D8J-00066U-Pi; Thu, 29 Sep 2011 04:42:23 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1R9D8I-00066H-0s for ding@lists.math.uh.edu; Thu, 29 Sep 2011 04:42:22 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R9D8D-0008GA-47 for ding@lists.math.uh.edu; Thu, 29 Sep 2011 04:42:21 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1R9D8A-0008Ib-Ac for ding@gnus.org; Thu, 29 Sep 2011 11:42:14 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R9D8A-0004JN-0V for ding@gnus.org; Thu, 29 Sep 2011 11:42:14 +0200 Original-Received: from 38.98.147.133 ([38.98.147.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Sep 2011 11:42:14 +0200 Original-Received: from tzz by 38.98.147.133 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Sep 2011 11:42:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 57 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.133 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:wI5iEZ9sqhjkPatInaXqea+Wo8Q= X-Spam-Score: -4.2 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80112 Archived-At: On Tue, 19 Jul 2011 19:51:51 +0200 lee wrote: l> (defun gnus-user-format-function-M (header) l> (let ( (str "|") ) l> (if (equal gnus-tmp-unread gnus-unread-mark) l> (setq str (concat str "U") ) ) l> (if (equal gnus-tmp-read gnus-read-mark) l> (setq str (concat str "R") ) ) l> (if (equal gnus-tmp-del gnus-del-mark) l> (setq str (concat "d" str) ) ) l> (if (equal gnus-tmp-read gnus-read-mark) l> (setq str (concat "R" str) ) ) l> (if (equal gnus-tmp-ancient gnus-ancient-mark) l> (setq str (concat "O" str) ) ) l> (if (equal gnus-tmp-killed gnus-killed-mark) l> (setq str (concat "K" str) ) ) l> (if (equal gnus-tmp-kill-file gnus-kill-file-mark) l> (setq str (concat "X" str) ) ) l> (if (equal gnus-tmp-low-score gnus-low-score-mark) l> (setq str (concat "Y" str) ) ) l> (if (equal gnus-tmp-catchup gnus-catchup-mark) l> (setq str (concat "C" str) ) ) l> (if (equal gnus-tmp-cancled gnus-cancled-mark) l> (setq str (concat "G" str) ) ) l> (if (equal gnus-tmp-sparse gnus-sparse-mark) l> (setq str (concat "Q" str) ) ) l> (if (equal gnus-tmp-duplicate gnus-duplicate-mark) l> (setq str (concat "M" str) ) ) l> (if (equal gnus-tmp-expirable gnus-expirable-mark) l> (setq str (concat "E" str) ) ) l> ) l> ) Without commenting on the marks themselves, just a note on the Lisp: it may be cleaner to write it like this: #+begin_src lisp (defun gnus-user-format-function-M (header) (concat "|" (mapconcat (lambda (mark-info) (let* ((s (car mark-info)) (tmp (intern (format "gnus-tmp-%s" s))) (mark (intern (format "gnus-%s-mark") s))) (when (equal (symbol-value tmp) (symbol-value mark)) (cdr mark-info)))) '((unread . "U") (read . "R") ;; ... the rest ) ""))) #+end_src I'm sure there's better ways but at least the repetition should be avoided. Ted