From: AW <alexander.willand@t-online.de>
To: emacs-orgmode@gnu.org
Subject: Adapting to orgmode 9.0: deprecated usage of (org-pdfview-open link) - howto ?
Date: Wed, 09 Nov 2016 11:01:13 +0100 [thread overview]
Message-ID: <7214691.semUaP70I3@linux-k2bd.site> (raw)
Hi!
To display a PDF from orgmode, I'm using pdf-tools and a package called org-
pdfview.
Code from .emacs to this end:
,----
| (eval-after-load 'org '(require 'org-pdfview))
| (delete '("\\.pdf\\'" . default) org-file-apps)
| (add-to-list 'org-file-apps '("\\.pdf\\'" . (org-pdfview-open link)))
| (add-to-list 'org-file-apps '("\\.pdf::\\(\\d+\\)\\'" . (org-pdfview-open
link)))
`----
Error message, when trying to open a link using C-c C-o:
,----
| user-error: Please see Org News for version 9.0 about `org-file-apps'--
Error:
| Deprecated usage of (org-pdfview-open link)
`----
Unfortunately I'm lacking the elisp skills to understand the hint in the Org
News:
,----
| *** ~org-file-apps~ no longer accepts S-expressions as commands
|
| The variable now accepts functions of two arguments instead of plain
| S-expressions. Replacing a S-expresion with an appropriate function
| is straightforward. For example
|
| : ("pdf" . (foo))
|
| becomes
|
| : ("pdf" . (lambda (file link) (foo)))
`----
OK, I don't speak lisp, but I tried this in my .emacs:
,----
| (add-to-list 'org-file-apps '("\\.pdf\\'" . (lambda (link) ( org-pdfview-
open))))
| (add-to-list 'org-file-apps '("\\.pdf::\\(\\d+\\)\\'" . (lambda (link) (org-
pdfview-open))))
`----
Well, error message when trying to open a link to a PDF:
,----
| user-error: Please see Org News for version 9.0 about `org-file-apps'--Lisp
error: (lambda (link) (org-pdfview-open))
`----
Maybe someone can help me to adapt the code; would appreciate much!
Regards,
Alexander
next reply other threads:[~2016-11-09 10:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 10:01 AW [this message]
2016-11-09 17:00 ` Adapting to orgmode 9.0: deprecated usage of (org-pdfview-open link) - howto ? Pablo S. Casas
2016-11-09 19:10 ` AW
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7214691.semUaP70I3@linux-k2bd.site \
--to=alexander.willand@t-online.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.