From 9575cf24dcab58e45f8025555a1bdf633829f571 Mon Sep 17 00:00:00 2001 From: Adam Wolfe Gordon Date: Sun, 1 Apr 2012 17:36:27 +1800 Subject: [PATCH] Re: [BUG/PATCH v2 1/2] emacs: Fix header problem in reply for emacs 23.2 --- ab/7c2276bedd0e7bbf5ede0d7dcd52ff58b255e2 | 105 ++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 ab/7c2276bedd0e7bbf5ede0d7dcd52ff58b255e2 diff --git a/ab/7c2276bedd0e7bbf5ede0d7dcd52ff58b255e2 b/ab/7c2276bedd0e7bbf5ede0d7dcd52ff58b255e2 new file mode 100644 index 000000000..c5e1b26ad --- /dev/null +++ b/ab/7c2276bedd0e7bbf5ede0d7dcd52ff58b255e2 @@ -0,0 +1,105 @@ +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 F3B88431E82 + for ; Sat, 31 Mar 2012 16:36:29 -0700 (PDT) +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 0JsRnXSaad2x for ; + Sat, 31 Mar 2012 16:36:29 -0700 (PDT) +Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com + [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 2E262431FAF + for ; Sat, 31 Mar 2012 16:36:29 -0700 (PDT) +Received: by lahc1 with SMTP id c1so2030783lah.26 + for ; Sat, 31 Mar 2012 16:36:27 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=mime-version:sender:x-originating-ip:in-reply-to:references:date + :x-google-sender-auth:message-id:subject:from:to:cc:content-type + :x-gm-message-state; + bh=6l1ZePoMfJXAxwz01Sv2AMEMb1au8wY70tLmPkiDP4E=; + b=niiFS0X0FLmTwZkyh5fmiOaufaQ5/2ZVobQMDgB9ryFlvZg+1oD0UAd3e8ENsgNm2S + e4qqx9MDU7GHYQ08CNsCCDB/Ggpii/ceIv9zV+gu5SI5v8g4lixeQaPMv5lSlhyxbFHR + EERpdA79/GsakS2JipPqHb/1kLvZvV1DGkIQWG19lEbvn5QyWpaOOGQPSI8TeAlmWm9W + n5z8O+vAzsm4P6V2zsZaHBNaxm6NQVYiw5qurUT5DMbQwzNy3Av3mIElk34eHCVN1c8j + 0iWlWVi637ysTSJ1RvAxjZBS8ZziNvQRWX1pxKE97B/mqQCGIiG4W1B3RkVYdj8M+VhX + IoCg== +MIME-Version: 1.0 +Received: by 10.152.148.234 with SMTP id tv10mr3782185lab.41.1333236987446; + Sat, 31 Mar 2012 16:36:27 -0700 (PDT) +Sender: awg@xvx.ca +Received: by 10.112.97.14 with HTTP; Sat, 31 Mar 2012 16:36:27 -0700 (PDT) +X-Originating-IP: [96.52.216.56] +In-Reply-To: <87k42116b2.fsf@qmul.ac.uk> +References: <1333038410-17927-1-git-send-email-awg+notmuch@xvx.ca> + <1333038410-17927-2-git-send-email-awg+notmuch@xvx.ca> + <87k42116b2.fsf@qmul.ac.uk> +Date: Sat, 31 Mar 2012 17:36:27 -0600 +X-Google-Sender-Auth: WSAoc8Fee72nCGPtNChxiF-S0u0 +Message-ID: + +Subject: Re: [BUG/PATCH v2 1/2] emacs: Fix header problem in reply for emacs + 23.2 +From: Adam Wolfe Gordon +To: Mark Walters +Content-Type: text/plain; charset=ISO-8859-1 +X-Gm-Message-State: + ALoCoQmgh88oNhdnhZ0OdYuG/IE/dPQ0sVdFR786TlxZVSxAeiwd1TQayJOUeT8yiCbpmju12E/6 +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, 31 Mar 2012 23:36:30 -0000 + +Hi Mark, + +On Sat, Mar 31, 2012 at 03:13, Mark Walters wrote: +> Secondly it seems a little odd that the second patch above changes the +> header stuff from 'From to "From" and then this patch changes it back +> again. This is probably only a matter of a tidy history but I have to +> admit I am confused about why the reply from alternate address still +> works (but it does seem to) + +Good question. These three bugs (alternate address, References header, +double headers in 23.2) basically stem from two problems: poor +interactions between notmuch and message.el, and inconsistency in +using strings and symbols for header names. + +All the message.el functions usually assume symbols for header names, +but when I was writing the new reply stuff I found it easier to use +strings. In emacs 23.3, message.el is happy to accept strings. The +alternate address bug was caused by the fact that we were using +strings in one place and symbols in another, and 'From isn't equal to +"From". Rather than changing everything to symbols, I just changed the +one place we were using symbols to use strings. + +But, it turns out that emacs 23.2 isn't happy with strings, which +caused the double headers bug. So I ended up converting everything to +use symbols. Because we're now consistent in using symbols, and never +pass strings to message.el, the alternate address bug is still fixed. + +All that's a long way of saying: the fix for emacs 23.2 should +actually fix the alternate reply bug as well. This probably means I +could drop the alternate reply bug patch, and rebase the other two +onto master, and we'd still have all the bugs fixed. Is that +preferable, to reduce the number of code changes in the history? + +-- Adam -- 2.26.2