[PATCH 4/4] emacs: Use the new JSON reply format.

Dmitry Kurochkin dmitry.kurochkin at gmail.com
Thu Jan 12 00:33:58 PST 2012


Hi Adam.

On Mon, 9 Jan 2012 19:10:48 -0700, Adam Wolfe Gordon <awg at xvx.ca> wrote:
> Hi David,
> 
> Thanks for the review.  Most of the things you've suggested are easy
> changes, and I think obvious improvements, so I'll change them for the
> next version.  A bit of discussion on the more involved things below:
> 
> On Mon, Jan 9, 2012 at 01:50, David Edmondson <dme at dme.org> wrote:
> > On Sun,  8 Jan 2012 00:52:42 -0700, Adam Wolfe Gordon <awg+notmuch at xvx.ca> wrote:
> >> +(defun w3m-region (start end)) ;; From `w3m.el'.
> >> +(defun notmuch-mua-quote-part (part)
> >> +  (with-temp-buffer
> >> +    (insert part)
> >> +    (message-mode)
> >> +    (fill-region (point-min) (point-max))
> >> +    (goto-char (point-min))
> >> +    (perform-replace "^" "> " nil t nil)
> >> +    (set-buffer-modified-p nil)
> >> +    (buffer-substring (point-min) (point-max))))
> >
> > Couldn't all of this be done directly in the reply buffer?
> 
> Indeed, it could, I just hadn't thought of it.  I'll do this for the
> next version.
> 
> > Using w3m means that you should `require' it. What happens when a user
> > doesn't have it? (Either the elisp or the command.)
> 
> This was my initial thought, but when I looked at notmuch-show.el,
> which uses w3m features, I noticed that it doesn't have a require.  To
> be clear, this patch requires w3m.el (not just the w3m binary), which
> I don't think anything else in notmuch does.
> 
> In the previous version I had a customize variable specifying whether
> to quote HTML parts, which meant that if the user could set the
> customize variable to false and everything would work without w3m.el.
> I'd like not to introduce a new prerequisite, so if there's a way to
> make w3m.el optional that would be my preference.  Can you provide
> some guidance on this?
> 

I did not follow the rest of the discussion, so sorry if I missed
something obvious.  But why can't we render HTML parts in replies the
same way we do in notmuch-show (using `mm-display-part')?  That should
not introduce a w3m.el requirement, would use the same renderer as
configured for show and hence would produce consistent output in show
and reply.

Regards,
  Dmitry

> -- 
> Adam Wolfe Gordon
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list