Gnus development mailing list
 help / color / mirror / Atom feed
From: Dmitry Yaitskov <dimas@home.com>
Subject: Re: message-reply-to-function bug?
Date: 19 May 2000 15:07:07 -0400	[thread overview]
Message-ID: <87u2ful5pg.fsf@lucy.mtth1.on.wave.home.com> (raw)
In-Reply-To: Shenghuo ZHU's message of "19 May 2000 11:39:42 -0400"

Shenghuo ZHU <zsh@cs.rochester.edu> wrote:

> >>>>> "Dmitry" == Dmitry Yaitskov <dimas@home.com> writes:
> 
> Dmitry> Hi,
> 
> Dmitry> Info for message-reply-to-function says that it can return
> Dmitry> either a string which will be used as the To header, or a list
> Dmitry> of header-value pairs.
> 
> Info? Does Info tell message-reply-to-function?  
> 
> The docs say, "function that should return a list of headers.", which
> means the return value looks like ((Reply-To . "John Doe
> <doe@aa.com>") (From . "John Doe <john@bb.com>")), instead of a
> string.

Here's the info entry:

------------------- cut here -------------------
File: message,  Node: Reply,  Next: Wide Reply,  Prev: New News Message,  Up: Interface

Reply
=====

   The `message-reply' function pops up a message buffer that's a reply
to the message in the current buffer.

   Message uses the normal methods to determine where replies are to go
(*note Responses::.), but you can change the behavior to suit your needs
by fiddling with the `message-reply-to-function' variable.

   If you want the replies to go to the `Sender' instead of the `From',
you could do something like this:

     (setq message-reply-to-function
           (lambda ()
            (cond ((equal (mail-fetch-field "from") "somebody")
                    (mail-fetch-field "sender"))
                  (t
                   nil))))

   This function will be called narrowed to the head of the article
that is being replied to.

   As you can see, this function should return a string if it has an
opinion as to what the To header should be.  If it does not, it should
just return `nil', and the normal methods for determining the To header
will be used.

   This function can also return a list.  In that case, each list
element should be a cons, where the car should be the name of an header
(eg. `Cc') and the cdr should be the header value (eg.
`larsi@ifi.uio.no').  All these headers will be inserted into the head
of the outgoing mail.
------------------- cut here -------------------

Note the phrase "As you can see, this function should return a string
if it has an opinion as to what the To header should be." Where does
it say anything about a list?

(Perhaps my info entry is outdated... is it?)

> [...]
> 
> Dmitry> Which looks like a bug, at least in the docs. The following version
> Dmitry> works though:
> 
> Dmitry> (setq message-reply-to-function
> Dmitry>       (lambda ()
> Dmitry> 	(cond ((equal (mail-fetch-field "reply-to") "qq@aa.com")
> Dmitry> 	       (list (cons 'To (mail-fetch-field "from"))))
> Dmitry> 	      (t
> Dmitry> 	       nil))))
> 
> This function returns a list of headers.

-- 
Cheers,
-Dima.




  reply	other threads:[~2000-05-19 19:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-19 15:11 Dmitry Yaitskov
2000-05-19 15:39 ` Shenghuo ZHU
2000-05-19 19:07   ` Dmitry Yaitskov [this message]
2000-05-19 19:21     ` Shenghuo ZHU

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=87u2ful5pg.fsf@lucy.mtth1.on.wave.home.com \
    --to=dimas@home.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 NNTP newsgroup(s).