emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Problem with docview
Date: Fri, 10 May 2013 14:58:16 -0400	[thread overview]
Message-ID: <87li7moe5z.fsf@pierrot.dokosmarshall.org> (raw)
In-Reply-To: CALQvLVq3nRxhVpxV_Qy49hi70PCtTnf5oYbX5rTfRyaysmKAVA@mail.gmail.com

Marvin Doyley <marvinpas@gmail.com> writes:

> I am trying to link to a specific page in a pdf file using
> org-docview.  For example, I have a org file with the following header
>
> ** [[docview:~/Desktop/2013_test.pdf::3][Digital modulation notes]]
>
> However, when I double click on the link I get the following error
>
> Invalid image file name `nil'
>
> Does anybody know to fix this problem ?
>

Seems to work here[fn:1]. One thing that seems slightly broken is that
if the file is huge and docview takes a while to convert it, then the
goto-page part does not seem to be effective:

,----
| (defun org-docview-open (link)
|   (when (string-match "\\(.*\\)::\\([0-9]+\\)$"  link)
|     (let* ((path (match-string 1 link))
| 	   (page (string-to-number (match-string 2 link))))
|       (org-open-file path 1) ;; let org-mode open the file (in-emacs = 1)
|       ;; to ensure org-link-frame-setup is respected
|       (doc-view-goto-page page)
|       )))
`----

It stays on p.1 in that case. It works OK for small files.

Can you turn on debug-on-error and post the backtrace?

Footnotes:

[fn:1] Org-mode version 8.0.2 (release_8.0.2-72-gccfe83 @ /home/nick/elisp/org-mode/lisp/)

-- 
Nick

  reply	other threads:[~2013-05-10 18:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10 17:25 Problem with docview Marvin Doyley
2013-05-10 18:58 ` Nick Dokos [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-05-11 11:12 Marvin Doyley
2013-05-11 14:05 ` Nick Dokos
2013-05-11 18:56 Marvin Doyley
2013-05-11 19:23 ` Nick Dokos
2013-05-11 20:25 Marvin Doyley
2013-05-11 22:25 ` Nick Dokos
2013-05-11 22:32   ` Nick Dokos
2013-05-11 23:15 Marvin Doyley

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=87li7moe5z.fsf@pierrot.dokosmarshall.org \
    --to=ndokos@gmail.com \
    --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).