Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 971162 - org-mode export to pdf with command 'd' does not open pdf file
org-mode export to pdf with command 'd' does not open pdf file
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: emacs (Show other bugs)
19
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Petr Hracek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-05 16:55 EDT by Fredrik Nyqvist
Modified: 2013-08-18 13:43 EDT (History)
3 users (show)

See Also:
Fixed In Version: emacs-24.3-11.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-17 20:33:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
org-file for export to pdf (2.00 KB, application/vnd.lotus-organizer)
2013-06-13 15:39 EDT, Fredrik Nyqvist
no flags Details

  None (edit)
Description Fredrik Nyqvist 2013-06-05 16:55:59 EDT
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:
Comment 1 Petr Hracek 2013-06-13 09:23:12 EDT
Could you please attached any org file for testing?

I will investigate on that issue.

Thank you in advance.
Comment 2 Petr Hracek 2013-06-13 09:34:09 EDT
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?
Comment 3 Fredrik Nyqvist 2013-06-13 15:39:10 EDT
Created attachment 760931 [details]
org-file for export to pdf
Comment 4 Fredrik Nyqvist 2013-06-13 15:40:07 EDT
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.
Comment 5 Petr Hracek 2013-06-25 06:21:40 EDT
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?
Comment 6 Fredrik Nyqvist 2013-06-25 15:04:26 EDT
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?
Comment 7 Petr Hracek 2013-06-26 03:05:30 EDT
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.
Comment 8 Fredrik Nyqvist 2013-06-26 17:34:39 EDT
Hi Petr,

OK, good. Thank you for the information!

Will this be changed?
Comment 9 Petr Hracek 2013-08-13 07:34:48 EDT
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.
Comment 10 Petr Hracek 2013-08-14 09:21:06 EDT
For Fedora case raw will be change so:
("\\.pdf\\'" . xdg-open)
which mean that default application will be taken from evince.
Comment 11 Fedora Update System 2013-08-15 02:44:39 EDT
emacs-24.3-11.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/emacs-24.3-11.fc19
Comment 12 Petr Hracek 2013-08-15 02:48:18 EDT
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.
Comment 13 Fredrik Nyqvist 2013-08-15 11:37:57 EDT
Thank you for the fix I will test this when I get back my Fedora computer.
Comment 14 Fedora Update System 2013-08-15 19:27:13 EDT
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).
Comment 15 Fedora Update System 2013-08-17 20:33:19 EDT
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.
Comment 16 Fredrik Nyqvist 2013-08-18 13:43:45 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.