From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/49865 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: faces Date: Fri, 07 Feb 2003 19:35:06 +0900 Organization: Emacsen advocacy group Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1044614090 24857 80.91.224.249 (7 Feb 2003 10:34:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 7 Feb 2003 10:34:50 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18h5qL-0006Si-00 for ; Fri, 07 Feb 2003 11:34:49 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18h5rI-0003ZR-00; Fri, 07 Feb 2003 04:35:48 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 07 Feb 2003 04:36:44 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id EAA21211 for ; Fri, 7 Feb 2003 04:36:29 -0600 (CST) Original-Received: (qmail 36533 invoked by alias); 7 Feb 2003 10:35:28 -0000 Original-Received: (qmail 36527 invoked from network); 7 Feb 2003 10:35:27 -0000 Original-Received: from java.hostforweb.net (66.197.222.237) by 66.230.238.6 with SMTP; 7 Feb 2003 10:35:27 -0000 Original-Received: from yamaokac by java.hostforweb.net with local (Exim 3.36 #1) id 18h5qw-0002Mf-00 for ding@gnus.org; Fri, 07 Feb 2003 05:35:26 -0500 Original-To: ding@gnus.org Mail-Copies-To: never User-Agent: Gnus/5.090015 (Oort Gnus v0.15) XEmacs/21.4 (Portable Code, sparc-sun-solaris2.6) 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&( Cancel-Lock: sha1:/JPiQEZlpwcrpBJa0NCJXQXOjjQ= X-Hashcash: 030207:ding@gnus.org:9ebadcba7de0067a X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - java.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [32185 32192] / [32185 32192] X-AntiAbuse: Sender Address Domain - java.hostforweb.net Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:49865 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:49865 --=-=-= Hi, You probably see no X-Faces in this article. The truth is that Gnus should display two X-Faces; one is in the above header, another is in the following rfc822 part. What has occurred is that the `article-display-x-face' function displayed the X-Face in the rfc822 part and put the `xface' entry in the `gnus-article-wash-types' variable at the first time, so the function removed that face image at the second time. There's a solution in the following part. I'd like to do so in the CVS repository if there aren't better ideas. Though I think using the `post-command-hook' is not rather well-mannered, who reads articles non-interactively? :-p In addition, I'd also like to change the `article-display-face' function so that it can toggle displaying Faces. How do you think about them? By the way, I currently have no idea to toggle displaying Faces in rfc822 parts. Though it may not be impossible, it will scarcely be in demand. P.S. Is it nonsense if there are two or more Face headers? --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Date: Fri, 07 Feb 2003 19:17:10 +0900 Message-ID: From: Katsumi Yamaoka To: yamaoka@jpl.org Subject: a patch User-Agent: Gnus/5.090015 (Oort Gnus v0.15) XEmacs/21.4 (Portable Code, sparc-sun-solaris2.6) 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&( Cancel-Lock: sha1:WclKOoaRjQ4XleRJqZui6vW2Af8= X-Hashcash: 030207:yamaoka@jpl.org:84cb02394efc5db3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===-=-=" --===-=-= Here's a patch: --===-=-= Content-Type: text/x-patch Content-Disposition: inline --- gnus-art.el~ 2003-02-06 21:53:48 +0000 +++ gnus-art.el 2003-02-07 07:18:41 +0000 @@ -1931,6 +1931,14 @@ (gnus-add-image 'face image) (gnus-put-image image))))))) +(defvar gnus-article-preparing-faces-internal nil + "Internal variable used to say whether Face headers are being prepared.") + +(defun gnus-article-preparing-faces-done () + "Declare that preparing Face headers is done." + (remove-hook 'post-command-hook 'gnus-article-preparing-faces-done) + (setq gnus-article-preparing-faces-internal nil)) + (defun article-display-x-face (&optional force) "Look for an X-Face header and display it if present." (interactive (list 'force)) @@ -1939,11 +1947,14 @@ ;; Delete the old process, if any. (when (process-status "article-x-face") (delete-process "article-x-face")) - (if (memq 'xface gnus-article-wash-types) + (if (and (not gnus-article-preparing-faces-internal) + (memq 'xface gnus-article-wash-types)) ;; We have already displayed X-Faces, so we remove them ;; instead. (gnus-delete-images 'xface) ;; Display X-Faces. + (setq gnus-article-preparing-faces-internal t) + (add-hook 'post-command-hook 'gnus-article-preparing-faces-done) (let (x-faces from face) (save-excursion (when (and wash-face-p --===-=-=-- --=-=-=--