Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7405513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:24:56+00:00 2026-05-29T05:24:56+00:00

In Org-mode when I try to open a link to a PDF file nothing

  • 0

In Org-mode when I try to open a link to a PDF file nothing happens. Also, when I do C-c C-e d to export as LaTeX and process to PDF and open the PDF is generated but not opened. How do I make Org-mode open PDF files in Evince?

I am using Org-mode 7.6 in GNU Emacs 23.3.1 and Evince 3.2.1 in Ubuntu 11.10.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:24:56+00:00Added an answer on May 29, 2026 at 5:24 am

    Another possible construct that could work for this would be to use eval-after-load rather than add-hook. It will only set the values once on startup, you won’t have to worry about entries being added or not (unless you regularly reload org).

    Combine that with setcdr and you can avoid having to delete from the list and then re-add, add if and you’ll ensure that you either add or change the value. The if is only needed for values that aren’t in the list by default, just to make sure you don’t end up with conflicts somewhere down the line.

    (eval-after-load "org"
      '(progn
         ;; .txt files aren't in the list initially, but in case that changes
         ;; in a future version of org, use if to avoid errors
         (if (assoc "\\.txt\\'" org-file-apps)
             (setcdr (assoc "\\.txt\\'" org-file-apps) "notepad.exe %s")
           (add-to-list 'org-file-apps '("\\.txt\\'" . "notepad.exe %s") t))
         ;; Change .pdf association directly within the alist
         (setcdr (assoc "\\.pdf\\'" org-file-apps) "evince %s")))
    

    Edit for clarification

    eval-after-load only evaluates the block when (require 'org) is called. If org is already loaded it will evaluate immediately (I mistakenly thought it ran each time a library was loaded, but it seems to be only the first time). The difference between add-hook and eval-after-load is explained here.

    Since org-file-apps is a defcustom it won’t change the values if you set them before org is loaded, if you build the list from scratch (including default values as in your second (uglier) solution) you could simply setq in your init.el and everything would work. It also means it won’t overwrite your changes.

    Adding (if (assoc to the PDF entry won’t hurt anything, it will simply ensure that if PDFs are ever removed from the default org-file-apps that it will still be added. The only solution that would not fail if PDFs were removed is your second one. The others all assume the entry exists in one form or another.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I try to make a custom beamer class for Org-mode by manipulating org-export-latex-classes
http://en.wikipedia.org/wiki/ICalendar I'm working to implement an export feature for events. The link above lists
I'm using org.w3c XML API to open an existing XML file. I'm removing some
I want to give emacs' org-mode a try. What is the shortest path for
I'm using org-mode and am looking to export my agenda ( example of an
I have an org-mode document that I want to convert to open Document format.
When I try to export an Org buffer containing plural biblatex cite macros the
I really love org-mode in emacs and want to customize a few things. While
I can't get 'remember' to work in org-mode of emacs. I'm on snow leopard.
javaspec.org should contain a java-related wiki; but it seems down... Is this only temporary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.