[PATCH 4/4] emacs: Use the new JSON reply format.
Adam Wolfe Gordon
awg at xvx.ca
Mon Jan 9 18:10:48 PST 2012
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
> 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?
Adam Wolfe Gordon
More information about the notmuch