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.
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
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
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>