unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>
To: Aaron Ecay <ecay@sas.upenn.edu>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH v3 5/5] emacs: Use message-citation-line-format in reply
Date: Fri, 20 Jan 2012 10:22:09 -0700	[thread overview]
Message-ID: <CAMoJFUumHxLK8B1O99=t80C2X4-Z_hR0rOh83Ktk-192PB0uxA@mail.gmail.com> (raw)
In-Reply-To: <m2mx9i3onw.fsf@wal122.wireless-pennnet.upenn.edu>

Erk, forgot to reply-all.  Aaron might get this twice.

On Thu, Jan 19, 2012 at 22:53, Aaron Ecay <ecay@sas.upenn.edu> wrote:
> (let ((message-citation-line-format
>       (remove ?\n message-citation-line-format)))
>  ...)
>
> (Or, if you think someone might have a newline other than at the end of
> the string, you could do something a little more complicated to remove
> only a newline at the end.)

I did something like this initially, to make the test pass, but my
thought is that some people might intend for that newline to be there
and we shouldn't be removing it.  Perhaps I'm being overly sensitive
to people with odd setups ;-).

> Or you could introduce a new defcustom
> ‘notmuch-message-citation-line-format’ (with newline-less default), and
> let-bind m-l-c-f to that value.  But that is pretty ugly – we don’t want
> to have to “wrap” every variable whose default we don’t like.

Agreed, not a good solution.

> I’m personally of the opinion that notmuch should just say “the mail
> composition facility is provided by message mode (here is the
> documentation on customizing it)”.  Message mode is 8,000 lines of
> elisp.  We have the choice to:
> - write our own message composition mode
> - wrap (as explained above) the default message-mode variables we don’t
>  like in notmuch-prefixed variants, with suitable let-bindings.
> - use only the parts of message-mode that we like
> - pass composition off to message mode
>
> The first option just doesn’t make sense.  The second is also a little
> nuts.  The third is what we are trying now, but it’s painful – the
> message mode code has its own structure and its own defaults, which
> don’t always agree with notmuch’s.  I am in favor of the fourth –
> notmuch’s elisp code should pass data to message mode in the most low
> level form it can, and let message mode do any extra work in the way
> it already does.  And users should customize message composition via
> message mode, not notmuch.  There’s a tradeoff to this approach – by
> controlling more within notmuch, we can have nicer defaults at the
> expense of more brittle code and/or fewer user-visible customizations.
>
> This is not in any way a criticism of your work (which is great) –
> you’re right that you need “permission” to uproot the defaults, and I’m
> advocating for it to be given.

I think we're on the same page here - I definitely prefer to have
notmuch-mua use existing emacs functionality wherever it makes sense.
The only question in my mind is how ugly we're willing to let the
defaults be in order to leverage existing stuff.

> One possible step that might ease the transition pain could be for
> notmuch’s emacs interface to have a configuration file (similar to
> Wanderlust’s ~/.wl; I believe Gnus also uses a ~/.gnus).  The idea is
> that this file contains elisp code, and is loaded by notmuch the first
> time any notmuch-related commands are invoked by the user.  If the file
> does not exist, notmuch could create it with default content that sets
> message-citation-function, message-citation-line-format,
> message-yank-prefix (to get rid of the ugly default whereby message-mode
> indents the original message by four spaces instead of inserting “> ”),
> etc.  If there is interest in this approach, I’d be happy to work on a
> patch for it.

This would be a good way to get around the ugly defaults problem, and
it would also be an easy way for people to share their notmuch/emacs
setups.  I already have my setup in a file separate from my normal
emacs config, and I run `emacs -q -l ~/.emacs-notmuch -f notmuch` so
it doesn't load my normal, programming-oriented setup.

One additional issue I noticed this morning with using
message-cite-original: it doesn't wrap/fill the quoted message.  I'm
guessing there's a way to make message-cite-original do this, but I
haven't figured it out.

  parent reply	other threads:[~2012-01-20 17:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19 17:46 [PATCH v3 0/5] Quoting HTML emails in reply Adam Wolfe Gordon
2012-01-19 17:46 ` [PATCH v3 1/5] test: Add broken test for the new JSON reply format Adam Wolfe Gordon
2012-01-19 17:46 ` [PATCH v3 2/5] reply: Add a " Adam Wolfe Gordon
2012-02-05 11:50   ` Mark Walters
2012-02-05 12:45     ` Mark Walters
2012-02-05 19:42     ` Adam Wolfe Gordon
2012-02-05 19:50       ` Dmitry Kurochkin
2012-02-06  3:44   ` Austin Clements
2012-02-06  6:27     ` Adam Wolfe Gordon
2012-01-19 17:46 ` [PATCH v3 3/5] man: Update notmuch-reply man page for JSON format Adam Wolfe Gordon
2012-01-19 17:46 ` [PATCH v3 4/5] emacs: Use the new JSON reply format Adam Wolfe Gordon
2012-02-05 12:41   ` Mark Walters
2012-01-19 17:46 ` [PATCH v3 5/5] emacs: Use message-citation-line-format in reply Adam Wolfe Gordon
2012-01-19 18:45   ` Aaron Ecay
2012-01-20  4:46     ` Adam Wolfe Gordon
2012-01-20  5:53       ` Aaron Ecay
2012-01-20  9:14         ` David Edmondson
2012-01-20 17:22         ` Adam Wolfe Gordon [this message]
2012-01-20 22:31           ` Tomi Ollila
2012-01-22 18:58   ` [PATCH v3 5/5] emacs: Use message-cite-original " Adam Wolfe Gordon
2012-02-09  0:21 ` [PATCH v4 0/4] Quoting HTML parts in reply (and other reply enhancements) Adam Wolfe Gordon
2012-02-09  0:21   ` [PATCH v4 1/4] test: Add broken test for the new JSON reply format Adam Wolfe Gordon
2012-02-09  0:21   ` [PATCH v4 2/4] reply: Add a " Adam Wolfe Gordon
2012-02-09  7:22     ` Dmitry Kurochkin
2012-02-10  4:27       ` Adam Wolfe Gordon
2012-02-10  8:39         ` Dmitry Kurochkin
2012-02-09  0:21   ` [PATCH v4 3/4] man: Update notmuch-reply man page for JSON format Adam Wolfe Gordon
2012-02-09  0:21   ` [PATCH v4 4/4] emacs: Use the new JSON reply format and message-cite-original Adam Wolfe Gordon

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

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMoJFUumHxLK8B1O99=t80C2X4-Z_hR0rOh83Ktk-192PB0uxA@mail.gmail.com' \
    --to=awg+notmuch@xvx.ca \
    --cc=ecay@sas.upenn.edu \
    --cc=notmuch@notmuchmail.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 public inbox

	https://yhetil.org/notmuch.git/

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