From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 10B66431E82 for ; Fri, 20 Jan 2012 09:22:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8jbKsv2tmKt3 for ; Fri, 20 Jan 2012 09:22:13 -0800 (PST) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id BC8CD431E62 for ; Fri, 20 Jan 2012 09:22:12 -0800 (PST) Received: by bkbzu17 with SMTP id zu17so692880bkb.26 for ; Fri, 20 Jan 2012 09:22:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.156.219 with SMTP id y27mr11952602bkw.71.1327080129943; Fri, 20 Jan 2012 09:22:09 -0800 (PST) Sender: awg@xvx.ca Received: by 10.204.49.75 with HTTP; Fri, 20 Jan 2012 09:22:09 -0800 (PST) X-Originating-IP: [208.77.198.202] In-Reply-To: References: <1326995217-27423-1-git-send-email-awg+notmuch@xvx.ca> <1326995217-27423-6-git-send-email-awg+notmuch@xvx.ca> Date: Fri, 20 Jan 2012 10:22:09 -0700 X-Google-Sender-Auth: j5iO2a0ZjPQVbSzSfd6hyr5VZaw Message-ID: Subject: Re: [PATCH v3 5/5] emacs: Use message-citation-line-format in reply From: Adam Wolfe Gordon To: Aaron Ecay Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2012 17:22:14 -0000 Erk, forgot to reply-all. Aaron might get this twice. On Thu, Jan 19, 2012 at 22:53, Aaron Ecay 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 > =91notmuch-message-citation-line-format=92 (with newline-less default), a= nd > let-bind m-l-c-f to that value. But that is pretty ugly =96 we don=92t w= ant > to have to =93wrap=94 every variable whose default we don=92t like. Agreed, not a good solution. > I=92m personally of the opinion that notmuch should just say =93the mail > composition facility is provided by message mode (here is the > documentation on customizing it)=94. 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=92t > 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=92t make sense. The second is also a little > nuts. The third is what we are trying now, but it=92s painful =96 the > message mode code has its own structure and its own defaults, which > don=92t always agree with notmuch=92s. I am in favor of the fourth =96 > notmuch=92s 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=92s a tradeoff to this approach =96 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) =96 > you=92re right that you need =93permission=94 to uproot the defaults, and= I=92m > 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=92s emacs interface to have a configuration file (similar to > Wanderlust=92s ~/.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 =93> =94= ), > etc. If there is interest in this approach, I=92d 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.