unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Edmondson <dme@dme.org>
To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH] notmuch/emacs: Observe the charset of encoded parts, where known.
Date: Thu, 12 Jan 2012 14:42:49 +0000	[thread overview]
Message-ID: <cunr4z5kmmu.fsf@hotblack-desiato.hh.sledj.net> (raw)
In-Reply-To: <878vldgg3b.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2329 bytes --]

On Thu, 12 Jan 2012 18:17:44 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> 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.

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

> 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?

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2012-01-12 14:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 10:50 [PATCH] notmuch/emacs: Observe the charset of encoded parts, where known David Edmondson
2012-01-11 11:03 ` Tomi Ollila
2012-01-11 18:34 ` Dmitry Kurochkin
2012-01-12 12:00   ` David Edmondson
2012-01-12 14:17     ` Dmitry Kurochkin
2012-01-12 14:42       ` David Edmondson [this message]
2012-01-12 14:53         ` Dmitry Kurochkin
2012-01-12 13:31 ` [PATCH v2] notmuch/emacs: Observe the charset of text/html " David Edmondson
2012-01-12 18:49   ` Austin Clements
2012-01-12 19:14     ` David Edmondson
2012-01-13  9:44       ` [PATCH v3] " David Edmondson
2012-01-13 10:09         ` Tomi Ollila
2012-01-13 23:09         ` Austin Clements
2012-01-14  1:49         ` David Bremner

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=cunr4z5kmmu.fsf@hotblack-desiato.hh.sledj.net \
    --to=dme@dme.org \
    --cc=dmitry.kurochkin@gmail.com \
    --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).