* Message mode Face and X-Face preview
@ 2006-11-24 17:40 Leo
2006-11-24 18:00 ` Zlatko Calusic
2006-11-24 18:13 ` Reiner Steib
0 siblings, 2 replies; 6+ messages in thread
From: Leo @ 2006-11-24 17:40 UTC (permalink / raw)
Hi there,
How can I display the picture of Face or X-Face in message mode
instead of the data? It is prettier, more intuitive and it takes up
less space.
This seems like a nice feature, so I post it to this group.
Thank you.
--
Leo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Message mode Face and X-Face preview
2006-11-24 17:40 Message mode Face and X-Face preview Leo
@ 2006-11-24 18:00 ` Zlatko Calusic
2006-11-24 18:13 ` Reiner Steib
1 sibling, 0 replies; 6+ messages in thread
From: Zlatko Calusic @ 2006-11-24 18:00 UTC (permalink / raw)
Cc: ding
Leo <sdl.web@gmail.com> writes:
> Hi there,
>
> How can I display the picture of Face or X-Face in message mode
> instead of the data? It is prettier, more intuitive and it takes up
> less space.
>
> This seems like a nice feature, so I post it to this group.
>
I can only agree with you. Had some thoughts of my own that feature
like that would be useful...
--
Zlatko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Message mode Face and X-Face preview
2006-11-24 17:40 Message mode Face and X-Face preview Leo
2006-11-24 18:00 ` Zlatko Calusic
@ 2006-11-24 18:13 ` Reiner Steib
2006-11-27 1:01 ` Leo
1 sibling, 1 reply; 6+ messages in thread
From: Reiner Steib @ 2006-11-24 18:13 UTC (permalink / raw)
On Fri, Nov 24 2006, Leo wrote:
> How can I display the picture of Face or X-Face in message mode
> instead of the data? It is prettier, more intuitive and it takes up
> less space.
At least in the development version you can hide (X-)Face them during
message composition. With `mml-preview' you can see the image(s).
> This seems like a nice feature, so I post it to this group.
Personally I don't see much need for this, but maybe someone else want
to implement it.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Message mode Face and X-Face preview
2006-11-24 18:13 ` Reiner Steib
@ 2006-11-27 1:01 ` Leo
2006-11-27 2:35 ` Leo
0 siblings, 1 reply; 6+ messages in thread
From: Leo @ 2006-11-27 1:01 UTC (permalink / raw)
On Friday, 24 Nov 2006, Reiner Steib wrote:
>
>> This seems like a nice feature, so I post it to this group.
>
> Personally I don't see much need for this, but maybe someone else want
> to implement it.
>
> Bye, Reiner.
I learned from article-display-face and made the following
function. It seems to work fine for me. Any comments?
(add-to-list 'message-hidden-headers "^Face:")
(add-hook 'message-setup-hook 'sdl-message-display-face)
(defun sdl-message-display-face ()
"Display any Face headers in the header."
(interactive)
(let (face png image)
(save-restriction
(mail-narrow-to-head)
(setq face (mail-fetch-field "Face")))
(when face
(when (setq png (gnus-convert-face-to-png face))
(setq image (gnus-create-image png 'png t))
(message-goto-from)
(message-beginning-of-line) (backward-char)
(gnus-add-image 'face image)
(gnus-put-image image nil 'face)))))
Thank you!
--
Leo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Message mode Face and X-Face preview
2006-11-27 1:01 ` Leo
@ 2006-11-27 2:35 ` Leo
2006-11-27 23:14 ` Leo
0 siblings, 1 reply; 6+ messages in thread
From: Leo @ 2006-11-27 2:35 UTC (permalink / raw)
On Monday, 27 Nov 2006, Leo wrote:
> (defun sdl-message-display-face ()
> "Display any Face headers in the header."
> (interactive)
> (let (face png image)
> (save-restriction
> (mail-narrow-to-head)
> (setq face (mail-fetch-field "Face")))
> (when face
> (when (setq png (gnus-convert-face-to-png face))
> (setq image (gnus-create-image png 'png t))
> (message-goto-from)
> (message-beginning-of-line) (backward-char)
> (gnus-add-image 'face image)
> (gnus-put-image image nil 'face)))))
Improved version:
(defun sdl-message-display-face ()
"Display any Face headers in the header."
(interactive)
(save-excursion
(let (faces)
(save-restriction
(mail-narrow-to-head)
(while (re-search-forward "^Face:" nil t)
(push (mail-header-field-value) faces)))
(message-goto-from)
(backward-char)
(let ((from (point)) png image)
(while faces
(when (setq png (gnus-convert-face-to-png (pop faces)))
(setq image (gnus-create-image png 'png t))
(goto-char from)
(gnus-add-image 'face image)
(gnus-put-image image nil 'face)))))))
--
Leo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Message mode Face and X-Face preview
2006-11-27 2:35 ` Leo
@ 2006-11-27 23:14 ` Leo
0 siblings, 0 replies; 6+ messages in thread
From: Leo @ 2006-11-27 23:14 UTC (permalink / raw)
On Monday, 27 Nov 2006, Leo wrote:
> On Monday, 27 Nov 2006, Leo wrote:
>
>> (defun sdl-message-display-face ()
>> "Display any Face headers in the header."
>> (interactive)
>> (let (face png image)
>> (save-restriction
>> (mail-narrow-to-head)
>> (setq face (mail-fetch-field "Face")))
>> (when face
>> (when (setq png (gnus-convert-face-to-png face))
>> (setq image (gnus-create-image png 'png t))
>> (message-goto-from)
>> (message-beginning-of-line) (backward-char)
>> (gnus-add-image 'face image)
>> (gnus-put-image image nil 'face)))))
>
[...]
It should be:
(defun sdl-message-display-face ()
"Display any Face headers in the header."
(interactive)
(save-excursion
(let (faces from)
(save-restriction
(mail-narrow-to-head)
(while (re-search-forward "^Face:" nil t)
(push (mail-header-field-value) faces)))
(goto-char (point-min))
(setq from (re-search-forward "^From:" nil t))
(when (and from faces)
(let (png image)
(while faces
(when (setq png (gnus-convert-face-to-png (pop faces)))
(setq image (gnus-create-image png 'png t))
(goto-char from)
(gnus-add-image 'face image)
(gnus-put-image image nil 'face))))))))
--
Leo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-11-27 23:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-24 17:40 Message mode Face and X-Face preview Leo
2006-11-24 18:00 ` Zlatko Calusic
2006-11-24 18:13 ` Reiner Steib
2006-11-27 1:01 ` Leo
2006-11-27 2:35 ` Leo
2006-11-27 23:14 ` Leo
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).