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

David Edmondson dme at dme.org
Mon Jan 9 23:25:32 PST 2012


On Mon, 9 Jan 2012 19:10:48 -0700, Adam Wolfe Gordon <awg at xvx.ca> wrote:
> > 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?

My suggestion would be to move the `html to text' functionality to a new
.el, as we might have more than one way to achieve it (emacs 24 has
`shr', for example).

Have `notmuch-mua.el' use a generically named function to perform the
transformation from html to text and that function should determine the
best way to achieve it.

Testing for `w3m.el' is relatively easy (`require' it and check for
error). Testing for `w3m' itself can be done using some code similar to
`notmuch-address-locate-command' (search the list - it's not yet
integrated), which is itself just copied from w3m (and should end up in
`notmuch-lib.el').
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120110/1da5c38a/attachment-0001.pgp>


More information about the notmuch mailing list