From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/82264 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.gnus.general Subject: Re: Summary line format and gnus-face-X Date: Thu, 06 Sep 2012 15:31:52 +0200 Message-ID: <85ipbruvaz.fsf@iznogoud.viz> References: <87d3393iud.fsf@thinkpad.tsdh.de> <87mx15ifog.fsf@gnus.org> <87pq612cuj.fsf@thinkpad.tsdh.de> <87sjawd3ak.fsf@gnus.org> <87r4qg1qmr.fsf@thinkpad.tsdh.de> <87d320783z.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1346938662 12573 80.91.229.3 (6 Sep 2012 13:37:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Sep 2012 13:37:42 +0000 (UTC) Cc: Tassilo Horn , ding@gnus.org To: Lars Ingebrigtsen Original-X-From: ding-owner+M30531@lists.math.uh.edu Thu Sep 06 15:37:43 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T9cH7-0007kg-Uv for ding-account@gmane.org; Thu, 06 Sep 2012 15:37:42 +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 1T9cGn-0007iS-I8; Thu, 06 Sep 2012 08:37:21 -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 1T9cGl-0007iA-No for ding@lists.math.uh.edu; Thu, 06 Sep 2012 08:37:19 -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 1T9cGj-0000vf-QQ for ding@lists.math.uh.edu; Thu, 06 Sep 2012 08:37:19 -0500 Original-Received: from mx03.lb01.inode.at ([62.99.145.3] helo=mx.inode.at) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1T9cGh-00047h-Rp; Thu, 06 Sep 2012 15:37:16 +0200 Original-Received: from [91.119.101.188] (port=8907 helo=iznogoud.viz) by smartmx-03.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1T9cGc-0002Fj-NP; Thu, 06 Sep 2012 15:37:10 +0200 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1T9cGa-00013R-D3; Thu, 06 Sep 2012 15:37:08 +0200 Mail-Followup-To: Lars Ingebrigtsen , Tassilo Horn , ding@gnus.org User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:82264 Archived-At: On Wed, Sep 05 2012, Lars Ingebrigtsen wrote: > Tassilo Horn writes: > >> That's nice for (2), but bad for (1). Now I can have >> colorized/boldified subjects with proportional fonts, but my column >> separators and stuff are also mangled which I don't want. > > The problem is really more practical than theoretical. Emacs doesn't > provide "combining" faces when using text properties. You can put > overlays over text (say, italic and then green), but you can't do that > with text properties. So Gnus has the option of either overwriting your > carefully chosen faces, or not touching them, and there isn't much of a > third choice. > > Until Emacs implements combining `face' text properties, which is > something that I really really really want to have. Overlays are yucky. What's the difference to using list of faces as the `face' text property, i.e., addressing something like Tassilo's use-case: (defun gnus-combine-text-property (beg end prop val) "Combine PROP with text properties between BEG and END. This combines attributes if PROP is `face' otherwise this is just like `put-text-property', more or less. Beware: Proof-of-concept." (let ((b beg)) (while (< b end) (let ((oldval (get-text-property b prop))) (gnus-put-text-property b (setq b (next-single-property-change b prop nil end)) prop (cond ((or (not (eq prop 'face)) (null oldval)) val) ((and (consp oldval) (not (keywordp (car oldval)))) (cons val oldval)) (t (list val oldval)))))))) (fset 'gnus-put-text-property-excluding-characters-with-faces 'gnus-combine-text-property) ;; So, in my case, the face text property in the subject of an unread ;; article is (gnus-summary-normal-unread variable-pitch) and when ;; selected it becomes (gnus-summary-normal-read gnus-summary-normal-unread variable-pitch). ;; For each attribute, the first non-`unspecified' value of a face in ;; the list wins. (setq gnus-face-9 'variable-pitch) (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-23,23f%]%) %9{%s%} ")