unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Adam Wolfe Gordon <awg@xvx.ca>
To: Aaron Ecay <aaronecay@gmail.com>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH 0/4] Quoting HTML-only emails in replies redux
Date: Mon, 9 Jan 2012 18:53:30 -0700	[thread overview]
Message-ID: <CAMoJFUupEQofCnqaaDLEaH+_QcO4b7hd-f8=HX8jJUCFke40Qw@mail.gmail.com> (raw)
In-Reply-To: <m2r4z9irmp.fsf@gmail.com>

Thanks for the suggestions.  Specific comments inline:

On Sun, Jan 8, 2012 at 18:36, Aaron Ecay <aaronecay@gmail.com> wrote:
>> There should probably be some customize variables for this in emacs, to control
>> (for example) whether to quote HTML parts and whether to prefer HTML or
>> plaintext parts for quoting. Any suggestions for what should be customizable
>> would be appreciated.
>
> I think two variables should suffice: one (boolean) to control whether
> to quote standalone text/html parts, and one to control which parts of a
> multipart/alternative part to quote.  The latter should take possible
> values 'text, 'html, and 'both.  This requires the emacs reply
> functionality to distinguish between html parts that are part of a
> multipart/alternative and those which are not, which (AFAICT) the
> current code doesn’t do.

The first one I think is obvious, and easy to add.  My previous
version actually had such an option, but I didn't bother with it this
time in the interest of getting the patch out.  I'll add this in and
send a new version.

Regarding the second suggestion, you're right that the current code
doesn't differentiate between text parts that are part of a
multipart/alternative and ones that aren't.  However, it does only
include parts with inline disposition, so it shouldn't end up quoting
stuff intended as attachments.  My thinking in the current operation
was to keep most of the complexity (i.e. going through the MIME parts
to pick out the relevant ones) in the C code, so that it doesn't have
to be implemented in each client - and also so I didn't have to
implement it in emacs lisp ;-).  Do you have some ideas for a JSON
format that's more complex than the current one (to include the
information necessary for making decisions about what to quote), but
less complex than something like notmuch show --format=json (which
would require the client to descend the MIME tree completely to create
a reply)?

A third customization option I was thinking about is a way to control
the format of the first line of the body (On $date, $person wrote).  I
think it would be fairly simple to let people specify an arbitrary
format using any of the headers of the original message, so you would
set it to something like "On %date%, %from% wrote", or "Quoth %from%
(%date%)".  This might be particularly useful to users who correspond
normally in a language other than English.  Anyone have thoughts on
whether this is worth implementing?

> I haven’t tested the patch yet, but it looks very promising.  Thanks!

Thanks for the suggestions - let me know if you have a chance to try it out.

-- 
Adam Wolfe Gordon

  reply	other threads:[~2012-01-10  1:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-08  7:52 [PATCH 0/4] Quoting HTML-only emails in replies redux Adam Wolfe Gordon
2012-01-08  7:52 ` [PATCH 1/4] test: Add broken test for the new JSON reply format Adam Wolfe Gordon
2012-01-08  7:52 ` [PATCH 2/4] reply: Add a " Adam Wolfe Gordon
2012-01-14 20:58   ` Jani Nikula
2012-01-08  7:52 ` [PATCH 3/4] man: Update notmuch-reply man page for JSON format Adam Wolfe Gordon
2012-01-08  7:52 ` [PATCH 4/4] emacs: Use the new JSON reply format Adam Wolfe Gordon
2012-01-09  1:27   ` Aaron Ecay
2012-01-10  1:59     ` Adam Wolfe Gordon
2012-01-09  8:50   ` David Edmondson
2012-01-10  2:10     ` Adam Wolfe Gordon
2012-01-10  7:25       ` David Edmondson
2012-01-12  8:33       ` Dmitry Kurochkin
2012-01-12 12:07         ` David Edmondson
2012-01-12 13:36           ` Tomi Ollila
2012-01-12 13:43             ` David Edmondson
2012-01-15 21:19         ` Adam Wolfe Gordon
2012-01-09  1:36 ` [PATCH 0/4] Quoting HTML-only emails in replies redux Aaron Ecay
2012-01-10  1:53   ` Adam Wolfe Gordon [this message]
2012-01-15  9:26 ` David Edmondson
2012-01-16  7:38   ` Aaron Ecay
2012-01-16  8:39     ` David Edmondson
2012-01-16 19:29       ` Jameson Graef Rollins
2012-01-16 22:31       ` Aaron Ecay
2012-01-16 22:42         ` Adam Wolfe Gordon

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='CAMoJFUupEQofCnqaaDLEaH+_QcO4b7hd-f8=HX8jJUCFke40Qw@mail.gmail.com' \
    --to=awg@xvx.ca \
    --cc=aaronecay@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).