unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: hooks and mail
Date: Mon, 01 Dec 2003 14:50:46 -0700	[thread overview]
Message-ID: <3FCBB7B6.1090801@yahoo.com> (raw)
In-Reply-To: 87u14l4gk1.fsf@WOtiscaNUITEli.KUREit

Guldo K wrote:
 > Franc,ois Fleuret <francois.fleuret@inria.fr> writes:
 >>>(add-hook 'vm-mail-hook
 >>>  '(lambda()
 >>>    (setq mail-default-reply-to "me@host.xyz")
 >>>  )
 >>>)
 >>>
 >>I guess you should remove the ' before the function definition (at
 >>least I dont have it in my own hook definitions).

Yes, lambda is self-quoting.

 > It does not work.
 >
 > In fact, what I'm trying to achieve is: set reply-to to the active
 > user-mail-address, whenever I start composing a new message.  (or a
 > reply, or a follow-up) So that if I change user-mail-address while vm
 > is open, and then I compose a new message, this new message has
 > already a right reply-to field in its header.

It might be that since vm-mail-hook is run after the composition buffer
is created, it is too late to specify mail-default-reply-to for the
intended effect.  How about this instead:

(defadvice vm-mail-internal (before mail-default-reply-to activate)
   "Set `mail-default-reply-to' to `user-mail-address'."
   (setq mail-default-reply-to user-mail-address))

-- 
Kevin Rodgers

      reply	other threads:[~2003-12-01 21:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-30 16:54 hooks and mail Guldo K
2003-11-30 18:59 ` François Fleuret
2003-11-30 23:00   ` Guldo K
2003-12-01 21:50     ` Kevin Rodgers [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=3FCBB7B6.1090801@yahoo.com \
    --to=ihs_4664@yahoo.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).