I'm trying to set up notmuch
for sending and receiving my Gmail email, and I think notmuch
uses message-mode
for its reply function. I tried setting message-citation-line-function
to nil
, but replying still quotes the entire message with a >
prefix on each line. But that didn't work. How do I set it so that when I reply to a message, the sender's original message doesn't get quoted at all, in standard Gmail style?

- 12,019
- 43
- 69

- 4,111
- 16
- 53
-
1I don't use that utility, but a quick grep of the Emacs source code turned up some likely suspects -- the `message-cite-function` is frequently set to `'message-cite-original`; and there are a few alist for a variety of settings -- e.g., `message-cite-gmail-style`. Also of interest is `message-cite-style`. Sorry that I can't be more of assistance, but perhaps those variables will give you a lead in the right direction. – lawlist Aug 10 '15 at 16:39
-
Thanks. I tried changing all these variables to `message-cite-style-gmail` or to nil, but I was not able to get message-mode to remove the leading `>` at the beginning of each line. – incandescentman Aug 12 '15 at 18:43
-
For what it's worth, Gmail *does* quote the original message, it just does so by indenting with four spaces instead of using `>`. – Basil Jul 26 '17 at 17:06
-
None of this works. When I hit `r` on a message in notmuch there is no amount of `message-*` variables I can have set that will change the way it formats the message citations. – user5293 Apr 10 '20 at 18:08
1 Answers
The intended way to achieve Gmail-style citations is the following:
(with-eval-after-load 'message
(setq message-cite-style message-cite-style-gmail))
Inspecting the value and documentation of the alist message-cite-style-gmail
provides further insight into the involved settings:
(defconst message-cite-style-gmail
'((message-cite-function 'message-cite-original)
(message-citation-line-function 'message-insert-formatted-citation-line)
(message-cite-reply-position 'above)
(message-yank-prefix " ")
(message-yank-cited-prefix " ")
(message-yank-empty-prefix " ")
(message-citation-line-format "On %e %B %Y %R, %f wrote:\n"))
"Message citation style used by Gmail. Use with `message-cite-style'.")
The message-yank-*-prefix
variables are the most relevant to your question; see their documentation for more information.
Note also that message-cite-style-gmail
is only provided for convenience; you can of course customise any one of the variables involved individually or by setting message-cite-style
to a custom alist.
For completeness, see also the documentation of message-cite-style
:
message-cite-style
is a variable defined inmessage.el
.Documentation:
The overall style to be used when yanking cited text. Value is either
nil
(no variable overrides) or a let-style list of pairs(VARIABLE VALUE)
that will be bound inmessage-yank-original
to do the quoting.Presets to impersonate popular mail agents are found in the
message-cite-style-*
variables. This variable is intended for use ingnus-posting-styles
, such as:
((posting-from-work-p) (eval (setq-local message-cite-style message-cite-style-outlook)))
You can customize this variable.
This variable was introduced, or its default value was changed, in version 24.1 of Emacs.

- 12,019
- 43
- 69