From: "Jan Böcker" <jan.boecker@jboecker.de>
To: dmg@uvic.ca
Cc: emacs-orgmode@gnu.org
Subject: Re: protocol for PDFs?
Date: Sat, 02 Jan 2010 16:16:59 +0100 [thread overview]
Message-ID: <4B3F636B.20903@jboecker.de> (raw)
In-Reply-To: <86oclclxlt.fsf@mn.cs.uvic.ca>
On 02.01.2010 09:28, D M German wrote:
>
> hi there,
>
> I am trying to add support in Evince and Xournal for org. I have already
> implemented most of it in Xournal, but now I am hitting a roadblock.
> What would the form of the URI for a link to a PDF document and a page
> be?
>
> In other words, is there support for a link to a given page in a PDF
> already written in org?
Hi, I am the author of org-docview.el, which adds support for links to
the doc-view-mode of Emacs 23 and is merged in the current master branch
of org-mode.
It allows you to link to any document format which doc-view-mode
supports, which includes PDF files. The syntax is:
docview:<file name>::<page number>
Example:
[[docview:/home/jan/some-file.pdf::7][Page 7]]
Of course, these links open the file by visiting it in emacs.
I would propose to modify org-docview.el to look in org-file-apps for an
entry for \.pdf\'
- If you want to use doc-view-mode to view the PDFs, specify "Visit in
Emacs"
- If you want to use an external viewer, specify that
In the case of an external viewer, org-docview.el would have to know how
to pass the page number on to that viewer, maybe replace %p by the page
number, then pass that on to org-open-file-from-string.
This reminds me again of the fact that docview: links are basically the
same as file: links, but instead of specifying a line number, they
specify a page number. org-docview.el already uses the file: link
functions to do most of the heavy lifting (e.g. to respect
org-link-file-path-type).
I wonder if this separate syntax for "link to a specific line" and "link
to a specific page" is a bad thing, but I also do not want to mess with
the core too much.
PS: I am very interested in integrating Xournal with Org. I use Xournal
for doing all my homework for university; when I have saved the file, I
manually add a file: link to my org file. It would be great to store
that link directly from Xournal!
- Jan
next prev parent reply other threads:[~2010-01-02 15:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-02 8:28 protocol for PDFs? D M German
2010-01-02 15:16 ` Jan Böcker [this message]
2010-01-02 20:07 ` D M German
2010-01-02 21:17 ` D M German
[not found] ` <86bphbhbmh.fsf@mn.cs.uvic.ca>
2010-01-04 16:09 ` Sebastian Rose
2010-01-02 15:20 ` Darlan Cavalcante Moreira
2010-01-02 19:23 ` Jan Böcker
2010-01-02 20:17 ` D M German
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B3F636B.20903@jboecker.de \
--to=jan.boecker@jboecker.de \
--cc=dmg@uvic.ca \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).