From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: Make `r` and `F` behave as `S L` when replying to a message from a mailing list
Date: Sat, 15 Nov 2014 14:20:40 +0100 [thread overview]
Message-ID: <87zjbszjkn.fsf__40503.4803240143$1416057626$gmane$org@debian.uxu> (raw)
In-Reply-To: mailman.13309.1415552050.1147.info-gnus-english@gnu.org
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!
> 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...
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) ))
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'. 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.)
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.
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 :)
--
underground experts united
prev parent reply other threads:[~2014-11-15 13:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 8:24 Make `r` and `F` behave as `S L` when replying to a message from a mailing list Denis Bitouzé
2014-11-06 15:08 ` Damien Wyart
2014-11-06 23:45 ` Emanuel Berg
2014-11-07 18:31 ` Denis Bitouzé
[not found] ` <545b8f0a$0$2898$426a34cc@news.free.fr>
[not found] ` <mailman.13094.1415342343.1147.info-gnus-english@gnu.org>
[not found] ` <545c8c5b$0$1989$426a74cc@news.free.fr>
[not found] ` <mailman.13173.1415386451.1147.info-gnus-english@gnu.org>
[not found] ` <87k336eru8.fsf@debian.uxu>
[not found] ` <mailman.13309.1415552050.1147.info-gnus-english@gnu.org>
2014-11-15 13:20 ` Emanuel Berg [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='87zjbszjkn.fsf__40503.4803240143$1416057626$gmane$org@debian.uxu' \
--to=embe8573@student.uu.se \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.