[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Doc-view at specific page number
From: |
Nick Dokos |
Subject: |
Re: Doc-view at specific page number |
Date: |
Tue, 17 Sep 2019 15:16:01 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Jean Louis <bugs@gnu.support> writes:
> Is there any way to use doc-view to open PDF at specific page number?
>
> I know there is function doc-view-goto-page, I would like to open PDF
> file at specific page number.
>
(add-hook 'doc-view-mode-hook (lambda () (doc-view-goto-page 10)))
will open *every* PDF file at page 10 (not sure what happens if
there is no page 10), but I presume you will want to make it
interactive. So you can write a function that asks for the page
number, and adds something like this to the doc-view-mode-hook,
after cleaning up any previous such setting. Then add it as a -before
advice to find-file.
I tested the hook setting but not the rest of it: caveat emptor.
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler