Re: [PATCH 0/4] Quoting HTML-only emails in replies redux
On Mon, 16 Jan 2012 02:38:38 -0500, Aaron Ecay aarone...@gmail.com wrote: On Sun, 15 Jan 2012 09:26:59 +, David Edmondson d...@dme.org wrote: Given that we're now doing a bunch of work in emacs as part of the reply setup, why not just grab the content of the original message from the show buffer and quote that? The last time that approach was discussed Carl was against it because it moved the emacs UI away from the behaviour of the CLI, but it seems that we're already heading in that direction. I have been watching this patch series with interest, because it seemed that when it landed it would be a good time for me to begin work on a patch to allow notmuch to function like other emacs MUAs in constructing the reply buffer internally to emacs, rather than through notmuch. This allows (at least) three things: - Greater flexibility in the construction of address lists. For example, there are some email lists where I want replies to list mail to go only to the list, not also to the original sender. Is there a mechanistic way to determine the correct behaviour in this respect? I suspect that it's exactly the kind of thing that Carl wanted to be included in 'notmuch' itself, so that other UIs can benefit. Additionally, I like to reply from my university address if colleagues write to my Gmail one. If a lisp function is generating the replies, it can be made to run a hook allowing users to insert these or other custom behaviors. - The same reasoning as above, applied to signatures. (different ones for different recipients) You can do both of these things today using `message-send-hook' (I do). - There exists at least one emacs package (supercite) which allows customization of the quoting of email replies. This automates the “Firstname” style quotes one sometimes sees, as well as many other possiblities. It defines a way for emacs MUAs to construct reply buffers to cooperate with it, which many of the big emacs MUAs obey (Gnus and Wanderlust certainly do). This is explained in the “hints to MUA authors” section of the supercite manual (distributed with Emacs). I dislike supercite, so no support from me in that direction :-) pgpQNOipBSPVk.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 0/4] Quoting HTML-only emails in replies redux
On Mon, 16 Jan 2012 08:39:30 +, David Edmondson d...@dme.org wrote: Is there a mechanistic way to determine the correct behaviour in this respect? I suspect that it's exactly the kind of thing that Carl wanted to be included in 'notmuch' itself, so that other UIs can benefit. Agreed. I think it's generally better to get the functionality we want in the CLI if we can, so that all UIs benefit. Emacs is still certainly the most actively developed UI, and it's gotten quite complicated with quite a few special features, but to the extent that we can put new functionality into the CLI we should. jamie. pgpfDMFQNb3eC.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 0/4] Quoting HTML-only emails in replies redux
On Mon, 16 Jan 2012 08:39:30 +, David Edmondson d...@dme.org wrote: On Mon, 16 Jan 2012 02:38:38 -0500, Aaron Ecay aarone...@gmail.com wrote: - Greater flexibility in the construction of address lists. For example, there are some email lists where I want replies to list mail to go only to the list, not also to the original sender. Is there a mechanistic way to determine the correct behaviour in this respect? I suspect that it's exactly the kind of thing that Carl wanted to be included in 'notmuch' itself, so that other UIs can benefit. I think it requires some amount of configuration, but it can be done sensibly. I am much more proficient with Elisp than with C, and Emacs has prejudiced me towards solutions that allow me to have a Turing-complete configuration language. :) I think a good starting point for thinking about mailing lists is what Mutt does: http://www.mutt.org/doc/manual/manual-4.html#using_lists Notmuch at the CLI/C code level could aim for a comparable level of expressiveness, and I think it would suffice for most people (including me). [...] You can do both of these things today using `message-send-hook' (I do). I avoided that, as it seemed to me that just before the message is sent is too late to be doing these things (I’d like to see confirmation when writing the message that the address/signature changes were applied correctly). But “M-x apropos RET message hook RET” shows that there are some earlier points to hook into as well. Thanks. I dislike supercite, so no support from me in that direction :-) One advantage of supercite is that it allows non-English speakers to set up the “On X, X wrote” line as they prefer. Notmuch’s current approach (a hard-coded C string) is the opposite of internationalized. So it would be nice to support some customization of that as well, even if we don’t go the supercite route. -- Aaron Ecay ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 0/4] Quoting HTML-only emails in replies redux
On Mon, Jan 16, 2012 at 15:31, Aaron Ecay aarone...@gmail.com wrote: One advantage of supercite is that it allows non-English speakers to set up the “On X, X wrote” line as they prefer. Notmuch’s current approach (a hard-coded C string) is the opposite of internationalized. So it would be nice to support some customization of that as well, even if we don’t go the supercite route. Note that with my patch, the On X, X wrote string is no longer hardcoded in the CLI (at least when using the JSON reply format). I intend to make it configurable in emacs, though right now it is hardcoded in notmuch-mua.el. -- Adam Wolfe Gordon ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 0/4] Quoting HTML-only emails in replies redux
Given that we're now doing a bunch of work in emacs as part of the reply setup, why not just grab the content of the original message from the show buffer and quote that? The last time that approach was discussed Carl was against it because it moved the emacs UI away from the behaviour of the CLI, but it seems that we're already heading in that direction. pgpyQj9acKhOH.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 0/4] Quoting HTML-only emails in replies redux
On Sun, 15 Jan 2012 09:26:59 +, David Edmondson d...@dme.org wrote: Given that we're now doing a bunch of work in emacs as part of the reply setup, why not just grab the content of the original message from the show buffer and quote that? The last time that approach was discussed Carl was against it because it moved the emacs UI away from the behaviour of the CLI, but it seems that we're already heading in that direction. I have been watching this patch series with interest, because it seemed that when it landed it would be a good time for me to begin work on a patch to allow notmuch to function like other emacs MUAs in constructing the reply buffer internally to emacs, rather than through notmuch. This allows (at least) three things: - Greater flexibility in the construction of address lists. For example, there are some email lists where I want replies to list mail to go only to the list, not also to the original sender. Additionally, I like to reply from my university address if colleagues write to my Gmail one. If a lisp function is generating the replies, it can be made to run a hook allowing users to insert these or other custom behaviors. - The same reasoning as above, applied to signatures. (different ones for different recipients) - There exists at least one emacs package (supercite) which allows customization of the quoting of email replies. This automates the “Firstname” style quotes one sometimes sees, as well as many other possiblities. It defines a way for emacs MUAs to construct reply buffers to cooperate with it, which many of the big emacs MUAs obey (Gnus and Wanderlust certainly do). This is explained in the “hints to MUA authors” section of the supercite manual (distributed with Emacs). So, a +1 from me on this idea, from a different perspective. -- Aaron Ecay ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 0/4] Quoting HTML-only emails in replies redux
Thanks for the suggestions. Specific comments inline: On Sun, Jan 8, 2012 at 18:36, Aaron Ecay aarone...@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 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 0/4] Quoting HTML-only emails in replies redux
On Sun, 8 Jan 2012 00:52:38 -0700, Adam Wolfe Gordon awg+notm...@xvx.ca 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. I haven’t tested the patch yet, but it looks very promising. Thanks! -- Aaron Ecay ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch