info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make `r` and `F` behave as `S L` when replying to a message from a m


From: Denis Bitouzé
Subject: Re: Make `r` and `F` behave as `S L` when replying to a message from a mailing list
Date: Mon, 17 Nov 2014 14:07:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Le 15/11/14 à 14h20, Emanuel Berg <embe8573@student.uu.se> a écrit :

> Denis Bitouzé <dbitouze@wanadoo.fr> writes:
>
>> Meanwhile, I noticed that `R` gives the expected
>> result (To: is the mailing address). But what is
>> still annoying me is to be careful to the keybinding
>> I have to use depending on whether I'm answering a
>> mail or a usenet article.
>
> Yes, I agree that isn't good. In terms of programming,
> it is super-easy to fix as well. It is more an issue
> of knowing the domains (mails, listbots, news, and
> Gnus), which might not be that easy... like, at all!

I can understand.

>> Unfortunately, elisp is not my mother tongue.
>> Suppose I'd like to use `R` as unique keybinding
>> both in `debian.user` group (mailing list) and in
>> `nntp+gmane:gmane.emacs.gnus.user` group (usenet
>> forum), what would be the corresponding code?
>
> Again, Elisp doesn't have to be your mother tongue for
> this. However, if you are a perfectionist (as I am, so
> I'm not criticizing) perhaps you should make it your
> mother tongue...

Well, in another life, maybe ;)

> But try this:
>
> (require 'gnus-msg)
>
> (defun gnus-article-reply-dwim ()
>   (interactive)
>   (if (gnus-article-header-value "X-Mailing-List")
>       (gnus-summary-reply-to-list-with-original 1)
>     (gnus-article-followup-with-original) ))
>
> (defun gnus-article-header-value (header)
>   "Get the value of HEADER for the current article."
>   (with-current-buffer gnus-original-article-buffer
>     (gnus-fetch-field header) ))

With which keybinding?

> I just wrote and tried it, and it worked for
> debian.user (mailing list), alt.test (newsgroup), and
> a couple of inbox love letters (ordinary mail). It
> will work for ordinary mails and newsgroups, because
> that is the plain old
> `gnus-article-followup-with-original'.

Well,

- for mailing lists, `F` doesn't work (ML address in CC only) and `R`
  does work,
- for newsgroups, `F` does work and `R` doesn't work (I'm asked if
  I really want to reply by mail to article author),
- for love letters, I cannot test (I receive too much of them, hence
  considered as spam and automatically deleted),
- for break-off letters, `F` and `R` do work but behave differently: the
  sender's address is in TO but `F` adds my address in CC.

> However I'm not sure if all mailing lists respect the X-Mailing-List
> header...? (Could be a place to add more such tests and OR them.)

Maybe that's the point.

> Also, I don't know what the 1 argument to
> `gnus-summary-reply-to-list-with-original' means
> because that isn't in the documentation, and I didn't
> feel like tracing it. It probably (?) has to do with
> doing things to several messages. I don't know if that
> should be 0 or 1 in this case.

Unfortunately, I cannot help.

> Last, `gnus-summary-reply-to-list-with-original' is in
> gnus-msg, and not gnus-sum. Just mentioning it as it
> looks a bit confusing :)

Not more confusing than the rest ;)
-- 
Denis




reply via email to

[Prev in Thread] Current Thread [Next in Thread]