Description of problem: I want to export an .org file to .pdf with emacs org-mode. I can do this with the command C-c C-e d. This should also open the pdf file after the export is done, but it does not. Version-Release number of selected component (if applicable): GNU Emacs 24.2.1 How reproducible: Always Steps to Reproduce: 1. Create a .org file with emacs. 2. Export the file within emacs to pdf with the command C-c C-e d Actual results: The pdf file is generated but not automatically opened after export. Expected results: The pdf file should be opened in with the default pdf reader after export. Additional info:
Could you please attached any org file for testing? I will investigate on that issue. Thank you in advance.
Well. I thought that the org file has some special format. But it can be the random file. By the way how did you exported PDF? org-export-as-pdf?
Created attachment 760931 [details] org-file for export to pdf
I have attached the file I was working on. I use the command: org-export-as-pdf-and-open which should be the same as C-c C-e d Thanks.
Hi Fredrik, Could you please tell me whether this command on command line works? xdg-open <your.pdf> It should be default PDF program for emacs. What is output of your C-c C-e d macro?
Hi Petr, Yes the command xdg-open works fine for me. The output I get (from the message buffer) is: Exporting to PDF... Exporting to LaTeX... Saving file /home/fredrik/Documents/Anteckningar/Firefox/Firefox_Extentions.tex... Wrote /home/fredrik/Documents/Anteckningar/Firefox/Firefox_Extentions.tex Saving file /home/fredrik/Documents/Anteckningar/Firefox/Firefox_Extentions.tex... Wrote /home/fredrik/Documents/Anteckningar/Firefox/Firefox_Extentions.tex LaTeX export done, pushed to kill ring and clipboard Processing LaTeX file /home/fredrik/Documents/Anteckningar/Firefox/Firefox_Extentions.tex...done Exporting to PDF...done is this enough or should I look for output somewhere else?
Hi Fredrik, Thank you for the buffer. I found that in /usr/share/emacs/24.2/lisp/org/org.el{c} is declared variable like org-file-apps This variable refers to default PDF viewer: ("\\.pdf\\'" . default) when the default is exchanged with another PDF viewer like xpdf then generated pdf file is successfully opened in emacs window.
Hi Petr, OK, good. Thank you for the information! Will this be changed?
Well it seems as on my computer that default application is not setup. I suggest to do that test: 1) get what the application is assigned to pdf command is: xdg-mime query filetype <full_path_to_pdf> Output should be: application/pdf 2) get application is setup as default command is: xdg-mime query default application/pdf In my system (F19) result is: evince.desktop It seems like emacs does not honor xdg and I think that it is OS specific. I have to clarify that.
For Fedora case raw will be change so: ("\\.pdf\\'" . xdg-open) which mean that default application will be taken from evince.
emacs-24.3-11.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/emacs-24.3-11.fc19
scm-commit rawhide (https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20130812/1092351.html) scm-commit f19 (https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20130812/1092357.html) -> MODIFIED Steps how to validate that fix are above.
Thank you for the fix I will test this when I get back my Fedora computer.
Package emacs-24.3-11.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing emacs-24.3-11.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-14826/emacs-24.3-11.fc19 then log in and leave karma (feedback).
emacs-24.3-11.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
Hi, when I try to do this in Fedora 19 KDE version the PDF opens but inside of Emacs and not in Okular which is set as the default PDF reader.