{"id":8866,"date":"2020-05-14T14:51:35","date_gmt":"2020-05-14T18:51:35","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=8866"},"modified":"2020-05-14T14:51:35","modified_gmt":"2020-05-14T18:51:35","slug":"zamansky-71-openwith","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=8866","title":{"rendered":"Zamansky 71: Openwith"},"content":{"rendered":"<p>Mike Zamansky, freshly back from a bout with COVID-19, has a new video in his <a href=\"https:\/\/cestlaz.github.io\/stories\/emacs\/\">Using Emacs Series<\/a> that <a href=\"https:\/\/cestlaz.github.io\/post\/using-emacs-71-openwith\/\">considers the openwith package<\/a>. The backstory is a long standing annoyance in Zamansky\u2019s workflow: although he can open non-text files such as PDFs, PNGs, docx, and others, he can\u2019t edit them and Emacs will choke if the file is too large.<\/p>\n<p>What he wanted was an easy way to choose a file from Dired and open it with an external app\u2014<a href=\"https:\/\/www.libreoffice.org\/\">LibreOffice<\/a> for docx, for example. That would save him from cluttering his desktop with a bevy of unneeded windows. The <a href=\"https:\/\/github.com\/jpkotta\/openwith\">openwith<\/a> package lets you associate an application with a list of file extensions and Emacs will use that application to open any files with that extension. In particular, if you type <kbd>Return<\/kbd> on a file in Dired, it will be opened in the external application instead of Emacs.<\/p>\n<p>There is, I think, a problem with this solution: it\u2019s all or nothing. Either the file is opened normally in Emacs or it is <i>always<\/i> opened by the external app. You can\u2019t choose. Even if you open the file normally with <code>find-file<\/code>, the external application will be invoked. In some cases, it\u2019s convenient to use the external app, and it others it\u2019s more convenient to open the file in Emacs but with openwith you can\u2019t choose. Zamansky also sees this as a problem but feels he can live with it and, of course, he can always turn off openwith. To be sure, that\u2019s a pain but the need to use both Emacs and an external application on the same file type is apparently rare in Zamansky\u2019s workflow.<\/p>\n<p>In the comments, Zamansky offers an update saying that he\u2019s discovered that openwith interferes with his mail client, mu4e. That\u2019s a deal breaker and Zamansky will probably hunt for another solution. If you aren\u2019t a mu4e user, you may find openwith a useful addition to your workflow.<\/p>\n<p>The video is 14 minutes long so schedule some time. As usual with Zamansky\u2019s videos, you won\u2019t want to miss watching it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mike Zamansky, freshly back from a bout with COVID-19, has a new video in his Using Emacs Series that considers the openwith package. The backstory is a long standing annoyance in Zamansky\u2019s workflow: although he can open non-text files such &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=8866\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-8866","post","type-post","status-publish","format-standard","hentry","category-general","tag-emacs"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8866"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8866\/revisions"}],"predecessor-version":[{"id":8867,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8866\/revisions\/8867"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}