Gnus development mailing list
 help / color / mirror / Atom feed
From: Matt Pharr <mmp@graphics.stanford.edu>
Subject: Re: X-Face insertion
Date: 15 Oct 1999 12:46:17 -0700	[thread overview]
Message-ID: <kh0so3cqueu.fsf@abuffer.stanford.edu> (raw)
In-Reply-To: james@eecs.ukans.edu's message of "15 Oct 1999 14:40:58 -0500"


james@eecs.ukans.edu (Jerry James) writes:
> My old .gnus.el had this for inserting an X-Face header into outgoing
> news articles and mail messages, lifted directly from a sample .gnus.el
> on gnus.org:
> 
> (defun xface-insert ()
>   (nnheader-temp-write nil
>     (insert-file-contents "~/.xface")
>     (buffer-string)))
> 
> I then added (X-Face . xface-insert) to message-required-news-headers
> and message-required-mail-headers.  However, as the Changelog shows,
> nnheader-temp-write has been gone since pGnus 0.4.  What is The Right
> Way of doing this now?

I'm not sure what the proper way is, but I've been using the following for
some time, and it works great.  I'm not sure where this came from
originally; presumably one of the prolific contributors to this list.
Another option is to use gnus-posting-styles, IIRC.

It is probably a bug that this isn't covered in the documentation.  I'd
submit a doc patch, but am not confident enough that this is the most
elegant way to do it.

(defun message-insert-x-face ()
  (save-excursion
    (goto-char (point-min))
    (search-forward mail-header-separator)
    (beginning-of-line nil)
    (insert "X-Face: ")
    (insert-file (expand-file-name "/u/mmp/.xface"))))
(add-hook 'message-send-hook 'message-insert-x-face)

-matt 
-- 
Matt Pharr                                   mmp@graphics.stanford.edu
<URL:http://graphics.stanford.edu/~mmp>


  reply	other threads:[~1999-10-15 19:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-15 19:40 Jerry James
1999-10-15 19:46 ` Matt Pharr [this message]
1999-10-16 20:23   ` Arcady Genkin
1999-10-17  0:04     ` Andrew J Cosgriff
1999-10-17 14:41       ` luis fernandes
1999-10-18  5:36     ` Norbert Koch
1999-10-18 16:31       ` Arcady Genkin
1999-10-18 15:53         ` Norbert Koch
1999-10-18 23:04           ` Arcady Genkin
1999-11-06 22:03             ` Lars Magne Ingebrigtsen
1999-11-07  2:14 ` Jason R Mastaler

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=kh0so3cqueu.fsf@abuffer.stanford.edu \
    --to=mmp@graphics.stanford.edu \
    /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).