all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* orgmode & pdf-tools
@ 2016-04-03 10:19 AW
  2016-04-19 19:53 ` AW
  0 siblings, 1 reply; 5+ messages in thread
From: AW @ 2016-04-03 10:19 UTC (permalink / raw)
  To: emacs-orgmode

Hi!

Linux, Orgmode 8.3.4, org-file with many links. Recently I discovered pdf-
tools, which can display PDFs inside Emacs, just like docview, but much 
faster. 

I'd like to 

1. open via a given link from inside the org-file using C-c C-o 

2. the PDF with pdf-tools 

3. on a given page. 

Result: PDF is being opened, but always on p. 1 instead of e.g. page 5!

.emacs:

(eval-after-load 'org '(require 'org-pdfview))
(delete '("\\.pdf\\'" . default) org-file-apps)
(add-to-list 'org-file-apps '("\\.pdf\\'" . org-pdfview-open))
(add-to-list 'org-file-apps '("\\.pdf::\\([[:digit:]]+\\)\\'" . org-pdfview-
open))

link in org-file:

[[./localfile.pdf::5]]


Same setup works under windows with other viewer. So probably there is an 
error in those lines above. Any hints? -- Thank you!

Regards,

Alexander

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: orgmode & pdf-tools
  2016-04-03 10:19 orgmode & pdf-tools AW
@ 2016-04-19 19:53 ` AW
  2016-07-24 18:03   ` Pablo S. Casas
  0 siblings, 1 reply; 5+ messages in thread
From: AW @ 2016-04-19 19:53 UTC (permalink / raw)
  To: emacs-orgmode

. . .   A N D  openSUSE!

Links of the form [[./foo.pdf::3]] still are being opened on p. 1 instead of 
page 3. For description of my issue, see my report from April 3rd below. 

Me, being a user, I can't solve this. I'm on openSuse, current Tumbleweed. I 
managed to install PDF-Tools properly, after I found out that you need to 
install Cask before loading down the package via Melpa.

Those lines below from my .emacs work in other installations, as the 
maintainer of org-pdfview.el wrote. 
(https://github.com/markus1189/org-pdfview/issues/10)

I build a short .emacs, only the necessary links and packages, to orgmode and 
PDF-Tools. No success. 

IS SOMEBODY READING THIS WHO USES openSUSE ?

I tried but failed to find an error with edebug, but this seems way beyond my 
skills. 

Am Sonntag, 3. April 2016, 12:19:33 CEST schrieb AW:
> Hi!
> 
> Linux, Orgmode 8.3.4, org-file with many links. Recently I discovered pdf-
> tools, which can display PDFs inside Emacs, just like docview, but much
> faster.
> 
> I'd like to
> 
> 1. open via a given link from inside the org-file using C-c C-o
> 
> 2. the PDF with pdf-tools
> 
> 3. on a given page.
> 
> Result: PDF is being opened, but always on p. 1 instead of e.g. page 5!
> 
> .emacs:
> 
> (eval-after-load 'org '(require 'org-pdfview))
> (delete '("\\.pdf\\'" . default) org-file-apps)
> (add-to-list 'org-file-apps '("\\.pdf\\'" . org-pdfview-open))
> (add-to-list 'org-file-apps '("\\.pdf::\\([[:digit:]]+\\)\\'" . org-pdfview-
> open))
> 
> link in org-file:
> 
> [[./localfile.pdf::5]]
> 
> 
> Same setup works under windows with other viewer. So probably there is an
> error in those lines above. Any hints? -- Thank you!
> 
> Regards,
> 
> Alexander

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: orgmode & pdf-tools
  2016-04-19 19:53 ` AW
@ 2016-07-24 18:03   ` Pablo S. Casas
  2016-07-25 11:47     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo S. Casas @ 2016-07-24 18:03 UTC (permalink / raw)
  To: AW; +Cc: emacs-orgmode

From: AW <alexander.willand@t-online.de>
Subject: Re: [O] orgmode & pdf-tools
Date: Tue, 19 Apr 2016 21:53:23 +0200

> . . .   A N D  openSUSE!
> 
> Links of the form [[./foo.pdf::3]] still are being opened on p. 1 instead of 
> page 3. For description of my issue, see my report from April 3rd below. 
> 
> Me, being a user, I can't solve this. I'm on openSuse, current Tumbleweed. I 
> managed to install PDF-Tools properly, after I found out that you need to 
> install Cask before loading down the package via Melpa.
> 
> Those lines below from my .emacs work in other installations, as the 
> maintainer of org-pdfview.el wrote. 
> (https://github.com/markus1189/org-pdfview/issues/10)
> 
> I build a short .emacs, only the necessary links and packages, to orgmode and 
> PDF-Tools. No success. 
> 
> IS SOMEBODY READING THIS WHO USES openSUSE ?
> 
> I tried but failed to find an error with edebug, but this seems way beyond my 
> skills. 
> 
> Am Sonntag, 3. April 2016, 12:19:33 CEST schrieb AW:
>> Hi!
>> 
>> Linux, Orgmode 8.3.4, org-file with many links. Recently I discovered pdf-
>> tools, which can display PDFs inside Emacs, just like docview, but much
>> faster.
>> 
>> I'd like to
>> 
>> 1. open via a given link from inside the org-file using C-c C-o
>> 
>> 2. the PDF with pdf-tools
>> 
>> 3. on a given page.
>> 
>> Result: PDF is being opened, but always on p. 1 instead of e.g. page 5!
>> 
>> .emacs:
>> 
>> (eval-after-load 'org '(require 'org-pdfview))
>> (delete '("\\.pdf\\'" . default) org-file-apps)
>> (add-to-list 'org-file-apps '("\\.pdf\\'" . org-pdfview-open))
>> (add-to-list 'org-file-apps '("\\.pdf::\\([[:digit:]]+\\)\\'" . org-pdfview-
>> open))
>> 
>> link in org-file:
>> 
>> [[./localfile.pdf::5]]
>> 
>> 
>> Same setup works under windows with other viewer. So probably there is an
>> error in those lines above. Any hints? -- Thank you!
>> 
>> Regards,
>> 
>> Alexander

   After edebugging org-open-file I found a possible solution. The
documentation string for org-file-apps should be modified for the sexp
case to use the link variable instead of file.

#+BEGIN_SRC elisp
(add-to-list 'org-file-apps '("\\.pdf\\'" . (org-pdfview-open link)))
(add-to-list 'org-file-apps '("\\.pdf::\\(\\d+\\)\\'" . (org-pdfview-open link)))
#+END_SRC

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: orgmode & pdf-tools
  2016-07-24 18:03   ` Pablo S. Casas
@ 2016-07-25 11:47     ` Nicolas Goaziou
  2016-08-16 11:19       ` AW
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2016-07-25 11:47 UTC (permalink / raw)
  To: Pablo S. Casas; +Cc: AW, emacs-orgmode

Hello,

Pablo S. Casas <pabloscasas@gmail.com> writes:

>    After edebugging org-open-file I found a possible solution. The
> documentation string for org-file-apps should be modified for the sexp
> case to use the link variable instead of file.
>
> #+BEGIN_SRC elisp
> (add-to-list 'org-file-apps '("\\.pdf\\'" . (org-pdfview-open link)))
> (add-to-list 'org-file-apps '("\\.pdf::\\(\\d+\\)\\'" . (org-pdfview-open link)))
> #+END_SRC

I'm not sure about what the initial problem is, but there is no more
"sexp" case in `org-file-apps' in development version. You can use
a function instead.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: orgmode & pdf-tools
  2016-07-25 11:47     ` Nicolas Goaziou
@ 2016-08-16 11:19       ` AW
  0 siblings, 0 replies; 5+ messages in thread
From: AW @ 2016-08-16 11:19 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Pablo S. Casas, Nicolas Goaziou

Am Montag, 25. Juli 2016, 13:47:25 CEST schrieb Nicolas Goaziou:
> Hello,
> 
> Pablo S. Casas <pabloscasas@gmail.com> writes:
> >    After edebugging org-open-file I found a possible solution. The
> > 
> > documentation string for org-file-apps should be modified for the sexp
> > case to use the link variable instead of file.
> > 
> > #+BEGIN_SRC elisp
> > (add-to-list 'org-file-apps '("\\.pdf\\'" . (org-pdfview-open link)))
> > (add-to-list 'org-file-apps '("\\.pdf::\\(\\d+\\)\\'" . (org-pdfview-open
> > link))) #+END_SRC
> 
> I'm not sure about what the initial problem is, but there is no more
> "sexp" case in `org-file-apps' in development version. You can use
> a function instead.
> 
> 
> Regards,

@ Pablo, thank you, that solved it! Great!

@ all:
My initial setup was:

(eval-after-load 'org '(require 'org-pdfview))
 (delete '("\\.pdf\\'" . default) org-file-apps)
 (add-to-list 'org-file-apps '("\\.pdf\\'" . org-pdfview-open))
(add-to-list 'org-file-apps '("\\.pdf::\\([[:digit:]]+\\)\\'" . org-pdfview-
open))

Now and working:

 (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)))

So the way to include org-pdfview-open did not work with openSuse and Emacs 
24.5

If somebody _please_ could swap the "sexp" in org-file-apps with whatever 
function, as Nicolas mentioned? It really is helpful to open a lengthy PDF at 
the right page...

And sorry for answering so late, I missed the email.

Regards,

Alexander

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-16 11:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-03 10:19 orgmode & pdf-tools AW
2016-04-19 19:53 ` AW
2016-07-24 18:03   ` Pablo S. Casas
2016-07-25 11:47     ` Nicolas Goaziou
2016-08-16 11:19       ` AW

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.