Question

Emacs 23 can view PDF files inside the editor which is great. However it also shows a welcome page, for every PDF page, like this:

enter image description here

How can I remove this welcome page? I understand Emacs is doing some processing for the PDF page, and it probably does not want the user to try to open the file over and over again while it is doing that, but I'd prefer and hourglass instead of a whole page.

I tried setting doc-view-conversion-refresh-interval to nil BTW, it didnt work.

I am on GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4).

Thanks,

Was it helpful?

Solution

WRT your answer, it sounds like you either edited the original file, or made a replacement copy of that entire library.

The first way will be lost when you update Emacs. The second way means you won't get any improvements to that library when you update Emacs. Neither is a very good option.

Instead you can tell Emacs that if and when it loads the original library, it should re-define that one function at that time.

This minimises the potential problems associated with upgrades, and does not require you to load the library unconditionally in your .emacs (which would increase your start-up time unnecessarily for sessions where you didn't load any PDFs).

(eval-after-load 'doc-view
  '(defun doc-view-buffer-message ()
     ;; your definition here
     ))

OTHER TIPS

I think you need to press C-c C-c

I found doc-view.el source for Emacs 23, and I removed the message from doc-view-buffer-message function. So now when PDF is loaded an empty page is shown which is less confusing, welcome page made it look like the PDF was loaded.

After the changes I did byte-compile-file on the el file, and at the end of my .emacs I load this overriding the original doc-view.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top