Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 1A1B5429E45 for ; Fri, 17 Feb 2012 19:32:33 -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 oa7TMMj8Zx2e for ; Fri, 17 Feb 2012 19:32:31 -0800 (PST) Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU [18.9.25.13]) by olra.theworths.org (Postfix) with ESMTP id 59C3E431FAE for ; Fri, 17 Feb 2012 19:32:31 -0800 (PST) X-AuditID: 1209190d-b7fbf6d0000008ba-29-4f3f1bcedf44 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP id 20.F0.02234.ECB1F3F4; Fri, 17 Feb 2012 22:32:30 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q1I3WU7I007962; Fri, 17 Feb 2012 22:32:30 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q1I3WSOx018146 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Fri, 17 Feb 2012 22:32:29 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1Ryb0V-0004Cr-Cp; Fri, 17 Feb 2012 22:30:43 -0500 Date: Fri, 17 Feb 2012 22:30:43 -0500 From: Austin Clements To: Adam Wolfe Gordon Subject: Re: [PATCH v5.2 7/7] emacs: Use the new JSON reply format and message-cite-original Message-ID: <20120218033043.GJ5991@mit.edu> References: <1329361957-28493-1-git-send-email-awg+notmuch@xvx.ca> <1329361957-28493-8-git-send-email-awg+notmuch@xvx.ca> <20120217200017.GG5991@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLKsWRmVeSWpSXmKPExsUixCmqrXtO2t7f4HWjrcWRPbPYLa7fnMns wOTxbNUtZo+mH4tZA5iiuGxSUnMyy1KL9O0SuDKeNF5gLJgoUrFh/RX2Bsb3/F2MnBwSAiYS fw5MYoGwxSQu3FvP1sXIxSEksI9RYuKeHewQzgZGiZOvH0NlTjJJNBy9AZVZwigx6cBsdpB+ FgFVib+Nr1lBbDYBDYlt+5czgtgiAloSP9Z/BYszC0hLfPvdzARiCwvESXz7fgWsl1dAW+Lz zclQQ58wSpzed5INIiEocXLmExaIZh2JnVvvAMU5wAYt/8cBEZaXaN46mxnE5hQIlNi/sR1s r6iAisSUk9vYJjAKz0IyaRaSSbMQJs1CMmkBI8sqRtmU3Crd3MTMnOLUZN3i5MS8vNQiXSO9 3MwSvdSU0k2M4FiQ5N3B+O6g0iFGAQ5GJR5exx47fyHWxLLiytxDjJIcTEqivP1S9v5CfEn5 KZUZicUZ8UWlOanFhxglOJiVRHi97gCV86YkVlalFuXDpKQ5WJTEeVW13vkJCaQnlqRmp6YW pBbBZGU4OJQkeMWBMS8kWJSanlqRlplTgpBm4uAEGc4DNHwHyGLe4oLE3OLMdIj8KUZFKXFe ZpBmAZBERmkeXC8sVb1iFAd6RZj3A0g7DzDNwXW/AhrMBDSYVwjk6uKSRISUVAPjjceXkrZy R9id+rlhhZjr2n8nGUXrdfhnhEUf3cvt+qqU496sXFmXCeXN0bck1Fcwqjrk3Fv5Y1fu05Pv rZa9Yvr+d06d24S/3550WfwzeB0R63RdL/lxk5FKx+m4u9f+9rdO6ddRCku/7SfA4Bm4f2bi nV0hX5/3pu3KOij2VzJ3nnremZCHSizFGYmGWsxFxYkAL5PORTADAAA= 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: Sat, 18 Feb 2012 03:32:33 -0000 Quoth Adam Wolfe Gordon on Feb 17 at 7:22 pm: > On Fri, Feb 17, 2012 at 13:00, Austin Clements wrote: > > One general comment that affects a lot of things in this patch: I > > think you should use the same JSON parsing settings that > > notmuch-query-get-threads uses.  Besides consistency and more > > opportunities for code reuse, using lists instead of vectors for JSON > > arrays will simplify a lot of this code without any drawbacks. > > I pretty much agree. The only reason I stuck with alists was, as you > mention below, to be compatible with certain mail functions. Given the > things you've pointed out, I think the small hassle of making those > work with plists is worthwhile, so I'll give it a go. > > Clarification on a couple of things follow, otherwise I'll make all > these changes for the next version. > > >> +     (goto-char (point-max))) > >> + > >> +      (let ((from (cdr (assq 'From original-headers))) > >> +         (date (cdr (assq 'Date original-headers))) > >> +         (start (point))) > >> + > >> +     (insert "From: " from "\n") > >> +     (insert "Date: " date "\n\n") > > > > Sorry; I'm having trouble following the diff.  What are the inserts > > for? > > The function message-cite-original cites an original message, which is > in the marked region. It assumes the headers of the original message > will be part of the marked region, but the only ones it actually uses > are From and Date. > > This could probably use a comment in the code. Ah, okay. Is this how it generates the citation line? Could definitely do with a comment. > >> +     (push-mark) > > > > It's unfortunate that message-cite-original depends on the mark. > > Since you're about to push the mark for the user anyway, maybe this > > should be a set-mark so that only one mark gets pushed? > > Probably the right thing to do. > > >> +     (goto-char start) > >> +     ;; Quote the original message according to the user's configured style. > >> +     (message-cite-original)))) > > > > message-cite-original-without-signature? > > Perhaps it should be configurable (notmuch-reply-cite-function or > somesuch). I believe message-cite-original matches the behavior of the > old reply, which didn't strip signatures, but I don't have strong > feelings either way. We should probably stick with the original behavior, at least for now. I just noticed that message-cite-original calls mml-quote-region. How is it that we don't wind up double-quoting MML tags with this change?