On Mon, 9 Jan 2012 19:10:48 -0700, Adam Wolfe Gordon <a...@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').
pgpB2tf7cE23L.pgp
Description: PGP signature
_______________________________________________ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch