* [sup-talk] text/html => w3m?
@ 2008-01-29 19:33 Daniel Wagner
2008-01-29 19:59 ` John Bent
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Wagner @ 2008-01-29 19:33 UTC (permalink / raw)
Hello, how does sup know to use w3m for text/html attachments? I had a
quick grep -R through the code for w3m, and it suggested that this could
be achieved with a user hook, but I have a completely empty
~/.sup/hooks. I also thought it might be from some mime-style magic,
but
~% xdg-mime query default "text/html"
firefox.desktop
I'd really like for firefox to be the program used in fact, but I can't
see where to change this.
~d
P.S. This is strongly related to another desire, to be sent in a new
thread.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [sup-talk] text/html => w3m?
2008-01-29 19:33 [sup-talk] text/html => w3m? Daniel Wagner
@ 2008-01-29 19:59 ` John Bent
2008-01-29 21:45 ` Daniel Wagner
2008-01-30 3:52 ` William Morgan
0 siblings, 2 replies; 4+ messages in thread
From: John Bent @ 2008-01-29 19:59 UTC (permalink / raw)
Excerpts from Daniel Wagner's message of Tue Jan 29 12:33:48 -0700 2008:
> Hello, how does sup know to use w3m for text/html attachments? I had a
> quick grep -R through the code for w3m, and it suggested that this could
> be achieved with a user hook, but I have a completely empty
> ~/.sup/hooks. I also thought it might be from some mime-style magic,
> but
>
> ~% xdg-mime query default "text/html"
> firefox.desktop
>
> I'd really like for firefox to be the program used in fact, but I can't
> see where to change this.
>
You can use a hook 'mime-decode.rb' to cause text/html emails to be
correctly rendered within sup. For attachments, sup uses hook 'mime-view.rb'.
Since, your hook dir is empty (by the way, it is possible to set the home
dir for sup to something besides $HOME/.sup, so you might want to confirm
you're running from where you think you are), I believe sup uses
/usr/bin/run-mailcap if there is no 'mime-view.rb'.
Hope this helps but I'm still learning sup too so this might all be wrong...
By the way, I'd like that other request you had also about being able to
open links within email bodies.
John
^ permalink raw reply [flat|nested] 4+ messages in thread
* [sup-talk] text/html => w3m?
2008-01-29 19:59 ` John Bent
@ 2008-01-29 21:45 ` Daniel Wagner
2008-01-30 3:52 ` William Morgan
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Wagner @ 2008-01-29 21:45 UTC (permalink / raw)
Excerpts from John Bent's message of Tue Jan 29 11:59:01 -0800 2008:
> you're running from where you think you are), I believe sup uses
> /usr/bin/run-mailcap if there is no 'mime-view.rb'.
Oh, hey, run-mailcap is really quite nice. Thanks for the tip! I stuck
this in my ~/.mailcap, and I'm happy-scrappy now.
text/html; /usr/bin/firefox '%s'; edit=gvim '%s'; \
test=test "$DISPLAY" != ""; description="Web Page"; nametemplate=%s.html
text/html; /usr/bin/firefox '%s'; edit=gvim '%s'; \
test=test "$DISPLAY" != ""; description="Web Page"; nametemplate=%s.htm
text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; \
edit=vim '%s'; description="Web Page"; nametemplate=%s.html
text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; \
edit=vim '%s'; description="Web Page"; nametemplate=%s.htm
Sadly, this will not work for opening links, as run-mailcap only
recognizes files, and not URIs.
~d
^ permalink raw reply [flat|nested] 4+ messages in thread
* [sup-talk] text/html => w3m?
2008-01-29 19:59 ` John Bent
2008-01-29 21:45 ` Daniel Wagner
@ 2008-01-30 3:52 ` William Morgan
1 sibling, 0 replies; 4+ messages in thread
From: William Morgan @ 2008-01-30 3:52 UTC (permalink / raw)
Reformatted excerpts from John Bent's message of 2008-01-29:
> Hope this helps but I'm still learning sup too so this might all be
> wrong...
Pretty much right. Sup uses run-mailcap by default, which is where w3m
is being picked up on your system. So you can change your mailcap, or
you can override the hook. Depends on whether you want this change to be
system-wide or specific to Sup.
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-01-30 3:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-29 19:33 [sup-talk] text/html => w3m? Daniel Wagner
2008-01-29 19:59 ` John Bent
2008-01-29 21:45 ` Daniel Wagner
2008-01-30 3:52 ` William Morgan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox