Re: [DNG] mutt and html
On Wed, Nov 03, 2021 at 12:45:02PM -0600, Bob Proulx via Dng wrote: > Hendrik Boom wrote: >> ~/.muttrc: >> set mailcap_path="~/.mailcap" > Strange. This is not needed to be set for me. Does that setting > override the default use of /etc/mailcap? Yes and no, it's simpler and more complicated. '~/.mailcap' and '/etc/mailcap' (and couple of others) are smashed together and then some entry wins. Thing is, rules applied are different for mime-tools and mutt, I think. Thus, maybe you don't need this setting. >> auto_view text/html >> Unfortunately it now prefers the .html version to the plaintext >> version. I presume I need an alternative_order line. *SKIP* > I don't know if there is a better way to configure it. But because of > not being able to deduce a way to avoid this undesired behavior I > avoid that configuration and use an explicit 'm' to mimecap-view the > html part explicitly instead. As I understand your requirements, (just mentioned above) 'alternative_order' list (or is it command?) needs adjustment. Thing is, I can't find a way to query contents of 'alternative_order' *list*, thus you need 'unalternative_order' *command*, and then set *list* with 'alternative_order' *command*. Anyway, this kindof documented in section "MIME Multipart/Alternative". *CUT* -- Torvalds' goal for Linux is very simple: World Domination Stallman's goal for GNU is even simpler: Freedom ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mutt and html
Hendrik Boom wrote: > ~/.muttrc: > > set mailcap_path="~/.mailcap" Strange. This is not needed to be set for me. Does that setting override the default use of /etc/mailcap? > auto_view text/html > ... > Unfortunately it now prefers the .html version to the plaintext version. > I presume I need an alternative_order line. I have this comment in my own file. # The problem with autoview is that it then preferrs the text/html # part instead of the text/plain part. Instead use 'm' to view the # part with the associated mailcap. # auto_view text/html I don't know if there is a better way to configure it. But because of not being able to deduce a way to avoid this undesired behavior I avoid that configuration and use an explicit 'm' to mimecap-view the html part explicitly instead. > ~/.mailcap: > > #text/html ; chromium %s > text/html ; firefox-esr -no-remote %s ; copiousoutput For firefox-esr the "copiousoutput" does not really follow as that is to tell mutt to pager through the output using the builtin text pager itself. Which doesn't really apply since firefox-esr opens a graphical window on $DISPLAY. Also this is missing a test of $DISPLAY being set. Which means that it will activate but fail if one is using ssh (without -X) or otherwise when DISPLAY is not set. And also I admit to cargo culting here but all of the stock entries use nametemplate. I suggest starting with the stock entries for firefox-esr: $ grep firefox-esr /etc/mailcap text/html; /usr/bin/firefox-esr %s; description=HTML Text; test=test -n "$DISPLAY"; nametemplate=%s.html text/xml; /usr/bin/firefox-esr %s; description=XML Text; test=test -n "$DISPLAY"; nametemplate=%s.xml image/png; /usr/bin/firefox-esr %s; description=PNG Image; test=test -n "$DISPLAY"; nametemplate=%s.png image/jpeg; /usr/bin/firefox-esr %s; description=JPEG Image; test=test -n "$DISPLAY"; nametemplate=%s.jpeg image/gif; /usr/bin/firefox-esr %s; description=GIF Image; test=test -n "$DISPLAY"; nametemplate=%s.gif And then modifying those to add the -no-remote option or other option as desired. Bob signature.asc Description: PGP signature ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mutt and html
Thanks for all the advice. On Sat, Oct 30, 2021 at 04:13:31PM -0400, Hendrik Boom wrote: > Until upgraded from ascii to beowulf, HTML messages were tolerable. > Either they were obvious crap, in which case I just deeted them, > or they seemed like they were worth viewing, in which case they were > usually html attachments, and I could seen the list of attachments by > typeing v and selecting the html version -- in which case it would > open for me in the chromium browser. > > This stopped working after the upgrade to beowulf. > > I did manage to reconfigure, telling it to use firefox-esr, but that > didn't help much. I connect to my server, the machine on which I run > mutt, using ssh -X. > So firefox on the server detects I already have a firefox browser > on my laptop and proceeds to give the job of browsing the message to > my laptop. > Makes sense, except that my laptop has no way to access the > /tmp/mutt/somethingorother.html on the server. > > And I have not been able to get mutt to call chromium at all. > > Any ideas? By tring things that were suggested, and trying to make sense of the documentation slightly more informed than random, I managed to get firefox to display html contents from the server where the files are. ~/.muttrc: set mailcap_path="~/.mailcap" auto_view text/html bind pager Q exit subscribe racket-us...@googlegroups.com ~/.mailcap: #text/html ; chromium %s text/html ; firefox-esr -no-remote %s ; copiousoutput Unfortunately it now prefers the .html version to the plaintext version. I presume I need an alternative_order line. -- hendrik ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mutt and html
On Tue, Nov 02, 2021 at 03:50:07PM -0400, Hendrik Boom wrote: > On Sat, Oct 30, 2021 at 04:13:31PM -0400, Hendrik Boom wrote: > > Until upgraded from ascii to beowulf, HTML messages were tolerable. > > Either they were obvious crap, in which case I just deeted them, > > or they seemed like they were worth viewing, in which case they were > > usually html attachments, and I could seen the list of attachments by > > typeing v and selecting the html version -- in which case it would > > open for me in the chromium browser. > > > > This stopped working after the upgrade to beowulf. > > > > I did manage to reconfigure, telling it to use firefox-esr, but that > > didn't help much. I connect to my server, the machine on which I run > > mutt, using ssh -X. > > So firefox on the server detects I already have a firefox browser > > on my laptop and proceeds to give the job of browsing the message to > > my laptop. > > Makes sense, except that my laptop has no way to access the > > /tmp/mutt/somethingorother.html on the server. > > > > And I have not been able to get mutt to call chromium at all. > > > > Any ideas? > > > > -- hendrik > > ___ > > Dng mailing list > > Dng@lists.dyne.org > > https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng > > As far as I can tell, it's not seeing the information in my ~/.mailcao file. Correction: it's really called ~/.mailcap, not ~/.mailcao > When I put in an entry like > > text/html ; echo foo > > it still displays the html content of a an attachment as if it were > ordinatry plain text attachment, so i get to see all the html tags. > > -- hendrik > > ___ > Dng mailing list > Dng@lists.dyne.org > https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mutt and html
On Sat, Oct 30, 2021 at 04:13:31PM -0400, Hendrik Boom wrote: > Until upgraded from ascii to beowulf, HTML messages were tolerable. > Either they were obvious crap, in which case I just deeted them, > or they seemed like they were worth viewing, in which case they were > usually html attachments, and I could seen the list of attachments by > typeing v and selecting the html version -- in which case it would > open for me in the chromium browser. > > This stopped working after the upgrade to beowulf. > > I did manage to reconfigure, telling it to use firefox-esr, but that > didn't help much. I connect to my server, the machine on which I run > mutt, using ssh -X. > So firefox on the server detects I already have a firefox browser > on my laptop and proceeds to give the job of browsing the message to > my laptop. > Makes sense, except that my laptop has no way to access the > /tmp/mutt/somethingorother.html on the server. > > And I have not been able to get mutt to call chromium at all. > > Any ideas? > > -- hendrik > ___ > Dng mailing list > Dng@lists.dyne.org > https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng As far as I can tell, it's not seeing the information in my ~/.mailcao file. When I put in an entry like text/html ; echo foo it still displays the html content of a an attachment as if it were ordinatry plain text attachment, so i get to see all the html tags. -- hendrik ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mutt and html
Hendrik Boom wrote: > Until upgraded from ascii to beowulf, HTML messages were tolerable. > Either they were obvious crap, in which case I just deeted them, > or they seemed like they were worth viewing, in which case they were > usually html attachments, and I could seen the list of attachments by > typeing v and selecting the html version -- in which case it would > open for me in the chromium browser. > > This stopped working after the upgrade to beowulf. Until I read that you are connecting with ssh -X I thought that this is almost certainly due to changes in /etc/mailcap handlers. You might review them on your system anyway. It is possible they have changed for you with the upgrade and that is why your html handling has changed. [[ Time to advocate for "etckeeper". If that is installed then one can look at the changes over time to any particular file in /etc. This is the command line way to view the "patches" made to a file. cd /etc git log -p mailcap | less Meanwhile... I normally just emacs the file, browse the version history inside the Emacs git blame interface, C-x v g, and navigate through previous and next versions. I am sure there are many other git version history browsers available. ]] Here is a sampling of html handlers from my system, which will not be typical since every system will have different ordering based upon the ordering in which packages were installed and removed. Packages add and remove handlers as they are modified. But useful for the idea. $ grep html /etc/mailcap text/html; /usr/bin/sensible-browser %s; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/firefox %s; description=HTML Text; test=test -n "$DISPLAY"; nametemplate=%s.html text/html; /usr/bin/firefox-esr %s; description=HTML Text; test=test -n "$DISPLAY"; nametemplate=%s.html text/html; /usr/local/bin/chromium %s; test=test -n "$DISPLAY" application/xhtml_xml; /usr/local/bin/chromium %s; test=test -n "$DISPLAY" text/html; /usr/bin/chromium %s; test=test -n "$DISPLAY" application/xhtml_xml; /usr/bin/chromium %s; test=test -n "$DISPLAY" text/html; dwb %s; test=test -n "$DISPLAY" application/xhtml+xml; dwb %s; test=test -n "$DISPLAY" text/html; midori --private %s; test=test -n "$DISPLAY" application/xhtml+xml; midori --private %s; test=test -n "$DISPLAY" text/html; /usr/bin/elinks -force-html %s; needsterminal; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/links %s; needsterminal; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/w3m -T text/html %s; needsterminal; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/elinks -force-html -dump %s; copiousoutput; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/links -dump %s; copiousoutput; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/lynx -force_html %s; needsterminal; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/w3m -I %{charset} -dump -T text/html %s; copiousoutput; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/html2text %s; copiousoutput; description=HTML Text text/html; /usr/bin/lynx -dump -force_html %s; copiousoutput; description=HTML Text; nametemplate=%s.html I keep a personalized ~/.mailcap file with most of the selections I care about. I then uncomment the one I want to be using at the moment if I want to do something different and want to force my choice. # text/html; /usr/bin/firefox %s; description=HTML Text; test=test -n "$DISPLAY"; nametemplate=%s.html # text/html; /usr/bin/elinks -dump -dump-color-mode 3 %s; copiousoutput; description=HTML Text; nametemplate=%s.html # text/html; /usr/bin/elinks -dump %s; copiousoutput; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/links -dump %s; copiousoutput; description=HTML Text; nametemplate=%s.html # text/html; /usr/local/bin/iceweasel '%s'; description=HTML Text; test=test -n "$DISPLAY"; nametemplate=%s.html # text/html; /usr/bin/lynx -force_html %s; needsterminal; description=HTML Text; nametemplate=%s.html # text/html; /usr/bin/lynx -dump -force_html %s; copiousoutput; description=HTML Text; nametemplate=%s.html # text/html; /usr/bin/w3m -no-mouse -T text/html %s; needsterminal; description=HTML Text; nametemplate=%s.html Currently I am forcing "links -dump" rendering as that is doing pretty well for the types of html mail I am receiving at the moment. For most html mail I am receiving the text rendering of the message is more than sufficient. There are hard cases of fluff and glitter though. If I have a problem I will simply edit that ~/.mailcap file and change the selection and try one of the others viewers. Some work better than others. If I want to open the attachment in a real graphical browser then I perform a manual action. I 'v'iew the MIME parts,
Re: [DNG] mutt and html
On Sat, Oct 30, 2021 at 04:13:31PM -0400, Hendrik Boom wrote: > Until upgraded from ascii to beowulf, HTML messages were tolerable. I am using Mutt with palemoon browser on Chimera. I chose separate browser to avoid interference with firefox. The view command works just like you describe it. Jarkko Lavinen ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mutt and html
On October 31, 2021 6:05:26 PM GMT+01:00, Steve Litt wrote: > Florian and Hendrik, > > Would either or both of you be able to give a presentation, on Mutt, at > the GoLUG meeting this coming Wednesday, 7pm New York time? Hallo Steve, sorry for having to let you down: I am not into 'mutt' at all. I had been using (al)pine for several years, before I got "old and lazy" enough to give claws mail a try - with which I am still perfectly satisfied. Libre Grüße, Florian -- [message sent otg] ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mutt and html
Florian Zieboll via Dng said on Sun, 31 Oct 2021 15:18:56 +0100 >On October 30, 2021 10:13:31 PM GMT+02:00, Hendrik Boom > wrote: > >> I did manage to reconfigure, telling it to use firefox-esr, but that >> didn't help much. I connect to my server, the machine on which I >> run mutt, using ssh -X. >> So firefox on the server detects I already have a firefox browser >> on my laptop and proceeds to give the job of browsing the message to >> my laptop. >> Makes sense, except that my laptop has no way to access the >> /tmp/mutt/somethingorother.html on the server. > > >Hallo Hendrik, > >for Firefox, I would try with the "-no-remote" switch. This should >make it possible to start a "second instance", regardless of an >already running one (and BTW enables you to have different FF >profiles running next to each other). Florian and Hendrik, Would either or both of you be able to give a presentation, on Mutt, at the GoLUG meeting this coming Wednesday, 7pm New York time? Especially handy would be: * How to keep from getting that 2 minute delay when you type the password in wrong? * How to use Mutt with a local Dovecot server with lots of folders and subfolders? * Productivity tips? * Where to find Mutt cheat sheet? * Best way to get your fingers to learn Mutt? :-) Don't bring me down Grüße, SteveT Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mutt and html
On October 30, 2021 10:13:31 PM GMT+02:00, Hendrik Boom wrote: > I did manage to reconfigure, telling it to use firefox-esr, but that > didn't help much. I connect to my server, the machine on which I run > mutt, using ssh -X. > So firefox on the server detects I already have a firefox browser > on my laptop and proceeds to give the job of browsing the message to > my laptop. > Makes sense, except that my laptop has no way to access the > /tmp/mutt/somethingorother.html on the server. Hallo Hendrik, for Firefox, I would try with the "-no-remote" switch. This should make it possible to start a "second instance", regardless of an already running one (and BTW enables you to have different FF profiles running next to each other). Libre Grüße, Florian -- [message sent otg] ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
[DNG] mutt and html
Until upgraded from ascii to beowulf, HTML messages were tolerable. Either they were obvious crap, in which case I just deeted them, or they seemed like they were worth viewing, in which case they were usually html attachments, and I could seen the list of attachments by typeing v and selecting the html version -- in which case it would open for me in the chromium browser. This stopped working after the upgrade to beowulf. I did manage to reconfigure, telling it to use firefox-esr, but that didn't help much. I connect to my server, the machine on which I run mutt, using ssh -X. So firefox on the server detects I already have a firefox browser on my laptop and proceeds to give the job of browsing the message to my laptop. Makes sense, except that my laptop has no way to access the /tmp/mutt/somethingorother.html on the server. And I have not been able to get mutt to call chromium at all. Any ideas? -- hendrik ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng