{"id":5283,"date":"2015-02-06T11:40:20","date_gmt":"2015-02-06T10:40:20","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/hayek\/jochen\/wp\/blog-en\/?p=5283"},"modified":"2026-04-16T11:59:28","modified_gmt":"2026-04-16T09:59:28","slug":"emacs-doc-view-mode","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2015\/02\/06\/emacs-doc-view-mode\/","title":{"rendered":"Emacs Doc View Mode"},"content":{"rendered":"<pre><code>            &lt;ul&gt;\n&lt;li&gt;&lt;a href=\"http:\/\/www.emacswiki.org\/emacs\/DocViewMode\"&gt;http:\/\/www.EmacsWiki.org\/emacs\/DocViewMode&lt;\/a&gt;&lt;\/li&gt;\n&lt;li&gt;&lt;a href=\"https:\/\/www.gnu.org\/software\/emacs\/manual\/html_node\/emacs\/Document-View.html\"&gt;https:\/\/www.gnu.org\/software\/emacs\/manual\/html_node\/emacs\/Document-View.html&lt;\/a&gt;&lt;\/li&gt;\n&lt;li&gt;&lt;a href=\"https:\/\/tsdh.wordpress.com\/2007\/08\/22\/view-documents-pdfpostscriptdvi-inside-emacs\/#comment-4351\"&gt;https:\/\/tsdh.wordpress.com\/2007\/08\/22\/view-documents-pdfpostscriptdvi-inside-emacs\/#comment-4351&lt;\/a&gt; \u2013 asked the developer to rectify things on the resp. EmacsWiki page quoted above&lt;\/li&gt;\n<\/code><\/pre>\n<\/ul>\n<p>Ever since I noticed, that in new Emacsen you are able (resp. you should be able) to view e.g. PDFs within Emacs buffers, I wondered why this does not work &#8220;on certain platforms&#8221;. Today I finally searched for &#8220;emacs docview&#8221;, found the right document (see above), and solved the issue.<\/p>\n<p>Emacs needs &#8220;gs&#8221; for converting PDFs to a series of PNGs, but of course it needs to find &#8220;gs&#8221; on its PATH. &#8220;On certain platforms&#8221;, $HOME\/.profile (or so \/ etc.) does not get read, so would I manipulate PATH within $HOME\/.emacs? No, I don&#8217;t like that. An alternative approach:<\/p>\n<blockquote><p>M-x customize-group RET doc-view RET<\/p><\/blockquote>\n<p>And set &#8220;Doc View Ghostscript Program&#8221; individually. Where is &#8220;gs&#8221;? Maybe &#8220;<em>type -a gs<\/em>&#8220;?!?<\/p>\n<p>Now I enjoy viewing PDFs inside Emacs on even more platforms.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lt;ul&gt; &lt;li&gt;&lt;a href=&#8221;http:\/\/www.emacswiki.org\/emacs\/DocViewMode&#8221;&gt;http:\/\/www.EmacsWiki.org\/emacs\/DocViewMode&lt;\/a&gt;&lt;\/li&gt; &lt;li&gt;&lt;a href=&#8221;https:\/\/www.gnu.org\/software\/emacs\/manual\/html_node\/emacs\/Document-View.html&#8221;&gt;https:\/\/www.gnu.org\/software\/emacs\/manual\/html_node\/emacs\/Document-View.html&lt;\/a&gt;&lt;\/li&gt; &lt;li&gt;&lt;a href=&#8221;https:\/\/tsdh.wordpress.com\/2007\/08\/22\/view-documents-pdfpostscriptdvi-inside-emacs\/#comment-4351&#8243;&gt;https:\/\/tsdh.wordpress.com\/2007\/08\/22\/view-documents-pdfpostscriptdvi-inside-emacs\/#comment-4351&lt;\/a&gt; \u2013 asked the developer to rectify things on the resp. EmacsWiki page quoted above&lt;\/li&gt; Ever since I noticed, that in new Emacsen you are able (resp. you should be able) to view e.g. PDFs within Emacs buffers, I wondered why this does not work &#8220;on certain platforms&#8221;. Today [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false,"_share_on_mastodon":"0"},"categories":[120],"tags":[1566],"class_list":["post-5283","post","type-post","status-publish","format-standard","hentry","category-emacs","tag-docview"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-1nd","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/5283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=5283"}],"version-history":[{"count":2,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/5283\/revisions"}],"predecessor-version":[{"id":13686,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/5283\/revisions\/13686"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=5283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=5283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=5283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}