0

After upgrading to Emacs 27, I noticed that, for any org document, C-c C-e l o now behaves on my computer as C-c C-e l p: i.e., the pdf is correctly produced, but is not displayed anymore on side window.

Even when opening the document with emacs -q, I have the same behavior, so I guess that the problem is not related to my init file. (However, all my pdfs used to be displayed in Emacs with pdf-tools and not with the standard doc-view: don't know if this may be part of the problem.)

Anyway, when I run a C-c C-e l o on a file essai.org, I have the following output in the *Messages* buffer:

Processing LaTeX file essai.tex...
PDF file produced.
Running /usr/bin/xdg-open /home/fs/Documents/essai.pdf...done

but no buffer is created and displayed within Emacs for the pdf output. I have no clue for that problem...

Thanks!

11
  • 1
    Thank you for bringing this up, I have been experiencing exactly the same problem since updating to Emacs 27 - hopefully somebody can help us with that.
    – perceg
    Sep 10, 2020 at 1:23
  • 1
    I am also experiencing the same problem with emacs 27.1 running on Windows 10 build 19041.450. There is no problem viewing PDF files on emacs 26.3.
    – Alvin Sim
    Sep 11, 2020 at 14:03
  • 1
    It's probably not an emacs issue at all: what happens when you run usr/bin/xdg-open /home/fs/Documents/essai.pdf from the command line?
    – NickD
    Sep 14, 2020 at 19:48
  • 1
    ... and it's also a matter of expectations: apparently, some setting in emacs says "display pdfs using an external application" which is why xdg-open is called, but you are expecting the pdf to be opened in an emacs buffer using docview or perhaps pdf-tools.
    – NickD
    Sep 14, 2020 at 19:51
  • 1
    Does this answer your question? How to use pdf-tools (pdf-view-mode) in emacs?
    – Tyler
    Sep 16, 2020 at 3:05

1 Answer 1

2

A solution kindly given by a member of org-mode mailing list: simply add

(push '("\\.pdf\\'" . emacs) org-file-apps)

in the .emacs file.

This works for me.

4
  • Unfortunately, this is not working for me. In the Messages buffer, I see this message 'Conversion utility "rungs" not available for pdf'. Is this solution OS-specific? I am on Windows 10.
    – Alvin Sim
    Sep 16, 2020 at 13:04
  • 1
    Ignore my comment. It was something in my emacs config that prevented it to open PDF files with this solution. It is working now.
    – Alvin Sim
    Sep 16, 2020 at 13:52
  • Good to know! Just a question: do you use pdf-tools to display your pdfs, or just the standard DocView? (See @Tyler comment above.)
    – Philopolis
    Sep 16, 2020 at 14:37
  • I believe I am using DocView. I was getting DocView specific errors when I opened PDF files in emacs-27.1.
    – Alvin Sim
    Sep 18, 2020 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.