Commit graph

214 commits

Author SHA1 Message Date
Tassilo Horn
adc95ad64f (doc-view-mode-map): Bind C-a to image-bol and C-e
to image-eol.
2008-04-14 15:46:06 +00:00
Tassilo Horn
53d4c024e9 * doc-view.el (doc-view-dvipdf-program): New variable.
(doc-view-dvipdfm-program): Mention doc-view-dvipdf-program.
(doc-view-mode-p): Check for doc-view-dvipdf-program as
alternative for doc-view-dvipdfm-program.
(doc-view-dvi->pdf): Prefer dvipdf over dvipdfm.
2008-04-14 13:18:12 +00:00
Tassilo Horn
3c03f2cef0 (doc-view-start-process): Don't set
default-directory to "~/" if the current value is valid.  This
broke PS files that run other files in the same directory.
2008-04-14 11:02:31 +00:00
Stefan Monnier
ec4853ab3d Compute displayed pages first (in PDF).
(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-31 15:14:16 +00:00
Tassilo Horn
322f455981 (doc-view-initiate-display): Use doc-view-doc-type
instead of file name extension to make docs with uncommon
extensions work.
2008-03-18 17:43:26 +00:00
Tassilo Horn
23cda57253 (require): Require cl at compile time because
`assert' needs it.
2008-03-18 12:02:44 +00:00
Tassilo Horn
7edd6b92de (doc-view-doc->txt, doc-view-convert-current-doc):
Use non-nil PARENTS attribute of make-directory instead of
explicitly checking existence the current cache directory.
2008-03-16 09:24:29 +00:00
Tassilo Horn
5986c5c6ad (doc-view-doc->txt, doc-view-convert-current-doc):
Create cache dir only if it doesn't already exist.
2008-03-13 18:12:28 +00:00
Stefan Monnier
b4cb319f0a Remove all cb-args, use closures instead.
(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 15:26:49 +00:00
Tassilo Horn
86903c81ae (doc-view-current-cache-dir): Set buffer used for
md5 sum calculation to single-byte.
2008-03-12 14:59:10 +00:00
Stefan Monnier
eb79098b2b (doc-view-new-window-function): Add assertion.
(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 14:50:36 +00:00
Tassilo Horn
515357c252 (doc-view-doc->txt, doc-view-open-text)
(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-12 12:05:30 +00:00
Stefan Monnier
a9f8b49b44 (bookmark-buffer-file-name, bookmark-prop-get): Declare.
(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 21:37:16 +00:00
Stefan Monnier
32a091dd19 * bookmark.el (bookmark-make): Don't pass the `annotation' to the
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-09 03:05:34 +00:00
Tassilo Horn
c039a3b294 (doc-view-bookmark-make-record): Delete obsolete
second arg.
2008-03-07 15:59:43 +00:00
Karl Fogel
e0385bf41a Change a return type, for greater extensibility. See
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-03-07 05:44:37 +00:00
Stefan Monnier
160dfe4360 (doc-view-current-page): Add a `win' argument. 2008-02-26 02:06:33 +00:00
Stefan Monnier
56741510ef (doc-view-conversion-buffer): Give it an internal name.
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-25 20:04:59 +00:00
Stefan Monnier
de17146541 Allow different windows to show different pages.
(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-21 03:45:04 +00:00
Stefan Monnier
65073003e7 (doc-view-display): Change file arg to buffer arg, so it
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-12 02:41:55 +00:00
Stefan Monnier
71385ba8e3 Add todo entries. 2008-02-10 03:06:54 +00:00
Stefan Monnier
5c1f16b06e (doc-view-mode): Improve docstring. 2008-02-01 03:00:55 +00:00
Tassilo Horn
865ba89526 * doc-view.el (doc-view-mode): Adapt to i-m-current-[vh]scroll
being an alist now.
2008-01-29 18:01:32 +00:00
Tassilo Horn
6f70aa334f 2008-01-29 Tassilo Horn <tassilo@member.fsf.org>
* doc-view.el (doc-view-mode): Use facilities of
	image-mode to restore [vh]scroll when switching buffers.
2008-01-29 13:50:35 +00:00
Stefan Monnier
38b5ca4a1b (doc-view-goto-page): Don't move point any more, now that
the hscroll behavior was fixed.
(doc-view-mode): Disable auto-hscroll-mode.
2008-01-19 05:34:29 +00:00
Stefan Monnier
cec1df02a4 (doc-view-pdf/ps->png): Make sure we a have a valid cwd.
(doc-view-insert-image): Do something if the image is missing.
(doc-view-mode): Don't use file-remote-p.
2008-01-18 20:09:26 +00:00
Tassilo Horn
39a402e3d9 2008-01-10 Tassilo Horn <tassilo@member.fsf.org>
* 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-10 15:08:34 +00:00
Tassilo Horn
0e8356fe05 2008-01-10 Tassilo Horn <tassilo@member.fsf.org>
* doc-view.el (tramp): Require tramp because we use
	tramp-tramp-file-p.
2008-01-10 11:29:41 +00:00
Tassilo Horn
f9adf05bac 2008-01-09 Tassilo Horn <tassilo@member.fsf.org>
* doc-view.el (doc-view-mode): Support tramp, compressed files and
	files inside archives uniformly.
2008-01-09 20:16:14 +00:00
Tassilo Horn
622face2db 2008-01-09 Tassilo Horn <tassilo@member.fsf.org>
* doc-view.el (doc-view-mode-p): Add EPS as supported type.
	(doc-view-mode): Support document files inside archives.
2008-01-09 10:25:17 +00:00
Tassilo Horn
bcc758eca9 2008-01-04 Tassilo Horn <tassilo@member.fsf.org>
* 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-04 13:21:42 +00:00
Tassilo Horn
f1acd44c03 2008-01-04 Tassilo Horn <tassilo@member.fsf.org>
* doc-view.el (doc-view-mode-map): Remap scroll-{up,down} to
	image-scroll-{up,down}.
2008-01-04 08:45:33 +00:00
Tassilo Horn
896631767c 2008-01-04 Tassilo Horn <tassilo@member.fsf.org>
* 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 08:27:54 +00:00
Glenn Morris
069b4ce3f6 (doc-view-search-internal): Don't use `incf'.
(bookmark-make-cell-function, bookmark-get-filename)
(bookmark-get-bookmark-record): Declare for compiler.
Move footer text back to end of file.
2008-01-04 03:12:17 +00:00
Miles Bader
aab2236f2d Add arch tagline 2008-01-02 14:23:22 +00:00
Karl Fogel
03e26a796d Change a return type, for greater extensibility. See
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-01-02 07:49:04 +00:00
Tassilo Horn
137187c884 2007-12-26 Tassilo Horn <tassilo@member.fsf.org>
* 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-26 11:48:37 +00:00
Tassilo Horn
1666a6b3e8 2007-12-26 Tassilo Horn <tassilo@member.fsf.org>
* 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-26 08:53:06 +00:00
Stefan Monnier
214abdd48d (doc-view-dvi->pdf-sentinel, doc-view-pdf/ps->png-sentinel)
(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-06 15:04:29 +00:00
Reiner Steib
d99abf1ba0 (doc-view-initiate-display): Use `doc-view-mode-p'.
(doc-view-current-overlay, doc-view-pending-cache-flush): Add doc
string.
2007-12-03 07:24:34 +00:00
Reiner Steib
789ab9d4af (doc-view-mode-p): New function. 2007-11-25 20:11:47 +00:00
Dan Nicolaescu
da99b369e9 * doc-view.el (doc-view-search-backward, doc-view-search): Fix
assignment to free variable bug.
2007-11-16 18:00:39 +00:00
Dan Nicolaescu
9efa445fbe * smime.el (from):
* 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-16 16:50:35 +00:00
Stefan Monnier
05477667af (doc-view-ghostscript-options): Remove resolution arg.
(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-15 19:56:44 +00:00
Juri Linkov
34065e5efd Add comments about isearch support. 2007-11-11 22:24:04 +00:00
Juri Linkov
7baca0fa6e (doc-view-mode-map, doc-view-menu, doc-view-pdf->txt-sentinel):
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-10 21:53:47 +00:00
Glenn Morris
8aafd651a9 (doc-view-cache-directory): Remove superfluous concat. 2007-11-01 03:53:44 +00:00
Reiner Steib
bce6be12b9 * doc-view.el (doc-view-cache-directory): Fix bug where an integer
was given to concat.
2007-10-31 21:17:32 +00:00
Stefan Monnier
7656fe61b1 (doc-view-mode-map): Bind doc-view-goto-page to the keys
used normally for goto-line.  Change `g' to revert the buffer.
Add redundant `r' binding for buffer-revert.
2007-10-31 20:40:30 +00:00
Glenn Morris
1f75e53dd2 (doc-view-conversion-refresh-interval)
(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-31 03:10:32 +00:00