Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: wmorgan-sup@masanjin.net (William Morgan)
Subject: [sup-talk] mime-view hook
Date: Thu, 23 Apr 2009 05:47:59 -0700	[thread overview]
Message-ID: <1240489722-sup-3696@entry> (raw)
In-Reply-To: <1240448213-sup-1757@junction.es.net>

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 <wmorgan-sup at masanjin.net>


  reply	other threads:[~2009-04-23 12:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-23  1:11 Jon Dugan
2009-04-23 12:47 ` William Morgan [this message]
2009-04-23 17:53 ` Andrew Pimlott
2009-04-23 18:14   ` Jon Dugan
2009-04-23 22:59     ` Andrew Pimlott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1240489722-sup-3696@entry \
    --to=wmorgan-sup@masanjin.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox