From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78903 Path: news.gmane.org!not-for-mail From: Michael Piotrowski Newsgroups: gmane.emacs.gnus.general Subject: Re: setting face in gnus-user-format-function-x Date: Fri, 27 May 2011 11:44:27 +0200 Organization: dynalabs Network Research Unit Message-ID: References: <87sjs5thro.fsf@micropit.couberia.bzh> <877h9gpqnp.fsf@marauder.physik.uni-ulm.de> <87zkmaq4sj.fsf@micropit.couberia.bzh> <87r57mnf1c.fsf@marauder.physik.uni-ulm.de> <87r57kim68.fsf@micropit.couberia.bzh> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1306489621 23294 80.91.229.12 (27 May 2011 09:47:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 May 2011 09:47:01 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27203@lists.math.uh.edu Fri May 27 11:46:55 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 1QPtd8-0005ty-Bz for ding-account@gmane.org; Fri, 27 May 2011 11:46:54 +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 1QPtcc-0003hm-8O; Fri, 27 May 2011 04:46:22 -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 1QPtca-0003ha-J7 for ding@lists.math.uh.edu; Fri, 27 May 2011 04:46:20 -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 1QPtcY-0000z6-Go for ding@lists.math.uh.edu; Fri, 27 May 2011 04:46:19 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1QPtcV-0000dM-K6 for ding@gnus.org; Fri, 27 May 2011 11:46:15 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QPtcV-0005Zm-Hi for ding@gnus.org; Fri, 27 May 2011 11:46:15 +0200 Original-Received: from dhclient-212-35-25-32.flashcable.ch ([212.35.25.32]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2011 11:46:15 +0200 Original-Received: from mxp by dhclient-212-35-25-32.flashcable.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2011 11:46:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 37 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: dhclient-212-35-25-32.flashcable.ch User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (berkeley-unix) X-Face: %OvAx]kKl`N,i?yQ+$^p9w2oy)Yg|O}a_~6wtRQ@UTZ*(jSPubbonT]m++M>YBtJqkZZa!W"y5`aI.FoKO%$JHz=ws|i?y^o2bds(+pcp>gcX]H}?-tCzL^ABzJUWYzS{"!_hFg:JD)`kxRKLsNp X-Operating-System: NetBSD Cancel-Lock: sha1:rGvjksxGZr/g1W8QSdLE+BPhi1M= X-Spam-Score: -4.9 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78903 Archived-At: On 2011-05-27, pmlists@free.fr (Peter Münster) wrote: > On Thu, May 26 2011, Reiner Steib wrote: > >> You should use e.g. `%3{' and `%3}' _directly_ in >> `gnus-summary-line-format' after defining face `gnus-face-2' with >> `defface'. No need for a user-format-function. >> >> [ Re-reading you goal... Hm, maybe this is not sufficient for you. ] > > Indeed. I need something like "if" or "cond". Different faces for > different marks. I just ran into the same problem: I'm in the process of migrating my Gnus setup from XEmacs to FSF Emacs (as it seems unlikely that the XEmacs-related problems will be fixed) and I have a similar user format function. It works fine on XEmacs using extents, e.g., --8<---------------cut here---------------start------------->8--- ... (cond ((= message-day today) (setq my-ext (make-extent 0 10 message-date)) (set-extent-property my-ext 'duplicable t) (set-extent-face my-ext 'mxp-gnus-summary-today-face)) ... --8<---------------cut here---------------end--------------->8--- For FSF Emacs, I changed it to use text properties, but, as Peter noted, it seems that the face property is overwritten (other properties are preserved). Greetings -- Dr.-Ing. Michael Piotrowski, M.A. Public key at (ID 0x1614A044)