From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 23 Apr 2009 05:47:59 -0700 Subject: [sup-talk] mime-view hook In-Reply-To: <1240448213-sup-1757@junction.es.net> References: <1240448213-sup-1757@junction.es.net> Message-ID: <1240489722-sup-3696@entry> Reformatted excerpts from Jon Dugan's message of 2009-04-22: > It's supposed to render HTML in the SUP window and hand everything > else off to dumbplumb. It does hand everything else off to dumbplub, > however it doesn't do what I expect for the HTML attachments. > > Whatever gets returned from the hook should be displayed, right? Not exactly. There are two MIME hooks, and you'll need them both for what you're trying to do: mime-decode, for turning an attachment into text (displayed directly in Sup), and mime-view, for launching third-party applications to view an attachment. I've updated the docs on these two in git to make their relationship a little more clear, but in summary: mime-decode should return a string, or nil if uncovertable, and mime-view should return true if the application was successful, and false otherwise. Note that by default Sup calls run-mailcap to view attachments it can't convert to text, so you can make the dumbplumb behavior global by changing your mailcap instead. (If you desire that.) > dumbplumb is a simple mechanism for displaying files from remote > systems locally. it is a brain dead hack that implements something > which is something like the Plan 9 plumber but not really. That's awesome. Very useful for Sup. -- William