summaryrefslogtreecommitdiff
path: root/lisp/doc-view.el
AgeCommit message (Collapse)Author
2008-03-31Compute displayed pages first (in PDF).Stefan Monnier
(doc-view-current-converter-processes): Rename from doc-view-current-converter-process. Update users. (doc-view-sentinel): Test buffer's liveness. (doc-view-pdf/ps->png-sentinel): Remove. (doc-view-start-process): New function. (doc-view-dvi->pdf, doc-view-pdf/ps->png, doc-view-pdf->txt) (doc-view-ps->pdf): Use it. (doc-view-pdf->png-1, doc-view-pdf->png, doc-view-active-pages): New functions. (doc-view-convert-current-doc, doc-view-goto-page): Use them. (doc-view-mode): Kill the processes when leaving the mode.
2008-03-18(doc-view-initiate-display): Use doc-view-doc-typeTassilo Horn
instead of file name extension to make docs with uncommon extensions work.
2008-03-18(require): Require cl at compile time becauseTassilo Horn
`assert' needs it.
2008-03-16(doc-view-doc->txt, doc-view-convert-current-doc):Tassilo Horn
Use non-nil PARENTS attribute of make-directory instead of explicitly checking existence the current cache directory.
2008-03-13(doc-view-doc->txt, doc-view-convert-current-doc):Tassilo Horn
Create cache dir only if it doesn't already exist.
2008-03-12Remove all cb-args, use closures instead.Stefan Monnier
(doc-view-sentinel): Merge doc-view-dvi->pdf-sentinel, doc-view-ps->pdf-sentinel, and doc-view-pdf->txt-sentinel (which was doing an incorrect check). Update all callers to use the new name. (doc-view-doc->txt): Add missing `txt' argument.
2008-03-12(doc-view-current-cache-dir): Set buffer used forTassilo Horn
md5 sum calculation to single-byte.
2008-03-12(doc-view-new-window-function): Add assertion.Stefan Monnier
(doc-view-doc-type): New var. (doc-view-convert-current-doc, doc-view-doc->txt): Use it. (doc-view-intersection): New fun. (doc-view-mode): Use it to set the new var.
2008-03-12(doc-view-doc->txt, doc-view-open-text)Tassilo Horn
(doc-view-already-converted-p): New functions. (doc-view-clear-cache): Don't recreate doc-view-cache-directory. (doc-view-mode-map): Bind C-c C-t to doc-view-open-text. (doc-view-dvi->pdf-sentinel, doc-view-dvi->pdf) (doc-view-pdf->txt-sentinel, doc-view-pdf->txt) (doc-view-ps->pdf-sentinel, doc-view-ps->pdf) (doc-view-convert-current-doc): Don't hardwire the functions the sentinels call. Now they're provided by two args CALLBACK and CB-ARGS to the functions. (doc-view-search): Use doc-view-doc->txt. (doc-view-initiate-display): Use doc-view-already-converted-p. Mention new binding C-c C-t if doc-view-mode doesn't work.
2008-03-09(bookmark-buffer-file-name, bookmark-prop-get): Declare.Stefan Monnier
(doc-view-bookmark-make-record): Use them. (doc-view-bookmark-jump): Use them. Fix find-file -> find-file-noselect. (bookmark-get-filename, bookmark-get-bookmark-record): Remove.
2008-03-09* bookmark.el (bookmark-make): Don't pass the `annotation' to theStefan Monnier
make-record function, instead paste it in afterwards. (bookmark-make-record-for-text-file): * doc-view.el (doc-view-bookmark-make-record): * info.el (Info-bookmark-make-record): Don't mess with annotations.
2008-03-07(doc-view-bookmark-make-record): Delete obsoleteTassilo Horn
second arg.
2008-03-07Change a return type, for greater extensibility. SeeKarl Fogel
http://lists.gnu.org/archive/html/emacs-devel/2007-12/msg01077.html and its thread for discussion leading to this change. * emacs-cvs/lisp/bookmark.el: (bookmark-jump-noselect): Return an alist instead of a dotted pair. (bookmark-jump, bookmark-jump-other-window, bookmark-insert) (bookmark-bmenu-2-window, bookmark-bmenu-other-window) (bookmark-bmenu-switch-other-window): Adjust accordingly. (bookmark-make-cell-function): Adjust documentation accordingly. * emacs-cvs/lisp/image-mode.el (image-bookmark-jump): Adjust return type accordingly; document. * emacs-cvs/lisp/doc-view.el (doc-view-bookmark-jump): Adjust return type accordingly; document.
2008-02-26(doc-view-current-page): Add a `win' argument.Stefan Monnier
2008-02-25(doc-view-conversion-buffer): Give it an internal name.Stefan Monnier
Demote it to plain defvar. (doc-view-conversion-refresh-interval): Reduce interval. (doc-view-goto-page): Allow moving to pages not yet rendered. (doc-view-goto-page): Construct a file name rather than extracting it from doc-view-current-files. (doc-view-kill-proc): Ignore errors from kill-process. (doc-view-pdf/ps->png-sentinel): Die gracefully if the buffer is dead. (doc-view-insert-image): Use appropriate text if the page hasn't been rendered yet. Adjust scrolling so the text is displayed. (doc-view-display): Detect not just that a page is available, but also that it wasn't available before, to avoid refreshing all pages repeatedly. (doc-view-mode): Make doc-view-cache-directory if needed.
2008-02-21Allow different windows to show different pages.Stefan Monnier
(doc-view-current-page, doc-view-current-slice, doc-view-current-info) (doc-view-current-image, doc-view-current-overlay): Remove variables, add them back as macros instead, using image-mode-winprops instead. Update all users of those variables. (doc-view-new-window-function): New function to create a new overlay for each new window. (doc-view-mode): Use it and image-mode-setup-winprops. (doc-view-clone-buffer-hook): Rewrite accordingly.
2008-02-12(doc-view-display): Change file arg to buffer arg, so itStefan Monnier
works also for buffers w/o buffer-file-name. Update callers. (doc-view-clone-buffer-hook): New fun. (doc-view-mode): Use it for indirect clones. Mark the overlays with the `doc-view' property so they can be recognized.
2008-02-10Add todo entries.Stefan Monnier
2008-02-01(doc-view-mode): Improve docstring.Stefan Monnier
2008-01-29* doc-view.el (doc-view-mode): Adapt to i-m-current-[vh]scrollTassilo Horn
being an alist now.
2008-01-292008-01-29 Tassilo Horn <tassilo@member.fsf.org>Tassilo Horn
* doc-view.el (doc-view-mode): Use facilities of image-mode to restore [vh]scroll when switching buffers.
2008-01-19(doc-view-goto-page): Don't move point any more, now thatStefan Monnier
the hscroll behavior was fixed. (doc-view-mode): Disable auto-hscroll-mode.
2008-01-18(doc-view-pdf/ps->png): Make sure we a have a valid cwd.Stefan Monnier
(doc-view-insert-image): Do something if the image is missing. (doc-view-mode): Don't use file-remote-p.
2008-01-102008-01-10 Tassilo Horn <tassilo@member.fsf.org>Tassilo Horn
* doc-view.el (doc-view-buffer-file-name): New variable. (doc-view-convert-current-doc, doc-view-search) (doc-view-current-cache-dir, doc-view-initiate-display) (doc-view-mode): Use it. (doc-view-bookmark-make-cell): Use variable buffer-file-name instead of function.
2008-01-102008-01-10 Tassilo Horn <tassilo@member.fsf.org>Tassilo Horn
* doc-view.el (tramp): Require tramp because we use tramp-tramp-file-p.
2008-01-092008-01-09 Tassilo Horn <tassilo@member.fsf.org>Tassilo Horn
* doc-view.el (doc-view-mode): Support tramp, compressed files and files inside archives uniformly.
2008-01-092008-01-09 Tassilo Horn <tassilo@member.fsf.org>Tassilo Horn
* doc-view.el (doc-view-mode-p): Add EPS as supported type. (doc-view-mode): Support document files inside archives.
2008-01-042008-01-04 Tassilo Horn <tassilo@member.fsf.org>Tassilo Horn
* doc-view.el (doc-view-scroll-up-or-next-page) (doc-view-scroll-down-or-previous-page): Don't scroll to the top/bottom again when on the first/last page.
2008-01-042008-01-04 Tassilo Horn <tassilo@member.fsf.org>Tassilo Horn
* doc-view.el (doc-view-mode-map): Remap scroll-{up,down} to image-scroll-{up,down}.
2008-01-042008-01-04 Tassilo Horn <tassilo@member.fsf.org>Tassilo Horn
* doc-view.el (doc-view-scroll-up-or-next-page) (doc-view-scroll-down-or-previous-page): Use image-scroll-up and image-scroll-down instead of the non-image equivalents. Don't rely on a signalled condition but switch pages when scrolling doesn't change the vertical position anymore.
2008-01-04(doc-view-search-internal): Don't use `incf'.Glenn Morris
(bookmark-make-cell-function, bookmark-get-filename) (bookmark-get-bookmark-record): Declare for compiler. Move footer text back to end of file.
2008-01-02Add arch taglineMiles Bader
2008-01-02Change a return type, for greater extensibility. SeeKarl Fogel
http://lists.gnu.org/archive/html/emacs-devel/2007-12/msg01077.html and its thread for discussion leading to this change. * emacs-cvs/lisp/bookmark.el: (bookmark-jump-noselect): Return an alist instead of a dotted pair. (bookmark-jump, bookmark-jump-other-window, bookmark-insert) (bookmark-bmenu-2-window, bookmark-bmenu-other-window) (bookmark-bmenu-switch-other-window): Adjust accordingly. (bookmark-make-cell-function): Adjust documentation accordingly. * emacs-cvs/lisp/image-mode.el (image-bookmark-jump): Adjust return type accordingly; document. * emacs-cvs/lisp/doc-view.el (doc-view-bookmark-jump): Adjust return type accordingly; document.
2007-12-262007-12-26 Tassilo Horn <tassilo@member.fsf.org>Tassilo Horn
* image-mode.el (image-bookmark-make-cell, image-bookmark-jump): New functions. (image-mode): Set bookmark-make-cell-function appropriately. * doc-view.el (doc-view-bookmark-jump): Correct misspelled arg name.
2007-12-262007-12-26 Tassilo Horn <tassilo@member.fsf.org>Tassilo Horn
* bookmark.el (bookmark-make-cell-function): New variable. (bookmark-make): Call bookmark-make-cell-function's function instead of bookmark-make-cell. (bookmark-get-handler, bookmark-jump-internal): New functions. (bookmark-jump, bookmark-jump-other-window, bookmark-insert) (bookmark-bmenu-2-window, bookmark-bmenu-other-window): Use bookmark-jump-internal. (bookmark-make-cell-for-text-file): Renamed from bookmark-make-cell. * doc-view.el (doc-view-bookmark-make-cell) (doc-view-bookmark-jump): New functions. (doc-view-mode): Set bookmark-make-cell-function buffer-locally.
2007-12-06(doc-view-dvi->pdf-sentinel, doc-view-pdf/ps->png-sentinel)Stefan Monnier
(doc-view-pdf->txt-sentinel, doc-view-ps->pdf-sentinel, doc-view-display): Don't change buffer within a sentinel or timer. (doc-view-display): Don't try to display before the requested page is available, unless told to do so explicitly. (doc-view-pdf/ps->png-sentinel, doc-view-initiate-display): Force display even if the requested page is not available.
2007-12-03(doc-view-initiate-display): Use `doc-view-mode-p'.Reiner Steib
(doc-view-current-overlay, doc-view-pending-cache-flush): Add doc string.
2007-11-25(doc-view-mode-p): New function.Reiner Steib
2007-11-16* doc-view.el (doc-view-search-backward, doc-view-search): FixDan Nicolaescu
assignment to free variable bug.
2007-11-16* smime.el (from):Dan Nicolaescu
* rfc2047.el (message-posting-charset): * qp.el (mm-use-ultra-safe-encoding): * pop3.el (parse-time-months): * nnrss.el (mm-text-html-renderer, mm-text-html-washer-alist): * nnml.el (files): * nnheader.el (gnus-newsgroup-name, nnheader-file-coding-system) (jka-compr-compression-info-list, ange-ftp-path-format) (efs-path-regexp): * nndiary.el (files): * mml2015.el (mc-default-scheme, mc-schemes, pgg-default-user-id) (pgg-errors-buffer, pgg-output-buffer, epg-user-id-alist) (epg-digest-algorithm-alist, inhibit-redisplay) (password-cache-expiry): * mml1991.el (pgg-default-user-id, pgg-errors-buffer) (pgg-output-buffer, password-cache-expiry): * mml.el (mml-dnd-protocol-alist, ange-ftp-name-format) (efs-path-regexp): * mml-smime.el (epg-user-id-alist, epg-digest-algorithm-alist) (inhibit-redisplay): * mm-uu.el (file-name, start-point, end-point, entry) (gnus-newsgroup-name, gnus-newsgroup-charset): * mm-util.el (mm-mime-mule-charset-alist, latin-unity-coding-systems) (latin-unity-ucs-list): * mm-bodies.el (mm-uu-yenc-decode-function, mm-uu-decode-function) (mm-uu-binhex-decode-function): * message.el (gnus-message-group-art, gnus-list-identifiers, ) (rmail-enable-mime-composing, gnus-local-organization) (gnus-post-method, gnus-select-method, gnus-active-hashtb) (gnus-read-active-file, facemenu-add-face-function) (facemenu-remove-face-function, gnus-article-decoded-p) (tool-bar-mode): * mail-source.el (display-time-mail-function): * gnus-util.el (nnmail-pathname-coding-system) (nnmail-active-file-coding-system, gnus-emphasize-whitespace-regexp) (gnus-original-article-buffer, gnus-user-agent) (rmail-default-rmail-file, mm-text-coding-system, tool-bar-mode) (xemacs-codename, sxemacs-codename, emacs-program-version): * gnus-sum.el (tool-bar-mode, gnus-tmp-header, number): * gnus-start.el (gnus-agent-covered-methods) (gnus-agent-file-loading-local, gnus-agent-file-loading-cache) (gnus-current-headers, gnus-thread-indent-array, gnus-newsgroup-name) (gnus-newsgroup-headers, gnus-group-list-mode) (gnus-group-mark-positions, gnus-newsgroup-data) (gnus-newsgroup-unreads, nnoo-state-alist) (gnus-current-select-method, mail-sources) (nnmail-scan-directory-mail-source-once, nnmail-split-history) (nnmail-spool-file, gnus-cache-active-hashtb): * gnus-mh.el (mh-lib-progs): * gnus-ems.el (gnus-tmp-unread, gnus-tmp-replied) (gnus-tmp-score-char, gnus-tmp-indentation, gnus-tmp-opening-bracket) (gnus-tmp-lines, gnus-tmp-name, gnus-tmp-closing-bracket) (gnus-tmp-subject-or-nil, gnus-check-before-posting, gnus-mouse-face) (gnus-group-buffer): * gnus-cite.el (font-lock-defaults-computed, font-lock-keywords) (font-lock-set-defaults): * gnus-art.el (tool-bar-map, w3m-minor-mode-map) (gnus-face-properties-alist, charset, gnus-summary-article-menu) (gnus-summary-post-menu, total-parts, type, condition, length): * gnus-agent.el (gnus-agent-read-agentview): * flow-fill.el (show-trailing-whitespace): * gnus-group.el (tool-bar-mode, nnrss-group-alist): Remove unnecessary eval-and-compile wrappers for byte compiler pacifiers. * mm-view.el (mm-inline-image-xemacs): Only do something for XEmacs. (mm-display-inline-fontify): Check for featurep 'xemacs not extent-list. * mm-decode.el (mm-display-external): Check for featurep 'xemacs not itimer-list. (mm-create-image-xemacs): Only do something for XEmacs. (mm-image-fit-p): Check for featurep 'xemacs not glyph-width. * mm-util.el (mm-find-buffer-file-coding-system): Add check for XEmacs. * gnus-registry.el (gnus-adaptive-word-syntax-table): * gnus-fun.el (gnus-face-properties-alist): Pacify byte compiler. * textmodes/reftex-dcr.el (reftex-start-itimer-once): Add check for XEmacs. * calc/calc-menu.el (calc-mode-map): Pacify byte compiler. * doc-view.el (doc-view-resolution): Add missing :group.
2007-11-15(doc-view-ghostscript-options): Remove resolution arg.Stefan Monnier
(doc-view-resolution): New custom var. (doc-view-pdf/ps->png): Use it. (doc-view-shrink-factor): New var. (doc-view-enlarge, doc-view-shrink): New commands. (doc-view-mode-map): Use them.
2007-11-11Add comments about isearch support.Juri Linkov
2007-11-10(doc-view-mode-map, doc-view-menu, doc-view-pdf->txt-sentinel):Juri Linkov
Adapt to new search UI. (doc-view-search-backward): New function. (doc-view-search): Query new regexp if prefix arg is given, else jump to next/previous match. (doc-view-mode): Handle compressed files. (jka-compr): Required for compressed files.
2007-11-01(doc-view-cache-directory): Remove superfluous concat.Glenn Morris
2007-10-31* doc-view.el (doc-view-cache-directory): Fix bug where an integerReiner Steib
was given to concat.
2007-10-31(doc-view-mode-map): Bind doc-view-goto-page to the keysStefan Monnier
used normally for goto-line. Change `g' to revert the buffer. Add redundant `r' binding for buffer-revert.
2007-10-31(doc-view-conversion-refresh-interval)Glenn Morris
(doc-view-dvi->pdf, doc-view-pdf/ps->png, doc-view-pdf->txt) (doc-view-reset-slice): Doc fixes. (doc-view-menu): Remove deleted function doc-view-edit-doc.
2007-10-30Use expand-file-name rather than concat.Stefan Monnier
(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(doc-view-current-doc): Remove. Replace all uses by buffer-file-name.Stefan Monnier
(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-30Tassilo Horn <tassilo at member.fsf.org>Glenn Morris
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.