Gnus development mailing list
 help / color / mirror / Atom feed
* faces
@ 2003-02-07 10:35 Katsumi Yamaoka
  2003-02-07 12:44 ` faces Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2003-02-07 10:35 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: faces
  2003-02-07 10:35 faces Katsumi Yamaoka
@ 2003-02-07 12:44 ` Lars Magne Ingebrigtsen
  2003-02-07 12:58   ` faces Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-02-07 12:44 UTC (permalink / raw)


Katsumi Yamaoka <yamaoka@jpl.org> writes:

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

I'd rather leave `post-command-hook' alone -- I've had some serious
problems messing with that variable before.

The problem here is basically that `gnus-article-wash-types' is
"global" to the article buffer, and not to the part that we're trying
to examine.  This also results in problems for the picon code, for
instance.  Wouldn't it be nice if we could find a way to, er, attach
that list to each rfc822 part?  I'm not quite sure how, though.  Text
properties?  An alist of part numbers to lists?  Uhm... put it in the
MIME properties?

Hm.

> P.S.  Is it nonsense if there are two or more Face headers?

No, having multiple X-Face headers is nice, but there should be only
one Face header.  It's big enough as it is...

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: faces
  2003-02-07 12:44 ` faces Lars Magne Ingebrigtsen
@ 2003-02-07 12:58   ` Katsumi Yamaoka
  0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2003-02-07 12:58 UTC (permalink / raw)


>>>>> In <m3d6m4clbg.fsf@quimbies.gnus.org>
>>>>>	Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:

>> [...] Though I think using the `post-command-hook' is not
>> rather well-mannered, who reads articles non-interactively? :-p

Lars> I'd rather leave `post-command-hook' alone -- I've had some serious
Lars> problems messing with that variable before.

Sure enough.

Lars> The problem here is basically that `gnus-article-wash-types' is
Lars> "global" to the article buffer, and not to the part that we're trying
Lars> to examine.  This also results in problems for the picon code, for
Lars> instance.  Wouldn't it be nice if we could find a way to, er, attach
Lars> that list to each rfc822 part?  I'm not quite sure how, though.  Text
Lars> properties?  An alist of part numbers to lists?  Uhm... put it in the
Lars> MIME properties?

Lars> Hm.

Okay, I'll look for better solution.  Using text properties is
one candidate also on my mind.

>> P.S.  Is it nonsense if there are two or more Face headers?

Lars> No, having multiple X-Face headers is nice, but there should be only
Lars> one Face header.  It's big enough as it is...

I see.  I wish there aren't those who add two or more Faces. :)
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* faces
@ 1998-08-30  5:49 Phil Humpherys
  0 siblings, 0 replies; 4+ messages in thread
From: Phil Humpherys @ 1998-08-30  5:49 UTC (permalink / raw)



I have a usenix face...  Is there a simple readme on how to turn
it into an acceptable X-face header, and then stick it in my
.emacs so that I can use it with gnus?  Also, how do I view
others' X-face?  I already have the compface and uncompface
binaries on my system...  I just don't know what key bindings or
commands to invoke to view them.

--
Phil Humpherys <phumpherys@utah-inter.net>   DriverSoft
Unix Systems Administrator                   Mobile: +1.801.725.3257 
WWW/PGPkeys: http://www.spire.com/~humphery



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-02-07 12:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-07 10:35 faces Katsumi Yamaoka
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

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