Gnus development mailing list
 help / color / mirror / Atom feed
From: "David Kågedal" <davidk@lysator.liu.se>
Subject: Re: How to hide Face header when creating message.
Date: Fri, 09 Jan 2004 08:36:18 +0100	[thread overview]
Message-ID: <871xq9y3nx.fsf@bix.grotte> (raw)
In-Reply-To: <874qv6rnxe.fsf@atia.com> (Nedko Arnaudov's message of "Fri, 09 Jan: 00:29 +0200")

Nedko Arnaudov <nedko.arnaudov@atia.com> writes:

> Hi,
> I've finally created color face image intended to appear in other
> people gnus-article-x-face-too-ugly variable :)
> I'm using posting styles to set it:
>
> (setq gnus-posting-styles
>       '((".*"
>          ("Face" (gnus-convert-png-to-face (expand-file-name "face.png"
>          (expand-file-name ".xemacs" "~")))))))
>
> But now when I create new messages, I have nearly half of my screen
> filled with Face header data (encoded). Is there any method to avoid
> this ?

With this code, I can add a simple "Face: <filename>" line and have
the filename expanded to a real image just before sending it.  It's
been a while since I last tried it, though.

(defun dk-expand-face ()
  (save-restriction
    (message-narrow-to-headers)
    (goto-char (point-min))
    (when (re-search-forward "^[fF]ace: *\\(.*\\)" nil t)
      (let ((file-name (match-string 1)))
        (if (file-exists-p file-name)
            (replace-match (save-match-data
                             (gnus-face-from-file file-name))
                           t t nil 1)
          (message-remove-header "Face"))))))

(add-hook 'message-send-hook 'dk-expand-face)

-- 
David Kågedal



  parent reply	other threads:[~2004-01-09  7:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-09  0:00 Nedko Arnaudov
2004-01-09  0:24 ` Adam Sjøgren
2004-01-09  7:36 ` David Kågedal [this message]
2004-01-09 22:00 ` Raymond Scholz

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=871xq9y3nx.fsf@bix.grotte \
    --to=davidk@lysator.liu.se \
    /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).