* Make `r` and `F` behave as `S L` when replying to a message from a mailing list @ 2014-11-06 8:24 Denis Bitouzé 2014-11-06 15:08 ` Damien Wyart ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Denis Bitouzé @ 2014-11-06 8:24 UTC (permalink / raw) To: help-gnu-emacs-mXXj517/zsQ Hi, I've just been told that when I reply (`r` or `F`) to a message from a mailing list, the `To` is the original message sender's address instead of the mailing list address, the latter being in the `Cc` field. It appears that it should be enough to use `S L` to get the expected behavior (the mailing list address in the `To` field, nothing in `Cc`), but I'd like a unique keybinding for all the "reply" actions. Hence my question: how could I make `r` and `F` behave as `S L` when replying to a message from a mailing list? Thanks in anticipation. -- Denis ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Make `r` and `F` behave as `S L` when replying to a message from a mailing list 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 [not found] ` <545b8f0a$0$2898$426a34cc@news.free.fr> 2 siblings, 0 replies; 5+ messages in thread From: Damien Wyart @ 2014-11-06 15:08 UTC (permalink / raw) To: help-gnu-emacs [ copy & fu2 gnus.emacs.gnus] * Denis Bitouzé <dbitouze@wanadoo.fr> in gnu.emacs.help: > I've just been told that when I reply (`r` or `F`) to a message from > a mailing list, the `To` is the original message sender's address > instead of the mailing list address, the latter being in the `Cc` > field. > It appears that it should be enough to use `S L` to get the expected > behavior (the mailing list address in the `To` field, nothing in > `Cc`), but I'd like a unique keybinding for all the "reply" actions. > Hence my question: how could I make `r` and `F` behave as `S L` when > replying to a message from a mailing list? If the lists have their own Gnus groups, I think the simplest solution is to play with the corresponding group parameter to-address (and broken-reply-to if needed). See: https://www.gnu.org/software/emacs/manual/html_node/gnus/Group-Parameters.html Else writing a custom replying function might be needed but I don't think there exists a predefined funtion to check if a message is from a mailing-list (checking List-Id and X-Mailing-List might be enough, though). -- DW ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Make `r` and `F` behave as `S L` when replying to a message from a mailing list 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> 2 siblings, 1 reply; 5+ messages in thread From: Emanuel Berg @ 2014-11-06 23:45 UTC (permalink / raw) To: help-gnu-emacs Denis Bitouzé <dbitouze@wanadoo.fr> writes: > I've just been told that when I reply (`r` or `F`) > to a message from a mailing list, the `To` is the > original message sender's address instead of the > mailing list address, the latter being in the `Cc` > field. > > It appears that it should be enough to use `S L` to > get the expected behavior (the mailing list address in > the `To` field, nothing in `Cc`), but I'd like a > unique keybinding for all the "reply" actions. > > Hence my question: how could I make `r` and `F` behave > as `S L` when replying to a message from a mailing > list? I just read this on gnu.emacs.gnus - where it was quoted (although that message was a bit confusing as well :) - did you see it? You are using Gnus, so why not use the mailing lists as newsgroups? Or do you use mailing lists that aren't available as newsgroups, and then mail-split them to sort-of newsgroups? But it doesn't really matter - if you found that `S L' works (`S L' is `gnus-summary-reply-to-list-with-original'), why don't you just bind it to a shorter keystroke? Or do you want it to be exactly `r' and `F', but have them work transparently based on "is it a private mail, or is it a listbot mail" DWIM-style? That would have to involve extracting this from the headers somehow if Gnus isn't capable to do this already. In either case, isn't it a lot of work for such a small gain? Why don't use `S L', or rebind it to a single key? -- underground experts united ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Make `r` and `F` behave as `S L` when replying to a message from a mailing list 2014-11-06 23:45 ` Emanuel Berg @ 2014-11-07 18:31 ` Denis Bitouzé 0 siblings, 0 replies; 5+ messages in thread From: Denis Bitouzé @ 2014-11-07 18:31 UTC (permalink / raw) To: help-gnu-emacs-mXXj517/zsQ Le 07/11/14 à 00h45, Emanuel Berg <embe8573-oe7qfRrRQfc4M/bo5TPICw@public.gmane.org> a écrit : > Denis Bitouzé <dbitouze-39ZsbGIQGT5GWvitb5QawA@public.gmane.org> writes: > >> I've just been told that when I reply (`r` or `F`) >> to a message from a mailing list, the `To` is the >> original message sender's address instead of the >> mailing list address, the latter being in the `Cc` >> field. >> >> It appears that it should be enough to use `S L` to >> get the expected behavior (the mailing list address in >> the `To` field, nothing in `Cc`), but I'd like a >> unique keybinding for all the "reply" actions. >> >> Hence my question: how could I make `r` and `F` behave >> as `S L` when replying to a message from a mailing >> list? > > I just read this on gnu.emacs.gnus - where it was > quoted Quoted? > (although that message was a bit confusing as well :) Did I something wrong? :) > - did you see it? > > You are using Gnus, so why not use the mailing lists > as newsgroups? See below. > Or do you use mailing lists that aren't available as > newsgroups, and then mail-split them to sort-of > newsgroups? Indeed: I receive them in my main INBOX. > But it doesn't really matter - if you found that `S L' > works (`S L' is > `gnus-summary-reply-to-list-with-original'), why don't > you just bind it to a shorter keystroke? Indeed, but I'd like a single keybinding for all the "reply" actions. > Or do you want it to be exactly `r' and `F', but have > them work transparently based on "is it a private > mail, or is it a listbot mail" DWIM-style? Exactly! :) > That would have to involve extracting this from the > headers somehow if Gnus isn't capable to do this > already. As answered to Damien, a further check at the list's headers puzzled me: `Reply-To:` is the list address, not the sender's one. Why Gnus doesn't take it into account when I reply with `r` or `F`? > In either case, isn't it a lot of work for such a small gain? I'm so lazy that I love work hard in order to be able to be (lazy) ;) > Why don't use `S L', Because I'm likely to forget to use this different keybinding when appropriate. > or rebind it to a single key? Okay, but I'd like it to be one the "usual" ones: `r` or `F`. -- Denis ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <545b8f0a$0$2898$426a34cc@news.free.fr>]
[parent not found: <mailman.13094.1415342343.1147.info-gnus-english@gnu.org>]
[parent not found: <545c8c5b$0$1989$426a74cc@news.free.fr>]
[parent not found: <mailman.13173.1415386451.1147.info-gnus-english@gnu.org>]
[parent not found: <87k336eru8.fsf@debian.uxu>]
[parent not found: <mailman.13309.1415552050.1147.info-gnus-english@gnu.org>]
* Re: Make `r` and `F` behave as `S L` when replying to a message from a mailing list [not found] ` <mailman.13309.1415552050.1147.info-gnus-english@gnu.org> @ 2014-11-15 13:20 ` Emanuel Berg 0 siblings, 0 replies; 5+ messages in thread From: Emanuel Berg @ 2014-11-15 13:20 UTC (permalink / raw) To: help-gnu-emacs 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-11-15 13:20 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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).