Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: info-gnus-english@gnu.org
Subject: Re: Make `r` and `F` behave as `S L` when replying to a message from a mailing list
Date: Mon, 17 Nov 2014 23:09:39 +0100	[thread overview]
Message-ID: <87a93po4ws.fsf@debian.uxu> (raw)
In-Reply-To: <mailman.13874.1416229661.1147.info-gnus-english@gnu.org>

Denis Bitouzé <dbitouze@wanadoo.fr> writes:

>> 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 ;)

I'm saying, if you get bugged by details, it is a good
idea to start working on how to fix them, because if
you cannot there are a zillion details to bug you.

> With which keybinding?

gnus-article-reply-dwim is what you want to use. It is
the one defun interactive so the only one that can be
called with a keybinding or from the M-x prompt.

If you want to play with it, here is how to set it to
"R" (note: capital) in `gnus-article-mode-map' - if it
works, perhaps should be made available from
`gnus-summary-mode' (`gnus-summary-mode-map') as
well...

(define-key gnus-article-mode-map "R" 'gnus-article-reply-dwim)

> - 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.

Yes, that all the base functionality is already there
makes this a good case to do a DWIM command, the only
thing that command will do is to determine the state
and then use another command that is already
implemented and tested and documented (well, almost).

>> 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.

Feel free to add more test (or test1 test1 ... testn)
if the X-Mailing-List header isn't always there
(perhaps it is, even). The gnus-article-header-value I
also provided can be used to extract header values, or
nil if the header isn't there.

>> 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.

Yes you can, start using it and report back if it
doesn't work. But I know this it should be a 0, not a
1, so change that. I.e.:

(defun gnus-article-reply-dwim ()
  (interactive)
  (if (gnus-article-header-value "X-Mailing-List")
      (gnus-summary-reply-to-list-with-original 0)
    (gnus-article-followup-with-original) ))

>> 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 ;)

The confusing this is that
`gnus-summary-reply-to-list-with-original' has the
gnus-summary prefix, but it is in the gnus-msg Elisp
file (the "require" stuff in the code). Emacs has a
single namespace, which is why people insist on long
prefixes to avoid collisions. Like if all package
coders named their stuff get-data, that would be a
mess instantly. But gnus-whatever-get-data,
gnus-something-else-get-data,
something-completely-different-get-data, in the
beginning it feels funky especially if you come from a
language like C with very short names, but if you do
it enough you start to like it. So it doesn't only
make sense, it is deceitful as well...

-- 
underground experts united
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

      parent reply	other threads:[~2014-11-17 22:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m3vbmsvisc.fsf@example.com>
2014-11-06 15:08 ` Damien Wyart
2014-11-07  6:38   ` Denis Bitouzé
     [not found]   ` <mailman.13094.1415342343.1147.info-gnus-english@gnu.org>
2014-11-07  9:09     ` Damien Wyart
2014-11-07 18:53       ` Denis Bitouzé
     [not found]       ` <mailman.13173.1415386451.1147.info-gnus-english@gnu.org>
2014-11-07 19:25         ` Emanuel Berg
2014-11-09 16:53           ` Denis Bitouzé
     [not found]           ` <mailman.13309.1415552050.1147.info-gnus-english@gnu.org>
2014-11-15 13:20             ` Emanuel Berg
2014-11-17 13:07               ` Denis Bitouzé
     [not found]               ` <mailman.13874.1416229661.1147.info-gnus-english@gnu.org>
2014-11-17 22:09                 ` 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=87a93po4ws.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --cc=info-gnus-english@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.
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).