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 DE210429E25 for ; Thu, 12 Jan 2012 06:54:38 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 YWl2oFtV5Qi1 for ; Thu, 12 Jan 2012 06:54:38 -0800 (PST) Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 09886431FB6 for ; Thu, 12 Jan 2012 06:54:37 -0800 (PST) Received: by eaah10 with SMTP id h10so915298eaa.26 for ; Thu, 12 Jan 2012 06:54:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=3wqTYL7Yy3Fe3pFtEi5D9l0FCdpxBXmJJaZNFoICtsc=; b=M8cRppF19WkpN04gLSSG6hcSD85pjbEVS2dxRu16P9YuESlOrAAh14AeQZ3sy4aV3X y/1jRiLGio7/OMXHhH5eekhKrlHVgamPoaN7JHdVoL7oVmdHxFx2p5CRcJZag4LZOfrn DPGcRnRt8oi4cEhbSZltfWb/hNHw4ACvNFkg4= Received: by 10.204.153.199 with SMTP id l7mr1267642bkw.88.1326380076704; Thu, 12 Jan 2012 06:54:36 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id b9sm11206888bks.6.2012.01.12.06.54.35 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jan 2012 06:54:36 -0800 (PST) From: Dmitry Kurochkin To: David Edmondson , notmuch@notmuchmail.org Subject: Re: [PATCH] notmuch/emacs: Observe the charset of encoded parts, where known. In-Reply-To: References: <1326279001-28427-1-git-send-email-dme@dme.org> <87k44ym6ka.fsf@gmail.com> <878vldgg3b.fsf@gmail.com> User-Agent: Notmuch/0.10.2+135~gb811a3c (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Thu, 12 Jan 2012 18:53:45 +0400 Message-ID: <8762ghgefa.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Thu, 12 Jan 2012 14:54:39 -0000 On Thu, 12 Jan 2012 14:42:49 +0000, David Edmondson wrote: > On Thu, 12 Jan 2012 18:17:44 +0400, Dmitry Kurochkin wrote: > > I think there is a record of useful features and fixes that were not > > accepted to notmuch because of some implementation issues. And > > interested people were using them in private repos for years. (I do not > > say that it is always the right thing to do, or that it is the right > > thing in this particular case.) > > I agree that this has happened. I think that it's a failure of the > project that it has become common, necessary and generally accepted. > > > I would like to see the following changes: > > > > * Properly handle charset with parameters in Emacs UI. Currently it is > > broken by your patch in one place at least: > > `notmuch-show-handlers-for' would produce incorrect results for > > content-type string with parameters. In my patch [1] I did parse the > > charset at top level and then changed all usages of it accordingly. > > Making `notmuch-show-handlers-for' smarter about parameters may be > > sufficient, but I would like to see some more details on why adding > > parameters to content-type string does not break Emacs UI code in > > other places. > > Your patch modifies the output of 'notmuch show' such that it included > the full value of the content-type header, which means that it is > necessary to parse it more carefully in emacs to discover and (as > necessary) remove the parameters. The patch I posted doesn't do this, > preferring to pass the charset (if any) as a supplementary parameter and > leave the content-type as-is. This distinction means that the patch I > posted isn't broken in the way that you describe. > Sorry, I should have better look at the code. > > * Add charset parameter for text/html parts only. > > Version 2 of the patch does this. > > > * Use `mail-header-parse-content-type' to parse content-type instead of > > contructing the list for `mm-make-handle' manually. > > That's not required, see above. > > > * Add a proper XXX comment to notmuch-show code. > > I'm happy to do that. > > > I cannot say I would be happy about this patch after these changes. > > Can you say why? I agree that it is not a solution to all problems, but > it is a workable solution to a specific problem. > At the very least, because I did not really review the code, as you probably understood from my poor comments :) I do not have a strong preference here. If others do, I prefer to leave it for them to decide. > > It would be a temporary hack anyway. > > Agreed. Do you have any idea when you might be able to spend time on the > better approach? I hope to work on this once Austin's notmuch show rewrite is done. It is progressing, but I do not have any estimations. Regards, Dmitry