Commit graph

164 commits

Author SHA1 Message Date
Stefan Monnier
c17587fe12 Use expand-file-name rather than concat.
(doc-view-cache-directory): Add the UID so multiple users won't clash.
(doc-view-current-overlay, doc-view-pending-cache-flush): New vars.
(doc-view-goto-page, doc-view-insert-image, doc-view-buffer-message)
(doc-view-toggle-display): Use an overlay over the whole buffer so as
not to have to touch the buffer's content.
(doc-view-initiate-display): New function, extracted from doc-view-mode.
(doc-view-mode): Use it.  Don't mark as a special mode.
Put the page numbers in the modeline.
Set up the overlay.  Hide the cursor.  Run the mode hook.
Use after-revert-hook rather than revert-buffer-function.
(doc-view-search-internal): Fix typo.
(doc-view-convert-current-doc, doc-view-insert-image): Delay the
image-cache flush.
(doc-view-reconvert-doc): Don't reset the whole mode.
(doc-view-make-safe-dir): New function.
(doc-view-current-cache-dir): Use it.
2007-10-30 21:53:05 +00:00
Stefan Monnier
f4c7549775 (doc-view-current-doc): Remove. Replace all uses by buffer-file-name.
(doc-view-menu): New menu.
(doc-view-reconvert-doc): Don't bind inhibit-read-only.  Remove unused `doc'.
(doc-view-sort): Simplify.
(doc-view-buffer-message): Don't change buffer-modified-p.
(doc-view-mode): Change it here instead.
Tighten scoping of prev-major-mode.  Don't re-insert the file's content.
Don't modify the global value of revert-buffer-function.
2007-10-30 17:45:41 +00:00
Glenn Morris
937cb3fb69 Tassilo Horn <tassilo at member.fsf.org>
Remove cl-dependency.
(doc-view-buffer-message): Mention new binding K.
(doc-view-convert-current-doc): Use function d-v-current-cache-dir
instead of variable.
(doc-view-current-cache-dir): Better cache dir naming.
(doc-view-current-display): Remove variable.
(doc-view-edit-doc, doc-view-display-maybe): Remove functions.
(doc-view-kill-proc): Set converter process to nil.
(doc-view-minor-mode): New minor mode.
(doc-view-minor-mode-map): New keymap.
(doc-view-mode): Remove text/image switching code.  Use plain defun.
(doc-view-mode-map): New binding K kills converter process.
Remove C-c C-e binding.
(doc-view-mode-text-map): Remove keymap.
(doc-view-pdf/ps->png): Timer calls d-v-display instead of d-v-display-maybe.
(doc-view-previous-major-mode): New variable.
(doc-view-ps->pdf): Resort args to make ps2pdf happy.
(doc-view-remove-if): New function.
(doc-view-search-next-match, doc-view-search-previous-match): Use it.
(doc-view-toggle-display): Toggle modes instead of display styles.
(doc-view-reconvert-doc): Adapt to new way of doing things.
2007-10-30 06:29:51 +00:00
Stefan Monnier
eb8d0216d4 (doc-view-mode-map): Use remapping.
Don't rebind C-v, M-v to their default value.
Don't bind mouse-4 and mouse-5: it's mwheel.el's job.
2007-10-19 16:03:09 +00:00
Reiner Steib
c9a9a5e389 Remove version keyword.
(doc-view-ghostscript-program, doc-view-dvipdfm-program)
(doc-view-ps2pdf-program): Use executable-find.  Simplify custom type.
(doc-view-ghostscript-options): Improve custom type.
(doc-view-cache-directory, doc-view-conversion-buffer)
(doc-view-conversion-refresh-interval): Simplify custom type.
2007-10-18 19:46:39 +00:00
Reiner Steib
414dd971eb (doc-view-mode-map): Use the image-mode scrolling commands. Don't rebind C-x k. 2007-10-18 19:33:57 +00:00
Reiner Steib
d27180ec62 * doc-view.el (doc-view-dvi->pdf-sentinel, doc-view-dvi->pdf)
(doc-view-pdf/ps->png-sentinel, doc-view-pdf/ps->png)
(doc-view-pdf->txt-sentinel, doc-view-pdf->txt)
(doc-view-ps->pdf-sentinel, doc-view-ps->pdf): Remove superfluous
messages.
2007-10-18 19:30:23 +00:00
Reiner Steib
6a658a3057 (doc-view-ghostscript-options, doc-view-ps->pdf):
Add comment about "-dSAFER".
2007-10-18 19:24:30 +00:00
Reiner Steib
640602f766 * bindings.el (completion-ignored-extensions): Remove pdf and dvi
extensions since they can be viewed with doc-view.

* files.el (auto-mode-alist): Make doc-view-mode the default mode
for pdf, ps and dvi files.

* doc-view.el: Make doc-view-mode the standard mode for viewing
pdf, [e]ps and dvi files and add binding C-c C-c to toggle between
text and image display.  Add binding C-c C-e to switch to an
editing mode.
(doc-view-ghostscript-options, doc-view-ps->pdf): Add "-dSAFER" to
avoid security problems when rendering files untrusted sources.
2007-10-17 21:34:19 +00:00
Reiner Steib
4b378e7546 Mention xpdf. Fix spelling of Ghostscript.
(doc-view-ghostscript-options): Fix typo in doc string.
2007-10-17 20:58:02 +00:00
Michaël Cadilhac
e48a5bf9dd (doc-view-dvi->pdf-sentinel, doc-view-reset-slice)
(doc-view-insert-image): Minor aesthetical docstring changes.
2007-10-03 23:40:07 +00:00
Michaël Cadilhac
1ca678aaf7 (doc-view): Don't ignore pdf and dvi files when completing filename.
(doc-view-search-internal): Docstring change.
2007-10-03 23:28:19 +00:00
Miles Bader
481249ca9a Add arch tagline 2007-09-10 11:53:00 +00:00
Thien-Thi Nguyen
94dbe99c42 Initial revision 2007-09-09 22:29:16 +00:00