aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/emacs/ChangeLog2
-rw-r--r--doc/emacs/misc.texi165
2 files changed, 85 insertions, 82 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index eb85f6a1e1d..d9c442c6e7c 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,5 +1,7 @@
12008-11-01 Richard M. Stallman <rms@gnu.org> 12008-11-01 Richard M. Stallman <rms@gnu.org>
2 2
3 * misc.texi (Document View): Major rewrite.
4
3 * maintaining.texi (Types of Log File): Change logs are older than 5 * maintaining.texi (Types of Log File): Change logs are older than
4 version control. 6 version control.
5 (VCS Concepts): Simplify and rearrange. 7 (VCS Concepts): Simplify and rearrange.
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index c650207a7ae..909e936812f 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -21,42 +21,41 @@ amusements.
21@end ifnottex 21@end ifnottex
22 22
23@node Document View, Gnus, Calendar/Diary, Top 23@node Document View, Gnus, Calendar/Diary, Top
24
25@section Document Viewing 24@section Document Viewing
26@cindex mode, pdf, ps, dvi 25@cindex DVI file viewing
26@cindex PDF file
27@cindex PS file
27@cindex DocView mode 28@cindex DocView mode
28@cindex mode, DocView 29@cindex mode, DocView
29@cindex document files 30@cindex document viewer (DocView)
30@findex doc-view-mode 31@findex doc-view-mode
31 32
32DocView mode is a document viewer for Emacs (@code{doc-view-mode}). 33DocView mode (@code{doc-view-mode}) is a document viewer that operates
33It's capable of displaying PDF, PS and DVI files inside an Emacs buffer 34within Emacs. It provides convenience features such as slicing,
34and provides some convenience features like slicing, zooming and 35zooming, and searching inside the document.
35searching inside the document.
36 36
37@vindex doc-view-cache-directory 37@findex doc-view-toggle-display
38This is done by using @command{gs} (GhostScript) to convert the document 38When you visit a PDF or DVI file, Emacs begins in DocView mode: it
39to a set of PNG images which are then displayed. In order to omit 39displays a welcome screen and begins formatting the file, page by
40double conversions of documents those images are cached in 40page. It displays the first page once that has been formatted. You
41@code{doc-view-cache-directory}. 41can use @kbd{C-c C-c} (@code{doc-view-toggle-display}) to switch to
42editing the text of the PDF or DVI file.
42 43
43@findex doc-view-minor-mode
44@findex doc-view-toggle-display 44@findex doc-view-toggle-display
45By default Emacs opens all pdf and dvi files using DocView mode. You'll 45For Postscript files, Emacs normally visits them in PS mode, but you
46be greeted with a welcome screen and as soon as the first page's 46can use @kbd{C-c C-c} to switch to viewing the formatted text with
47conversion finished, it'll be displayed. PostScript files are opened 47DocView. For all these files, repeating @kbd{C-c C-c} toggles between
48with @code{ps-mode} by default, but additionally 48DocView and the file text.
49@code{doc-view-minor-mode} is enabled, which adds the binding @kbd{C-c
50C-c} (@code{doc-view-toggle-display}) and toggles between the editing
51mode (@code{ps-mode} in case of PS files, @code{fundamental-mode} in
52case of PDF or DVI files) and DocView mode.
53 49
54@findex doc-view-enlarge 50@findex doc-view-enlarge
55@findex doc-view-shrink 51@findex doc-view-shrink
56You can enlarge or shrink the document with @kbd{+} 52@vindex doc-view-resolution
57(@code{doc-view-enlarge}) and @kbd{-} (@code{doc-view-shrink}). 53When in DocView mode, you can enlarge or shrink the document with
54@kbd{+} (@code{doc-view-enlarge}) and @kbd{-}
55(@code{doc-view-shrink}). To specify the default size for DocView,
56set or customize the variable @code{doc-view-resolution}.
58 57
59The DocView buffer can be buried with @kbd{q} and killed with @kbd{k}. 58You can kill the DocView buffer with @kbd{k} and bury it with @kbd{q}.
60 59
61@menu 60@menu
62* Navigation:: Navigation inside DocView buffers. 61* Navigation:: Navigation inside DocView buffers.
@@ -68,24 +67,22 @@ The DocView buffer can be buried with @kbd{q} and killed with @kbd{k}.
68@node Navigation 67@node Navigation
69@subsection Navigation 68@subsection Navigation
70 69
71Inside DocView mode you can scroll the current page using the usual 70When in DocView mode, you can scroll the current page using the usual
72Emacs movement keys, that is the arrow keys or @kbd{C-p}, @kbd{C-n}, 71Emacs movement keys; that is, the arrow keys or @kbd{C-p}, @kbd{C-n},
73@kbd{C-b} and @kbd{C-f}. 72@kbd{C-b} and @kbd{C-f}.
74 73
75@findex doc-view-next-page 74@findex doc-view-next-page
76@findex doc-view-previous-page 75@findex doc-view-previous-page
77To go to the next page use @kbd{n}, @kbd{@key{next}} or @kbd{C-x ]} 76To go to the next page, use @kbd{n}, @key{next} or @kbd{C-x ]}
78(@code{doc-view-next-page}), to go to the previous page use @kbd{p}, 77(@code{doc-view-next-page}). To go to the previous page, use @kbd{p},
79@kbd{@key{prior}} or @kbd{C-x [} (@code{doc-view-previous-page}). 78@key{prior} or @kbd{C-x [} (@code{doc-view-previous-page}).
80 79
81@findex doc-view-scroll-up-or-next-page 80@findex doc-view-scroll-up-or-next-page
82@findex doc-view-scroll-down-or-previous-page 81@findex doc-view-scroll-down-or-previous-page
83While reading a document it's convenient to scroll the current page and 82The @key{SPC} (@code{doc-view-scroll-up-or-next-page}) key is a
84switch to the next one if it's already scrolled to the bottom. This 83convenient way to advance through the document. It scrolls within the
85functionality is bound to @kbd{@key{SPC}} 84current page or advances to the next. @key{DEL} moves backwards in a
86(@code{doc-view-scroll-up-or-next-page}). @kbd{@key{DEL}} will do the 85similar way direction (@code{doc-view-scroll-down-or-previous-page}).
87same in the other direction
88(@code{doc-view-scroll-down-or-previous-page}).
89 86
90@findex doc-view-first-page 87@findex doc-view-first-page
91@findex doc-view-last-page 88@findex doc-view-last-page
@@ -99,79 +96,83 @@ To jump to a page by its number use @kbd{M-g M-g} or @kbd{M-g g}
99@node Searching 96@node Searching
100@subsection Searching 97@subsection Searching
101 98
102It's possible to search for a regular expression (@pxref{Regexps}) 99While in DocView mode you can search the file's text for a regular
103inside documents. In order to do that, the document file will be 100expression (@pxref{Regexps}). The interface for searching is inspired
104converted to text and the search will be performed in the text file. 101by @code{isearch} (@pxref{Incremental Search}).
105The interface to searching is inspired by @code{isearch}
106(@pxref{Incremental Search}).
107 102
108@findex doc-view-search 103@findex doc-view-search
109@findex doc-view-search-backward 104@findex doc-view-search-backward
110To initiate a search use @kbd{C-s} (@code{doc-view-search}) or @kbd{C-r} 105To initiate a search use @kbd{C-s} (@code{doc-view-search}) or
111(@code{doc-view-search-backward}). You'll be queried for a regular 106@kbd{C-r} (@code{doc-view-search-backward}). This reads a regular
112expression and after hitting @kbd{@key{RET}} the number of matches will 107expression; after you finish it with @key{RET}, it echoes the number
113be echoed. Navigation between the matches is done by pressing @kbd{C-s} 108of matches found. You can move forward and back among these matches
114and @kbd{C-r} again. 109by typing @kbd{C-s} and @kbd{C-r}.
115 110
116@findex doc-view-show-tooltip 111@findex doc-view-show-tooltip
117Since there's no possibility to show the match inside the image itself, 112DocView mode has no way to show the match inside the page image, so
118a tooltip will be shown at the mouse position which lists all matching 113instead it displays a tooltip (at the mouse position) which lists all
119lines of the current page. You can force the tooltip to be shown with 114matching lines in the current page. You can force display of this
120@kbd{C-t} (@code{doc-view-show-tooltip}). 115tooltip with @kbd{C-t} (@code{doc-view-show-tooltip}).
121 116
122To initiate a new search call @code{doc-view-search} with a prefix 117To start a new search, use the search command with a prefix argument;
123argument, i.e. @kbd{C-u C-s} or @kbd{C-u C-r} for a backward search. 118i.e., @kbd{C-u C-s} for a forward search or @kbd{C-u C-r} for a
119backward search.
124 120
125@node Slicing 121@node Slicing
126@subsection Slicing 122@subsection Slicing
127 123
128Quite often documents have huge margins for printing. These are 124Documents often have wide margins for printing. They are annoying
129annoying when reading the document on a computer, because they use up 125when reading the document on the screen, because they use up screen
130screen space and thus can force inconvenient scrolling. 126space and can cause inconvenient scrolling.
131 127
132@findex doc-view-set-slice 128@findex doc-view-set-slice
133@findex doc-view-set-slice-using-mouse 129@findex doc-view-set-slice-using-mouse
134To prevent you from that DocView lets you select the slice of the pages 130With DocView you can hide these margins by selecting the @dfn{slice}
135you're interested in. To do that hit @kbd{s s} 131of pages to display. A slice is a rectangle within the page area;
136(@code{doc-view-set-slice}) to enter the top left pixel position and the 132once you specify a slice in DocView, it applies to whichever page you
137slice's width and height. A more convenient method is provided by 133look at.
138@kbd{s m} (@code{doc-view-set-slice-using-mouse}), where you use the 134
139mouse to select the slice. 135To specify the slice numerically, type @kbd{s s}
136(@code{doc-view-set-slice}); then enter the top left pixel position
137and the slice's width and height.
138@c ??? how does this work?
139
140 A more convenient graphical way to specify the slice is with @kbd{s
141m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to
142select the slice.
143@c ??? How does this work?
140 144
141@findex doc-view-reset-slice 145@findex doc-view-reset-slice
142To reset the selected slice use @kbd{s r} (@code{doc-view-reset-slice}). 146To cancel the selected slice, type @kbd{s r}
147(@code{doc-view-reset-slice}). Then DocView shows the entire page
148including its entire margins.
143 149
144@node Conversion 150@node Conversion
145@subsection Conversion 151@subsection Conversion
146 152
147As said before DocView mode will automatically convert the document 153@vindex doc-view-cache-directory
148files when visiting them unless @code{doc-view-cache-directory} already 154DocView works by using @command{gs} (GhostScript) to convert the
149contains the converted PNG images. In that case it'll use the cached 155document to a set of PNG images which are then displayed. For
150files. 156efficiency it caches those images in @code{doc-view-cache-directory}.
151 157
152@findex doc-view-clear-cache 158@findex doc-view-clear-cache
153You can clean up the cache directory with @code{M-x 159You can clear the cache directory with @code{M-x
154doc-view-clear-cache}. 160doc-view-clear-cache}. But this should never be necessary, because
155 161DocView detects changed files based on the md5 checksum of the file
156If a document has changed, it'll be converted anew when visiting it. 162contents.
157DocView recognizes documents by the md5 sum of their contents.
158 163
159@findex doc-view-kill-proc 164@findex doc-view-kill-proc
160@findex doc-view-kill-proc-and-buffer 165@findex doc-view-kill-proc-and-buffer
161To force a reconversion of the currently viewed document hit @kbd{r} or 166To force a reconversion of the currently viewed document, type @kbd{r}
162@kbd{g} (@code{revert-buffer}). Killing the converter process 167or @kbd{g} (@code{revert-buffer}). To kill the converter process
163associated with the current buffer can be done with @kbd{K} 168associated with the current buffer, type @kbd{K}
164(@code{doc-view-kill-proc}). The key @kbd{k} will do the same and 169(@code{doc-view-kill-proc}). The command @kbd{k}
165additionally kill the DocView buffer 170(@code{doc-view-kill-proc-and-buffer}) kills the converter process and
166(@code{doc-view-kill-proc-and-buffer}). 171the DocView buffer.
167 172
168The zoom commands @kbd{+} (@code{doc-view-enlarge}) and @kbd{-} 173The zoom commands @kbd{+} (@code{doc-view-enlarge}) and @kbd{-}
169(@code{doc-view-shrink}) will also reconvert the current document using 174(@code{doc-view-shrink}) need to reconvert the document at the new
170another resolution. The current page will be converted first. 175size. The current page is converted first.
171
172@vindex doc-view-resolution
173The default resolution for conversion can be customized via the variable
174@code{doc-view-resolution}.
175 176
176@node Gnus, Shell, Document View, Top 177@node Gnus, Shell, Document View, Top
177@section Gnus 178@section Gnus