Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: faces
Date: Fri, 07 Feb 2003 19:35:06 +0900	[thread overview]
Message-ID: <yotlznp8bcpx.fsf@jpl.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]

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?


[-- Attachment #2: Type: message/rfc822, Size: 1991 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 17 bytes --]

Here's a patch:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1.2: Type: text/x-patch, Size: 1298 bytes --]

--- 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

             reply	other threads:[~2003-02-07 10:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-07 10:35 Katsumi Yamaoka [this message]
2003-02-07 12:44 ` faces Lars Magne Ingebrigtsen
2003-02-07 12:58   ` faces Katsumi Yamaoka
  -- strict thread matches above, loose matches on Subject: below --
1998-08-30  5:49 faces Phil Humpherys

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yotlznp8bcpx.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).