diff options
| -rw-r--r-- | doc/emacs/ChangeLog | 2 | ||||
| -rw-r--r-- | doc/emacs/misc.texi | 165 |
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 @@ | |||
| 1 | 2008-11-01 Richard M. Stallman <rms@gnu.org> | 1 | 2008-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 | ||
| 32 | DocView mode is a document viewer for Emacs (@code{doc-view-mode}). | 33 | DocView mode (@code{doc-view-mode}) is a document viewer that operates |
| 33 | It's capable of displaying PDF, PS and DVI files inside an Emacs buffer | 34 | within Emacs. It provides convenience features such as slicing, |
| 34 | and provides some convenience features like slicing, zooming and | 35 | zooming, and searching inside the document. |
| 35 | searching inside the document. | ||
| 36 | 36 | ||
| 37 | @vindex doc-view-cache-directory | 37 | @findex doc-view-toggle-display |
| 38 | This is done by using @command{gs} (GhostScript) to convert the document | 38 | When you visit a PDF or DVI file, Emacs begins in DocView mode: it |
| 39 | to a set of PNG images which are then displayed. In order to omit | 39 | displays a welcome screen and begins formatting the file, page by |
| 40 | double conversions of documents those images are cached in | 40 | page. It displays the first page once that has been formatted. You |
| 41 | @code{doc-view-cache-directory}. | 41 | can use @kbd{C-c C-c} (@code{doc-view-toggle-display}) to switch to |
| 42 | editing 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 |
| 45 | By default Emacs opens all pdf and dvi files using DocView mode. You'll | 45 | For Postscript files, Emacs normally visits them in PS mode, but you |
| 46 | be greeted with a welcome screen and as soon as the first page's | 46 | can use @kbd{C-c C-c} to switch to viewing the formatted text with |
| 47 | conversion finished, it'll be displayed. PostScript files are opened | 47 | DocView. For all these files, repeating @kbd{C-c C-c} toggles between |
| 48 | with @code{ps-mode} by default, but additionally | 48 | DocView and the file text. |
| 49 | @code{doc-view-minor-mode} is enabled, which adds the binding @kbd{C-c | ||
| 50 | C-c} (@code{doc-view-toggle-display}) and toggles between the editing | ||
| 51 | mode (@code{ps-mode} in case of PS files, @code{fundamental-mode} in | ||
| 52 | case 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 |
| 56 | You can enlarge or shrink the document with @kbd{+} | 52 | @vindex doc-view-resolution |
| 57 | (@code{doc-view-enlarge}) and @kbd{-} (@code{doc-view-shrink}). | 53 | When 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, | ||
| 56 | set or customize the variable @code{doc-view-resolution}. | ||
| 58 | 57 | ||
| 59 | The DocView buffer can be buried with @kbd{q} and killed with @kbd{k}. | 58 | You 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 | ||
| 71 | Inside DocView mode you can scroll the current page using the usual | 70 | When in DocView mode, you can scroll the current page using the usual |
| 72 | Emacs movement keys, that is the arrow keys or @kbd{C-p}, @kbd{C-n}, | 71 | Emacs 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 |
| 77 | To go to the next page use @kbd{n}, @kbd{@key{next}} or @kbd{C-x ]} | 76 | To 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 |
| 83 | While reading a document it's convenient to scroll the current page and | 82 | The @key{SPC} (@code{doc-view-scroll-up-or-next-page}) key is a |
| 84 | switch to the next one if it's already scrolled to the bottom. This | 83 | convenient way to advance through the document. It scrolls within the |
| 85 | functionality is bound to @kbd{@key{SPC}} | 84 | current 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 | 85 | similar way direction (@code{doc-view-scroll-down-or-previous-page}). |
| 87 | same 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 | ||
| 102 | It's possible to search for a regular expression (@pxref{Regexps}) | 99 | While in DocView mode you can search the file's text for a regular |
| 103 | inside documents. In order to do that, the document file will be | 100 | expression (@pxref{Regexps}). The interface for searching is inspired |
| 104 | converted to text and the search will be performed in the text file. | 101 | by @code{isearch} (@pxref{Incremental Search}). |
| 105 | The 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 |
| 110 | To initiate a search use @kbd{C-s} (@code{doc-view-search}) or @kbd{C-r} | 105 | To 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 |
| 112 | expression and after hitting @kbd{@key{RET}} the number of matches will | 107 | expression; after you finish it with @key{RET}, it echoes the number |
| 113 | be echoed. Navigation between the matches is done by pressing @kbd{C-s} | 108 | of matches found. You can move forward and back among these matches |
| 114 | and @kbd{C-r} again. | 109 | by typing @kbd{C-s} and @kbd{C-r}. |
| 115 | 110 | ||
| 116 | @findex doc-view-show-tooltip | 111 | @findex doc-view-show-tooltip |
| 117 | Since there's no possibility to show the match inside the image itself, | 112 | DocView mode has no way to show the match inside the page image, so |
| 118 | a tooltip will be shown at the mouse position which lists all matching | 113 | instead it displays a tooltip (at the mouse position) which lists all |
| 119 | lines of the current page. You can force the tooltip to be shown with | 114 | matching lines in the current page. You can force display of this |
| 120 | @kbd{C-t} (@code{doc-view-show-tooltip}). | 115 | tooltip with @kbd{C-t} (@code{doc-view-show-tooltip}). |
| 121 | 116 | ||
| 122 | To initiate a new search call @code{doc-view-search} with a prefix | 117 | To start a new search, use the search command with a prefix argument; |
| 123 | argument, i.e. @kbd{C-u C-s} or @kbd{C-u C-r} for a backward search. | 118 | i.e., @kbd{C-u C-s} for a forward search or @kbd{C-u C-r} for a |
| 119 | backward search. | ||
| 124 | 120 | ||
| 125 | @node Slicing | 121 | @node Slicing |
| 126 | @subsection Slicing | 122 | @subsection Slicing |
| 127 | 123 | ||
| 128 | Quite often documents have huge margins for printing. These are | 124 | Documents often have wide margins for printing. They are annoying |
| 129 | annoying when reading the document on a computer, because they use up | 125 | when reading the document on the screen, because they use up screen |
| 130 | screen space and thus can force inconvenient scrolling. | 126 | space 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 |
| 134 | To prevent you from that DocView lets you select the slice of the pages | 130 | With DocView you can hide these margins by selecting the @dfn{slice} |
| 135 | you're interested in. To do that hit @kbd{s s} | 131 | of 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 | 132 | once you specify a slice in DocView, it applies to whichever page you |
| 137 | slice's width and height. A more convenient method is provided by | 133 | look at. |
| 138 | @kbd{s m} (@code{doc-view-set-slice-using-mouse}), where you use the | 134 | |
| 139 | mouse to select the slice. | 135 | To specify the slice numerically, type @kbd{s s} |
| 136 | (@code{doc-view-set-slice}); then enter the top left pixel position | ||
| 137 | and 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 | ||
| 141 | m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to | ||
| 142 | select the slice. | ||
| 143 | @c ??? How does this work? | ||
| 140 | 144 | ||
| 141 | @findex doc-view-reset-slice | 145 | @findex doc-view-reset-slice |
| 142 | To reset the selected slice use @kbd{s r} (@code{doc-view-reset-slice}). | 146 | To cancel the selected slice, type @kbd{s r} |
| 147 | (@code{doc-view-reset-slice}). Then DocView shows the entire page | ||
| 148 | including its entire margins. | ||
| 143 | 149 | ||
| 144 | @node Conversion | 150 | @node Conversion |
| 145 | @subsection Conversion | 151 | @subsection Conversion |
| 146 | 152 | ||
| 147 | As said before DocView mode will automatically convert the document | 153 | @vindex doc-view-cache-directory |
| 148 | files when visiting them unless @code{doc-view-cache-directory} already | 154 | DocView works by using @command{gs} (GhostScript) to convert the |
| 149 | contains the converted PNG images. In that case it'll use the cached | 155 | document to a set of PNG images which are then displayed. For |
| 150 | files. | 156 | efficiency it caches those images in @code{doc-view-cache-directory}. |
| 151 | 157 | ||
| 152 | @findex doc-view-clear-cache | 158 | @findex doc-view-clear-cache |
| 153 | You can clean up the cache directory with @code{M-x | 159 | You can clear the cache directory with @code{M-x |
| 154 | doc-view-clear-cache}. | 160 | doc-view-clear-cache}. But this should never be necessary, because |
| 155 | 161 | DocView detects changed files based on the md5 checksum of the file | |
| 156 | If a document has changed, it'll be converted anew when visiting it. | 162 | contents. |
| 157 | DocView 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 |
| 161 | To force a reconversion of the currently viewed document hit @kbd{r} or | 166 | To force a reconversion of the currently viewed document, type @kbd{r} |
| 162 | @kbd{g} (@code{revert-buffer}). Killing the converter process | 167 | or @kbd{g} (@code{revert-buffer}). To kill the converter process |
| 163 | associated with the current buffer can be done with @kbd{K} | 168 | associated 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} |
| 165 | additionally 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}). | 171 | the DocView buffer. |
| 167 | 172 | ||
| 168 | The zoom commands @kbd{+} (@code{doc-view-enlarge}) and @kbd{-} | 173 | The 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 |
| 170 | another resolution. The current page will be converted first. | 175 | size. The current page is converted first. |
| 171 | |||
| 172 | @vindex doc-view-resolution | ||
| 173 | The 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 |