mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
Merge from trunk.
This commit is contained in:
commit
a974cdce9b
@ -1,3 +1,20 @@
|
||||
2011-08-25 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* misc.texi (Printing): Convert subnodes into subsections.
|
||||
|
||||
* text.texi (Two-Column): Move into Text chapter.
|
||||
|
||||
* picture-xtra.texi (Picture Mode): Group with Editing Binary
|
||||
Files section. Convert from chapter into section.
|
||||
|
||||
* display.texi (Narrowing): Move into display chapter.
|
||||
|
||||
* sending.texi (Sending Mail):
|
||||
* rmail.texi (Rmail):
|
||||
* misc.texi (Gnus, Document View):
|
||||
* dired.texi (Dired):
|
||||
* emacs.texi: Group the mail, rmail, and gnus chapters together.
|
||||
|
||||
2011-08-07 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* dired.texi (Operating on Files): Rewrite according to the fact
|
||||
|
@ -2,7 +2,7 @@
|
||||
@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
|
||||
@c Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@node Calendar/Diary, Document View, Dired, Top
|
||||
@node Calendar/Diary
|
||||
@chapter The Calendar and the Diary
|
||||
@cindex calendar
|
||||
@findex calendar
|
||||
|
@ -2,7 +2,7 @@
|
||||
@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
|
||||
@c Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@node Dired, Calendar/Diary, Rmail, Top
|
||||
@node Dired
|
||||
@chapter Dired, the Directory Editor
|
||||
@c This node is referenced in the tutorial. When renaming or deleting
|
||||
@c it, the tutorial needs to be adjusted.
|
||||
|
@ -15,6 +15,8 @@ want to see, and how to display it.
|
||||
* Scrolling:: Commands to move text up and down in a window.
|
||||
* Auto Scrolling:: Redisplay scrolls text automatically when needed.
|
||||
* Horizontal Scrolling:: Moving text left and right in a window.
|
||||
* Narrowing:: Restricting display and editing to a portion
|
||||
of the buffer.
|
||||
* Follow Mode:: Follow mode lets two windows scroll as one.
|
||||
* Faces:: How to change the display style using faces.
|
||||
* Standard Faces:: Emacs' predefined faces.
|
||||
@ -300,6 +302,72 @@ a lower bound for automatic horizontal scrolling. Automatic scrolling
|
||||
will continue to scroll the window, but never farther to the right
|
||||
than the amount you previously set by @code{scroll-left}.
|
||||
|
||||
@node Narrowing
|
||||
@section Narrowing
|
||||
@cindex widening
|
||||
@cindex restriction
|
||||
@cindex narrowing
|
||||
@cindex accessible portion
|
||||
|
||||
@dfn{Narrowing} means focusing in on some portion of the buffer,
|
||||
making the rest temporarily inaccessible. The portion which you can
|
||||
still get to is called the @dfn{accessible portion}. Canceling the
|
||||
narrowing, which makes the entire buffer once again accessible, is
|
||||
called @dfn{widening}. The bounds of narrowing in effect in a buffer
|
||||
are called the buffer's @dfn{restriction}.
|
||||
|
||||
Narrowing can make it easier to concentrate on a single subroutine or
|
||||
paragraph by eliminating clutter. It can also be used to limit the
|
||||
range of operation of a replace command or repeating keyboard macro.
|
||||
|
||||
@table @kbd
|
||||
@item C-x n n
|
||||
Narrow down to between point and mark (@code{narrow-to-region}).
|
||||
@item C-x n w
|
||||
Widen to make the entire buffer accessible again (@code{widen}).
|
||||
@item C-x n p
|
||||
Narrow down to the current page (@code{narrow-to-page}).
|
||||
@item C-x n d
|
||||
Narrow down to the current defun (@code{narrow-to-defun}).
|
||||
@end table
|
||||
|
||||
When you have narrowed down to a part of the buffer, that part appears
|
||||
to be all there is. You can't see the rest, you can't move into it
|
||||
(motion commands won't go outside the accessible part), you can't change
|
||||
it in any way. However, it is not gone, and if you save the file all
|
||||
the inaccessible text will be saved. The word @samp{Narrow} appears in
|
||||
the mode line whenever narrowing is in effect.
|
||||
|
||||
@kindex C-x n n
|
||||
@findex narrow-to-region
|
||||
The primary narrowing command is @kbd{C-x n n} (@code{narrow-to-region}).
|
||||
It sets the current buffer's restrictions so that the text in the current
|
||||
region remains accessible, but all text before the region or after the
|
||||
region is inaccessible. Point and mark do not change.
|
||||
|
||||
@kindex C-x n p
|
||||
@findex narrow-to-page
|
||||
@kindex C-x n d
|
||||
@findex narrow-to-defun
|
||||
Alternatively, use @kbd{C-x n p} (@code{narrow-to-page}) to narrow
|
||||
down to the current page. @xref{Pages}, for the definition of a page.
|
||||
@kbd{C-x n d} (@code{narrow-to-defun}) narrows down to the defun
|
||||
containing point (@pxref{Defuns}).
|
||||
|
||||
@kindex C-x n w
|
||||
@findex widen
|
||||
The way to cancel narrowing is to widen with @kbd{C-x n w}
|
||||
(@code{widen}). This makes all text in the buffer accessible again.
|
||||
|
||||
You can get information on what part of the buffer you are narrowed down
|
||||
to using the @kbd{C-x =} command. @xref{Position Info}.
|
||||
|
||||
Because narrowing can easily confuse users who do not understand it,
|
||||
@code{narrow-to-region} is normally a disabled command. Attempting to use
|
||||
this command asks for confirmation and gives you the option of enabling it;
|
||||
if you enable the command, confirmation will no longer be required for
|
||||
it. @xref{Disabling}.
|
||||
|
||||
@node Follow Mode
|
||||
@section Follow Mode
|
||||
@cindex Follow mode
|
||||
|
@ -187,36 +187,28 @@ Major Structures of Emacs
|
||||
Advanced Features
|
||||
* Modes:: Major and minor modes alter Emacs' basic behavior.
|
||||
* Indentation:: Editing the white space at the beginnings of lines.
|
||||
* Text:: Commands and modes for editing English.
|
||||
* Text:: Commands and modes for editing human languages.
|
||||
* Programs:: Commands and modes for editing programs.
|
||||
* Building:: Compiling, running and debugging programs.
|
||||
* Maintaining:: Features for maintaining large programs.
|
||||
* Abbrevs:: Defining text abbreviations to reduce
|
||||
the number of characters you must type.
|
||||
@c AFAICS, the tex stuff generates its own index and does not use this one.
|
||||
@ifnottex
|
||||
* Picture Mode:: Editing pictures made up of characters using
|
||||
the quarter-plane screen model.
|
||||
@end ifnottex
|
||||
* Dired:: Directory and file manager.
|
||||
* Calendar/Diary:: Calendar and diary facilities.
|
||||
* Sending Mail:: Sending mail in Emacs.
|
||||
* Rmail:: Reading mail in Emacs.
|
||||
* Dired:: You can "edit" a directory to manage files in it.
|
||||
* Calendar/Diary:: The calendar and diary facilities.
|
||||
* Document View:: Viewing PDF, PS and DVI files.
|
||||
* Gnus:: A flexible mail and news reader.
|
||||
* Document View:: Viewing PDF, PS and DVI files.
|
||||
* Shell:: Executing shell commands from Emacs.
|
||||
* Emacs Server:: Using Emacs as an editing server.
|
||||
* Printing:: Printing hardcopies of buffers or regions.
|
||||
* Sorting:: Sorting lines, paragraphs or pages within Emacs.
|
||||
* Narrowing:: Restricting display and editing to a portion
|
||||
of the buffer.
|
||||
* Two-Column:: Splitting apart columns to edit them
|
||||
in side-by-side windows.
|
||||
* Editing Binary Files::Using Hexl mode to edit binary files.
|
||||
@ifnottex
|
||||
* Picture Mode:: Editing pictures made up of text characters.
|
||||
@end ifnottex
|
||||
* Editing Binary Files:: Editing binary files with Hexl mode.
|
||||
* Saving Emacs Sessions:: Saving Emacs state from one session to the next.
|
||||
* Recursive Edit:: A command can allow you to do editing
|
||||
"within the command". This is called a
|
||||
"recursive editing level".
|
||||
* Recursive Edit:: Performing edits while "within another command".
|
||||
* Emulation:: Emulating some other editors with Emacs.
|
||||
* Hyperlinking:: Following links in buffers.
|
||||
* Amusements:: Various games and hacks.
|
||||
@ -350,6 +342,8 @@ Controlling the Display
|
||||
* Scrolling:: Commands to move text up and down in a window.
|
||||
* Auto Scrolling:: Redisplay scrolls text automatically when needed.
|
||||
* Horizontal Scrolling:: Moving text left and right in a window.
|
||||
* Narrowing:: Restricting display and editing to a portion
|
||||
of the buffer.
|
||||
* Follow Mode:: Follow mode lets two windows scroll as one.
|
||||
* Faces:: How to change the display style using faces.
|
||||
* Standard Faces:: Emacs' predefined faces.
|
||||
@ -577,6 +571,7 @@ Commands for Human Languages
|
||||
* Nroff Mode:: Editing input to the formatter nroff.
|
||||
* Formatted Text:: Editing formatted text directly in WYSIWYG fashion.
|
||||
* Text Based Tables:: Editing text-based tables in WYSIWYG fashion.
|
||||
* Two-Column:: Splitting text columns into separate windows.
|
||||
|
||||
Filling Text
|
||||
|
||||
@ -885,52 +880,6 @@ Editing Pictures
|
||||
* Rectangles in Picture:: Clearing and superimposing rectangles.
|
||||
@end ifnottex
|
||||
|
||||
Sending Mail
|
||||
|
||||
* Mail Format:: Format of the mail being composed.
|
||||
* Mail Headers:: Details of some standard mail header fields.
|
||||
* Mail Aliases:: Abbreviating and grouping mail addresses.
|
||||
* Mail Commands:: Special commands for editing mail being composed.
|
||||
* Mail Signature:: Adding a signature to every message.
|
||||
* Mail Amusements:: Distracting the NSA; adding fortune messages.
|
||||
* Mail Methods:: Using alternative mail-composition methods.
|
||||
|
||||
Mail Commands
|
||||
|
||||
* Mail Sending:: Commands to send the message.
|
||||
* Header Editing:: Commands to move to header fields and edit them.
|
||||
* Citing Mail:: Quoting a message you are replying to.
|
||||
* Mail Misc:: Attachments, spell checking, etc.
|
||||
|
||||
Reading Mail with Rmail
|
||||
|
||||
* Rmail Basics:: Basic concepts of Rmail, and simple use.
|
||||
* Rmail Scrolling:: Scrolling through a message.
|
||||
* Rmail Motion:: Moving to another message.
|
||||
* Rmail Deletion:: Deleting and expunging messages.
|
||||
* Rmail Inbox:: How mail gets into the Rmail file.
|
||||
* Rmail Files:: Using multiple Rmail files.
|
||||
* Rmail Output:: Copying message out to files.
|
||||
* Rmail Labels:: Classifying messages by labeling them.
|
||||
* Rmail Attributes:: Certain standard labels, called attributes.
|
||||
* Rmail Reply:: Sending replies to messages you are viewing.
|
||||
* Rmail Summary:: Summaries show brief info on many messages.
|
||||
* Rmail Sorting:: Sorting messages in Rmail.
|
||||
* Rmail Display:: How Rmail displays a message; customization.
|
||||
* Rmail Coding:: How Rmail handles decoding character sets.
|
||||
* Rmail Editing:: Editing message text and headers in Rmail.
|
||||
* Rmail Digest:: Extracting the messages from a digest message.
|
||||
* Rmail Rot13:: Reading messages encoded in the rot13 code.
|
||||
* Movemail:: More details of fetching new mail.
|
||||
* Remote Mailboxes:: Retrieving mail from remote mailboxes.
|
||||
* Other Mailbox Formats:: Retrieving mail from local mailboxes in
|
||||
various formats.
|
||||
|
||||
Summaries
|
||||
|
||||
* Rmail Make Summary:: Making various sorts of summaries.
|
||||
* Rmail Summary Edit:: Manipulating messages from the summary.
|
||||
|
||||
Dired, the Directory Editor
|
||||
|
||||
* Dired Enter:: How to invoke Dired.
|
||||
@ -1014,6 +963,52 @@ Document Viewing
|
||||
* Slicing:: Specifying which part of pages should be displayed.
|
||||
* Conversion:: Influencing and triggering conversion.
|
||||
|
||||
Sending Mail
|
||||
|
||||
* Mail Format:: Format of the mail being composed.
|
||||
* Mail Headers:: Details of some standard mail header fields.
|
||||
* Mail Aliases:: Abbreviating and grouping mail addresses.
|
||||
* Mail Commands:: Special commands for editing mail being composed.
|
||||
* Mail Signature:: Adding a signature to every message.
|
||||
* Mail Amusements:: Distracting the NSA; adding fortune messages.
|
||||
* Mail Methods:: Using alternative mail-composition methods.
|
||||
|
||||
Mail Commands
|
||||
|
||||
* Mail Sending:: Commands to send the message.
|
||||
* Header Editing:: Commands to move to header fields and edit them.
|
||||
* Citing Mail:: Quoting a message you are replying to.
|
||||
* Mail Misc:: Attachments, spell checking, etc.
|
||||
|
||||
Reading Mail with Rmail
|
||||
|
||||
* Rmail Basics:: Basic concepts of Rmail, and simple use.
|
||||
* Rmail Scrolling:: Scrolling through a message.
|
||||
* Rmail Motion:: Moving to another message.
|
||||
* Rmail Deletion:: Deleting and expunging messages.
|
||||
* Rmail Inbox:: How mail gets into the Rmail file.
|
||||
* Rmail Files:: Using multiple Rmail files.
|
||||
* Rmail Output:: Copying message out to files.
|
||||
* Rmail Labels:: Classifying messages by labeling them.
|
||||
* Rmail Attributes:: Certain standard labels, called attributes.
|
||||
* Rmail Reply:: Sending replies to messages you are viewing.
|
||||
* Rmail Summary:: Summaries show brief info on many messages.
|
||||
* Rmail Sorting:: Sorting messages in Rmail.
|
||||
* Rmail Display:: How Rmail displays a message; customization.
|
||||
* Rmail Coding:: How Rmail handles decoding character sets.
|
||||
* Rmail Editing:: Editing message text and headers in Rmail.
|
||||
* Rmail Digest:: Extracting the messages from a digest message.
|
||||
* Rmail Rot13:: Reading messages encoded in the rot13 code.
|
||||
* Movemail:: More details of fetching new mail.
|
||||
* Remote Mailboxes:: Retrieving mail from remote mailboxes.
|
||||
* Other Mailbox Formats:: Retrieving mail from local mailboxes in
|
||||
various formats.
|
||||
|
||||
Rmail Summaries
|
||||
|
||||
* Rmail Make Summary:: Making various sorts of summaries.
|
||||
* Rmail Summary Edit:: Manipulating messages from the summary.
|
||||
|
||||
Gnus
|
||||
|
||||
* Buffers of Gnus:: The group, summary, and article buffers.
|
||||
@ -1494,15 +1489,13 @@ Lisp programming.
|
||||
@c Includes vc1-xtra, emerge-xtra.
|
||||
@include maintaining.texi
|
||||
@include abbrevs.texi
|
||||
@ifnottex
|
||||
@include picture-xtra.texi
|
||||
@end ifnottex
|
||||
@include sending.texi
|
||||
@include rmail.texi
|
||||
@c Includes dired-xtra.
|
||||
@include dired.texi
|
||||
@c Includes cal-xtra.
|
||||
@include calendar.texi
|
||||
@include sending.texi
|
||||
@include rmail.texi
|
||||
@c Includes picture-xtra.texi
|
||||
@include misc.texi
|
||||
@include custom.texi
|
||||
@include trouble.texi
|
||||
|
@ -10,9 +10,9 @@ else: viewing ``document files'', reading netnews, running shell
|
||||
commands and shell subprocesses, using a single shared Emacs for
|
||||
utilities that expect to run an editor as a subprocess, printing
|
||||
hardcopy, sorting text, narrowing display to part of the buffer,
|
||||
editing double-column files and binary files, saving an Emacs session
|
||||
for later resumption, following hyperlinks, browsing images, emulating
|
||||
other editors, and various diversions and amusements.
|
||||
editing binary files, saving an Emacs session for later resumption,
|
||||
following hyperlinks, browsing images, emulating other editors, and
|
||||
various diversions and amusements.
|
||||
|
||||
@end iftex
|
||||
|
||||
@ -20,187 +20,7 @@ other editors, and various diversions and amusements.
|
||||
@raisesections
|
||||
@end ifnottex
|
||||
|
||||
@node Document View, Gnus, Calendar/Diary, Top
|
||||
@section Document Viewing
|
||||
@cindex DVI file
|
||||
@cindex PDF file
|
||||
@cindex PS file
|
||||
@cindex Postscript file
|
||||
@cindex OpenDocument file
|
||||
@cindex Microsoft Office file
|
||||
@cindex DocView mode
|
||||
@cindex mode, DocView
|
||||
@cindex document viewer (DocView)
|
||||
@findex doc-view-mode
|
||||
|
||||
DocView mode (@code{doc-view-mode}) is a viewer for DVI, Postscript
|
||||
(PS), PDF, OpenDocument, and Microsoft Office documents. It provides
|
||||
features such as slicing, zooming, and searching inside documents. It
|
||||
works by converting the document to a set of images using the
|
||||
@command{gs} (GhostScript) command and other external tools
|
||||
@footnote{@code{gs} is a hard requirement. For DVI files,
|
||||
@code{dvipdf} or @code{dvipdfm} is needed. For OpenDocument and
|
||||
Microsoft Office documents, the @code{unoconv} tool is needed.}, and
|
||||
displaying those images.
|
||||
|
||||
@findex doc-view-toggle-display
|
||||
@findex doc-view-toggle-display
|
||||
@cindex doc-view-minor-mode
|
||||
When you visit a document file with the exception of Postscript
|
||||
files, Emacs automatically switches to DocView mode if possible
|
||||
@footnote{The needed external tools for this document type have to be
|
||||
available, emacs needs to run in a graphical frame, and PNG image
|
||||
support has to be compiled into emacs. If any of these requirements
|
||||
is not fulfilled, DocView falls back to an appropriate mode.}. When
|
||||
you visit a Postscript file, Emacs switches to PS mode, a major mode
|
||||
for editing Postscript files as text; however, it also enables DocView
|
||||
minor mode, so you can type @kbd{C-c C-c} to view the document with
|
||||
DocView. (PDF and DVI files, unlike Postscript files, are not usually
|
||||
human-editable.) In either case, repeating @kbd{C-c C-c}
|
||||
(@code{doc-view-toggle-display}) toggles between DocView and the file
|
||||
text.
|
||||
|
||||
You can explicitly toggle DocView mode with the command @code{M-x
|
||||
doc-view-mode}, and DocView minor mode with the command @code{M-x
|
||||
doc-view-minor-mode}.
|
||||
|
||||
When DocView mode starts, it displays a welcome screen and begins
|
||||
formatting the file, page by page. It displays the first page once
|
||||
that has been formatted.
|
||||
|
||||
@findex doc-view-enlarge
|
||||
@findex doc-view-shrink
|
||||
@vindex doc-view-resolution
|
||||
When in DocView mode, you can enlarge or shrink the document with
|
||||
@kbd{+} (@code{doc-view-enlarge}) and @kbd{-}
|
||||
(@code{doc-view-shrink}). To specify the default size for DocView,
|
||||
set or customize the variable @code{doc-view-resolution}.
|
||||
|
||||
To kill the DocView buffer, type @kbd{k}
|
||||
(@code{doc-view-kill-proc-and-buffer}). To bury it, type @kbd{q}
|
||||
(@code{quit-window}).
|
||||
|
||||
@menu
|
||||
* Navigation:: Navigation inside DocView buffers.
|
||||
* Searching:: Searching inside documents.
|
||||
* Slicing:: Specifying which part of pages should be displayed.
|
||||
* Conversion:: Influencing and triggering conversion.
|
||||
@end menu
|
||||
|
||||
@node Navigation
|
||||
@subsection Navigation
|
||||
|
||||
When in DocView mode, you can scroll the current page using the usual
|
||||
Emacs movement keys: @kbd{C-p}, @kbd{C-n}, @kbd{C-b}, @kbd{C-f}, and
|
||||
the arrow keys.
|
||||
|
||||
@vindex doc-view-continuous
|
||||
By default, the line-motion keys @kbd{C-p} and @kbd{C-n} stop
|
||||
scrolling at the beginning and end of the current page, respectively.
|
||||
However, if you change the variable @code{doc-view-continuous} to a
|
||||
non-@code{nil} value, then @kbd{C-p} displays the previous page if you
|
||||
are already at the beginning of the current page, and @kbd{C-n}
|
||||
displays the next page if you are at the end of the current page.
|
||||
|
||||
@findex doc-view-next-page
|
||||
@findex doc-view-previous-page
|
||||
You can also display the next page by typing @kbd{n}, @key{next} or
|
||||
@kbd{C-x ]} (@code{doc-view-next-page}). To display the previous
|
||||
page, type @kbd{p}, @key{prior} or @kbd{C-x [}
|
||||
(@code{doc-view-previous-page}).
|
||||
|
||||
@findex doc-view-scroll-up-or-next-page
|
||||
@findex doc-view-scroll-down-or-previous-page
|
||||
The @key{SPC} (@code{doc-view-scroll-up-or-next-page}) key is a
|
||||
convenient way to advance through the document. It scrolls within the
|
||||
current page or advances to the next. @key{DEL} moves backwards in a
|
||||
similar way (@code{doc-view-scroll-down-or-previous-page}).
|
||||
|
||||
@findex doc-view-first-page
|
||||
@findex doc-view-last-page
|
||||
@findex doc-view-goto-page
|
||||
To go to the first page, type @kbd{M-<}
|
||||
(@code{doc-view-first-page}); to go to the last one, type @kbd{M->}
|
||||
(@code{doc-view-last-page}). To jump to a page by its number, type
|
||||
@kbd{M-g M-g} or @kbd{M-g g} (@code{doc-view-goto-page}).
|
||||
|
||||
@node Searching
|
||||
@subsection Searching
|
||||
|
||||
While in DocView mode, you can search the file's text for a regular
|
||||
expression (@pxref{Regexps}). The interface for searching is inspired
|
||||
by @code{isearch} (@pxref{Incremental Search}).
|
||||
|
||||
@findex doc-view-search
|
||||
@findex doc-view-search-backward
|
||||
@findex doc-view-show-tooltip
|
||||
To begin a search, type @kbd{C-s} (@code{doc-view-search}) or
|
||||
@kbd{C-r} (@code{doc-view-search-backward}). This reads a regular
|
||||
expression using a minibuffer, then echoes the number of matches found
|
||||
within the document. You can move forward and back among the matches
|
||||
by typing @kbd{C-s} and @kbd{C-r}. DocView mode has no way to show
|
||||
the match inside the page image; instead, it displays a tooltip (at
|
||||
the mouse position) listing all matching lines in the current page.
|
||||
To force display of this tooltip, type @kbd{C-t}
|
||||
(@code{doc-view-show-tooltip}).
|
||||
|
||||
To start a new search, use the search command with a prefix
|
||||
argument; i.e., @kbd{C-u C-s} for a forward search or @kbd{C-u C-r}
|
||||
for a backward search.
|
||||
|
||||
@node Slicing
|
||||
@subsection Slicing
|
||||
|
||||
Documents often have wide margins for printing. They are annoying
|
||||
when reading the document on the screen, because they use up screen
|
||||
space and can cause inconvenient scrolling.
|
||||
|
||||
@findex doc-view-set-slice
|
||||
@findex doc-view-set-slice-using-mouse
|
||||
With DocView you can hide these margins by selecting a @dfn{slice}
|
||||
of pages to display. A slice is a rectangle within the page area;
|
||||
once you specify a slice in DocView, it applies to whichever page you
|
||||
look at.
|
||||
|
||||
To specify the slice numerically, type @kbd{s s}
|
||||
(@code{doc-view-set-slice}); then enter the top left pixel position
|
||||
and the slice's width and height.
|
||||
@c ??? how does this work?
|
||||
|
||||
A more convenient graphical way to specify the slice is with @kbd{s
|
||||
m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to
|
||||
select the slice.
|
||||
@c ??? How does this work?
|
||||
|
||||
@findex doc-view-reset-slice
|
||||
To cancel the selected slice, type @kbd{s r}
|
||||
(@code{doc-view-reset-slice}). Then DocView shows the entire page
|
||||
including its entire margins.
|
||||
|
||||
@node Conversion
|
||||
@subsection Conversion
|
||||
|
||||
@vindex doc-view-cache-directory
|
||||
@findex doc-view-clear-cache
|
||||
For efficiency, DocView caches the images produced by @command{gs}.
|
||||
The name of this directory is given by the variable
|
||||
@code{doc-view-cache-directory}. You can clear the cache directory by
|
||||
typing @code{M-x doc-view-clear-cache}.
|
||||
|
||||
@findex doc-view-kill-proc
|
||||
@findex doc-view-kill-proc-and-buffer
|
||||
To force a reconversion of the currently viewed document, type
|
||||
@kbd{r} or @kbd{g} (@code{revert-buffer}). To kill the converter
|
||||
process associated with the current buffer, type @kbd{K}
|
||||
(@code{doc-view-kill-proc}). The command @kbd{k}
|
||||
(@code{doc-view-kill-proc-and-buffer}) kills the converter process and
|
||||
the DocView buffer.
|
||||
|
||||
The zoom commands @kbd{+} (@code{doc-view-enlarge}) and @kbd{-}
|
||||
(@code{doc-view-shrink}) need to reconvert the document at the new
|
||||
size. The current page is converted first.
|
||||
|
||||
@node Gnus, Shell, Document View, Top
|
||||
@node Gnus
|
||||
@section Gnus
|
||||
@cindex Gnus
|
||||
@cindex reading netnews
|
||||
@ -411,82 +231,187 @@ for @var{regexp}.
|
||||
|
||||
@end table
|
||||
|
||||
@ignore
|
||||
@node Where to Look
|
||||
@subsection Where to Look Further
|
||||
@node Document View
|
||||
@section Document Viewing
|
||||
@cindex DVI file
|
||||
@cindex PDF file
|
||||
@cindex PS file
|
||||
@cindex Postscript file
|
||||
@cindex OpenDocument file
|
||||
@cindex Microsoft Office file
|
||||
@cindex DocView mode
|
||||
@cindex mode, DocView
|
||||
@cindex document viewer (DocView)
|
||||
@findex doc-view-mode
|
||||
|
||||
@c Too many references to the name of the manual if done with xref in TeX!
|
||||
Gnus is powerful and customizable. Here are references to a few
|
||||
@ifnottex
|
||||
additional topics:
|
||||
DocView mode (@code{doc-view-mode}) is a viewer for DVI, Postscript
|
||||
(PS), PDF, OpenDocument, and Microsoft Office documents. It provides
|
||||
features such as slicing, zooming, and searching inside documents. It
|
||||
works by converting the document to a set of images using the
|
||||
@command{gs} (GhostScript) command and other external tools
|
||||
@footnote{@code{gs} is a hard requirement. For DVI files,
|
||||
@code{dvipdf} or @code{dvipdfm} is needed. For OpenDocument and
|
||||
Microsoft Office documents, the @code{unoconv} tool is needed.}, and
|
||||
displaying those images.
|
||||
|
||||
@end ifnottex
|
||||
@iftex
|
||||
additional topics in @cite{The Gnus Manual}:
|
||||
@findex doc-view-toggle-display
|
||||
@findex doc-view-toggle-display
|
||||
@cindex doc-view-minor-mode
|
||||
When you visit a document file with the exception of Postscript
|
||||
files, Emacs automatically switches to DocView mode if possible
|
||||
@footnote{The needed external tools for this document type have to be
|
||||
available, emacs needs to run in a graphical frame, and PNG image
|
||||
support has to be compiled into emacs. If any of these requirements
|
||||
is not fulfilled, DocView falls back to an appropriate mode.}. When
|
||||
you visit a Postscript file, Emacs switches to PS mode, a major mode
|
||||
for editing Postscript files as text; however, it also enables DocView
|
||||
minor mode, so you can type @kbd{C-c C-c} to view the document with
|
||||
DocView. (PDF and DVI files, unlike Postscript files, are not usually
|
||||
human-editable.) In either case, repeating @kbd{C-c C-c}
|
||||
(@code{doc-view-toggle-display}) toggles between DocView and the file
|
||||
text.
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Follow discussions on specific topics.@*
|
||||
See section ``Threading.''
|
||||
You can explicitly toggle DocView mode with the command @code{M-x
|
||||
doc-view-mode}, and DocView minor mode with the command @code{M-x
|
||||
doc-view-minor-mode}.
|
||||
|
||||
@item
|
||||
Read digests. See section ``Document Groups.''
|
||||
When DocView mode starts, it displays a welcome screen and begins
|
||||
formatting the file, page by page. It displays the first page once
|
||||
that has been formatted.
|
||||
|
||||
@item
|
||||
Refer to and jump to the parent of the current article.@*
|
||||
See section ``Finding the Parent.''
|
||||
@findex doc-view-enlarge
|
||||
@findex doc-view-shrink
|
||||
@vindex doc-view-resolution
|
||||
When in DocView mode, you can enlarge or shrink the document with
|
||||
@kbd{+} (@code{doc-view-enlarge}) and @kbd{-}
|
||||
(@code{doc-view-shrink}). To specify the default size for DocView,
|
||||
set or customize the variable @code{doc-view-resolution}.
|
||||
|
||||
@item
|
||||
Refer to articles by using Message-IDs included in the messages.@*
|
||||
See section ``Article Keymap.''
|
||||
To kill the DocView buffer, type @kbd{k}
|
||||
(@code{doc-view-kill-proc-and-buffer}). To bury it, type @kbd{q}
|
||||
(@code{quit-window}).
|
||||
|
||||
@item
|
||||
Save articles. See section ``Saving Articles.''
|
||||
@menu
|
||||
* Navigation:: Navigation inside DocView buffers.
|
||||
* Searching:: Searching inside documents.
|
||||
* Slicing:: Specifying which part of pages should be displayed.
|
||||
* Conversion:: Influencing and triggering conversion.
|
||||
@end menu
|
||||
|
||||
@item
|
||||
Have Gnus score articles according to various criteria, like author
|
||||
name, subject, or string in the body of the articles.@*
|
||||
See section ``Scoring.''
|
||||
@node Navigation
|
||||
@subsection Navigation
|
||||
|
||||
@item
|
||||
Send an article to a newsgroup.@*
|
||||
See section ``Composing Messages.''
|
||||
@end itemize
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@itemize @bullet
|
||||
@item
|
||||
Follow discussions on specific topics.@*
|
||||
@xref{Threading, , Reading Based on Conversation Threads,
|
||||
gnus, The Gnus Manual}.
|
||||
When in DocView mode, you can scroll the current page using the usual
|
||||
Emacs movement keys: @kbd{C-p}, @kbd{C-n}, @kbd{C-b}, @kbd{C-f}, and
|
||||
the arrow keys.
|
||||
|
||||
@item
|
||||
Read digests. @xref{Document Groups, , , gnus, The Gnus Manual}.
|
||||
@vindex doc-view-continuous
|
||||
By default, the line-motion keys @kbd{C-p} and @kbd{C-n} stop
|
||||
scrolling at the beginning and end of the current page, respectively.
|
||||
However, if you change the variable @code{doc-view-continuous} to a
|
||||
non-@code{nil} value, then @kbd{C-p} displays the previous page if you
|
||||
are already at the beginning of the current page, and @kbd{C-n}
|
||||
displays the next page if you are at the end of the current page.
|
||||
|
||||
@item
|
||||
Refer to and jump to the parent of the current article.@*
|
||||
@xref{Finding the Parent, , , gnus, The Gnus Manual}.
|
||||
@findex doc-view-next-page
|
||||
@findex doc-view-previous-page
|
||||
You can also display the next page by typing @kbd{n}, @key{next} or
|
||||
@kbd{C-x ]} (@code{doc-view-next-page}). To display the previous
|
||||
page, type @kbd{p}, @key{prior} or @kbd{C-x [}
|
||||
(@code{doc-view-previous-page}).
|
||||
|
||||
@item
|
||||
Refer to articles by using Message-IDs included in the messages.@*
|
||||
@xref{Article Keymap, , , gnus, The Gnus Manual}.
|
||||
@findex doc-view-scroll-up-or-next-page
|
||||
@findex doc-view-scroll-down-or-previous-page
|
||||
The @key{SPC} (@code{doc-view-scroll-up-or-next-page}) key is a
|
||||
convenient way to advance through the document. It scrolls within the
|
||||
current page or advances to the next. @key{DEL} moves backwards in a
|
||||
similar way (@code{doc-view-scroll-down-or-previous-page}).
|
||||
|
||||
@item
|
||||
Save articles. @xref{Saving Articles, , , gnus, The Gnus Manual}.
|
||||
@findex doc-view-first-page
|
||||
@findex doc-view-last-page
|
||||
@findex doc-view-goto-page
|
||||
To go to the first page, type @kbd{M-<}
|
||||
(@code{doc-view-first-page}); to go to the last one, type @kbd{M->}
|
||||
(@code{doc-view-last-page}). To jump to a page by its number, type
|
||||
@kbd{M-g M-g} or @kbd{M-g g} (@code{doc-view-goto-page}).
|
||||
|
||||
@item
|
||||
Have Gnus score articles according to various criteria, like author
|
||||
name, subject, or string in the body of the articles.@*
|
||||
@xref{Scoring, , , gnus, The Gnus Manual}.
|
||||
@node Searching
|
||||
@subsection Searching
|
||||
|
||||
@item
|
||||
Send an article to a newsgroup.@*
|
||||
@xref{Composing Messages, , , gnus, The Gnus Manual}.
|
||||
@end itemize
|
||||
@end ifnottex
|
||||
@end ignore
|
||||
While in DocView mode, you can search the file's text for a regular
|
||||
expression (@pxref{Regexps}). The interface for searching is inspired
|
||||
by @code{isearch} (@pxref{Incremental Search}).
|
||||
|
||||
@node Shell, Emacs Server, Gnus, Top
|
||||
@findex doc-view-search
|
||||
@findex doc-view-search-backward
|
||||
@findex doc-view-show-tooltip
|
||||
To begin a search, type @kbd{C-s} (@code{doc-view-search}) or
|
||||
@kbd{C-r} (@code{doc-view-search-backward}). This reads a regular
|
||||
expression using a minibuffer, then echoes the number of matches found
|
||||
within the document. You can move forward and back among the matches
|
||||
by typing @kbd{C-s} and @kbd{C-r}. DocView mode has no way to show
|
||||
the match inside the page image; instead, it displays a tooltip (at
|
||||
the mouse position) listing all matching lines in the current page.
|
||||
To force display of this tooltip, type @kbd{C-t}
|
||||
(@code{doc-view-show-tooltip}).
|
||||
|
||||
To start a new search, use the search command with a prefix
|
||||
argument; i.e., @kbd{C-u C-s} for a forward search or @kbd{C-u C-r}
|
||||
for a backward search.
|
||||
|
||||
@node Slicing
|
||||
@subsection Slicing
|
||||
|
||||
Documents often have wide margins for printing. They are annoying
|
||||
when reading the document on the screen, because they use up screen
|
||||
space and can cause inconvenient scrolling.
|
||||
|
||||
@findex doc-view-set-slice
|
||||
@findex doc-view-set-slice-using-mouse
|
||||
With DocView you can hide these margins by selecting a @dfn{slice}
|
||||
of pages to display. A slice is a rectangle within the page area;
|
||||
once you specify a slice in DocView, it applies to whichever page you
|
||||
look at.
|
||||
|
||||
To specify the slice numerically, type @kbd{s s}
|
||||
(@code{doc-view-set-slice}); then enter the top left pixel position
|
||||
and the slice's width and height.
|
||||
@c ??? how does this work?
|
||||
|
||||
A more convenient graphical way to specify the slice is with @kbd{s
|
||||
m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to
|
||||
select the slice.
|
||||
@c ??? How does this work?
|
||||
|
||||
@findex doc-view-reset-slice
|
||||
To cancel the selected slice, type @kbd{s r}
|
||||
(@code{doc-view-reset-slice}). Then DocView shows the entire page
|
||||
including its entire margins.
|
||||
|
||||
@node Conversion
|
||||
@subsection Conversion
|
||||
|
||||
@vindex doc-view-cache-directory
|
||||
@findex doc-view-clear-cache
|
||||
For efficiency, DocView caches the images produced by @command{gs}.
|
||||
The name of this directory is given by the variable
|
||||
@code{doc-view-cache-directory}. You can clear the cache directory by
|
||||
typing @code{M-x doc-view-clear-cache}.
|
||||
|
||||
@findex doc-view-kill-proc
|
||||
@findex doc-view-kill-proc-and-buffer
|
||||
To force a reconversion of the currently viewed document, type
|
||||
@kbd{r} or @kbd{g} (@code{revert-buffer}). To kill the converter
|
||||
process associated with the current buffer, type @kbd{K}
|
||||
(@code{doc-view-kill-proc}). The command @kbd{k}
|
||||
(@code{doc-view-kill-proc-and-buffer}) kills the converter process and
|
||||
the DocView buffer.
|
||||
|
||||
The zoom commands @kbd{+} (@code{doc-view-enlarge}) and @kbd{-}
|
||||
(@code{doc-view-shrink}) need to reconvert the document at the new
|
||||
size. The current page is converted first.
|
||||
|
||||
@node Shell
|
||||
@section Running Shell Commands from Emacs
|
||||
@cindex subshell
|
||||
@cindex shell commands
|
||||
@ -1788,7 +1713,7 @@ not compatible with @code{lpr}.
|
||||
@end menu
|
||||
|
||||
@node PostScript, PostScript Variables,, Printing
|
||||
@section PostScript Hardcopy
|
||||
@subsection PostScript Hardcopy
|
||||
|
||||
These commands convert buffer contents to PostScript,
|
||||
either printing it or leaving it in another Emacs buffer.
|
||||
@ -1878,7 +1803,7 @@ supports ISO 8859-1 characters.
|
||||
@end ifnottex
|
||||
|
||||
@node PostScript Variables, Printing Package, PostScript, Printing
|
||||
@section Variables for PostScript Hardcopy
|
||||
@subsection Variables for PostScript Hardcopy
|
||||
|
||||
@vindex ps-lpr-command
|
||||
@vindex ps-lpr-switches
|
||||
@ -1973,7 +1898,7 @@ includes a single directory @file{/usr/local/share/emacs/fonts/bdf}.
|
||||
described in the Lisp files @file{ps-print.el} and @file{ps-mule.el}.
|
||||
|
||||
@node Printing Package,, PostScript Variables, Printing
|
||||
@section Printing Package
|
||||
@subsection Printing Package
|
||||
@cindex Printing package
|
||||
|
||||
The basic Emacs facilities for printing hardcopy can be extended
|
||||
@ -1999,7 +1924,7 @@ to print, you start the print job using the @samp{Print} button (click
|
||||
further information on the various options, use the @samp{Interface
|
||||
Help} button.
|
||||
|
||||
@node Sorting, Narrowing, Printing, Top
|
||||
@node Sorting
|
||||
@section Sorting Text
|
||||
@cindex sorting
|
||||
|
||||
@ -2134,163 +2059,13 @@ rectangle moves along with the text inside the rectangle.
|
||||
Many of the sort commands ignore case differences when comparing, if
|
||||
@code{sort-fold-case} is non-@code{nil}.
|
||||
|
||||
@node Narrowing, Two-Column, Sorting, Top
|
||||
@section Narrowing
|
||||
@cindex widening
|
||||
@cindex restriction
|
||||
@cindex narrowing
|
||||
@cindex accessible portion
|
||||
@c Picture Mode documentation
|
||||
@ifnottex
|
||||
@include picture-xtra.texi
|
||||
@end ifnottex
|
||||
|
||||
@dfn{Narrowing} means focusing in on some portion of the buffer,
|
||||
making the rest temporarily inaccessible. The portion which you can
|
||||
still get to is called the @dfn{accessible portion}. Canceling the
|
||||
narrowing, which makes the entire buffer once again accessible, is
|
||||
called @dfn{widening}. The bounds of narrowing in effect in a buffer
|
||||
are called the buffer's @dfn{restriction}.
|
||||
|
||||
Narrowing can make it easier to concentrate on a single subroutine or
|
||||
paragraph by eliminating clutter. It can also be used to limit the
|
||||
range of operation of a replace command or repeating keyboard macro.
|
||||
|
||||
@table @kbd
|
||||
@item C-x n n
|
||||
Narrow down to between point and mark (@code{narrow-to-region}).
|
||||
@item C-x n w
|
||||
Widen to make the entire buffer accessible again (@code{widen}).
|
||||
@item C-x n p
|
||||
Narrow down to the current page (@code{narrow-to-page}).
|
||||
@item C-x n d
|
||||
Narrow down to the current defun (@code{narrow-to-defun}).
|
||||
@end table
|
||||
|
||||
When you have narrowed down to a part of the buffer, that part appears
|
||||
to be all there is. You can't see the rest, you can't move into it
|
||||
(motion commands won't go outside the accessible part), you can't change
|
||||
it in any way. However, it is not gone, and if you save the file all
|
||||
the inaccessible text will be saved. The word @samp{Narrow} appears in
|
||||
the mode line whenever narrowing is in effect.
|
||||
|
||||
@kindex C-x n n
|
||||
@findex narrow-to-region
|
||||
The primary narrowing command is @kbd{C-x n n} (@code{narrow-to-region}).
|
||||
It sets the current buffer's restrictions so that the text in the current
|
||||
region remains accessible, but all text before the region or after the
|
||||
region is inaccessible. Point and mark do not change.
|
||||
|
||||
@kindex C-x n p
|
||||
@findex narrow-to-page
|
||||
@kindex C-x n d
|
||||
@findex narrow-to-defun
|
||||
Alternatively, use @kbd{C-x n p} (@code{narrow-to-page}) to narrow
|
||||
down to the current page. @xref{Pages}, for the definition of a page.
|
||||
@kbd{C-x n d} (@code{narrow-to-defun}) narrows down to the defun
|
||||
containing point (@pxref{Defuns}).
|
||||
|
||||
@kindex C-x n w
|
||||
@findex widen
|
||||
The way to cancel narrowing is to widen with @kbd{C-x n w}
|
||||
(@code{widen}). This makes all text in the buffer accessible again.
|
||||
|
||||
You can get information on what part of the buffer you are narrowed down
|
||||
to using the @kbd{C-x =} command. @xref{Position Info}.
|
||||
|
||||
Because narrowing can easily confuse users who do not understand it,
|
||||
@code{narrow-to-region} is normally a disabled command. Attempting to use
|
||||
this command asks for confirmation and gives you the option of enabling it;
|
||||
if you enable the command, confirmation will no longer be required for
|
||||
it. @xref{Disabling}.
|
||||
|
||||
@node Two-Column, Editing Binary Files, Narrowing, Top
|
||||
@section Two-Column Editing
|
||||
@cindex two-column editing
|
||||
@cindex splitting columns
|
||||
@cindex columns, splitting
|
||||
|
||||
Two-column mode lets you conveniently edit two side-by-side columns of
|
||||
text. It uses two side-by-side windows, each showing its own
|
||||
buffer.
|
||||
|
||||
There are three ways to enter two-column mode:
|
||||
|
||||
@table @asis
|
||||
@item @kbd{@key{F2} 2} or @kbd{C-x 6 2}
|
||||
@kindex F2 2
|
||||
@kindex C-x 6 2
|
||||
@findex 2C-two-columns
|
||||
Enter two-column mode with the current buffer on the left, and on the
|
||||
right, a buffer whose name is based on the current buffer's name
|
||||
(@code{2C-two-columns}). If the right-hand buffer doesn't already
|
||||
exist, it starts out empty; the current buffer's contents are not
|
||||
changed.
|
||||
|
||||
This command is appropriate when the current buffer is empty or contains
|
||||
just one column and you want to add another column.
|
||||
|
||||
@item @kbd{@key{F2} s} or @kbd{C-x 6 s}
|
||||
@kindex F2 s
|
||||
@kindex C-x 6 s
|
||||
@findex 2C-split
|
||||
Split the current buffer, which contains two-column text, into two
|
||||
buffers, and display them side by side (@code{2C-split}). The current
|
||||
buffer becomes the left-hand buffer, but the text in the right-hand
|
||||
column is moved into the right-hand buffer. The current column
|
||||
specifies the split point. Splitting starts with the current line and
|
||||
continues to the end of the buffer.
|
||||
|
||||
This command is appropriate when you have a buffer that already contains
|
||||
two-column text, and you wish to separate the columns temporarily.
|
||||
|
||||
@item @kbd{@key{F2} b @var{buffer} @key{RET}}
|
||||
@itemx @kbd{C-x 6 b @var{buffer} @key{RET}}
|
||||
@kindex F2 b
|
||||
@kindex C-x 6 b
|
||||
@findex 2C-associate-buffer
|
||||
Enter two-column mode using the current buffer as the left-hand buffer,
|
||||
and using buffer @var{buffer} as the right-hand buffer
|
||||
(@code{2C-associate-buffer}).
|
||||
@end table
|
||||
|
||||
@kbd{@key{F2} s} or @kbd{C-x 6 s} looks for a column separator, which
|
||||
is a string that appears on each line between the two columns. You can
|
||||
specify the width of the separator with a numeric argument to
|
||||
@kbd{@key{F2} s}; that many characters, before point, constitute the
|
||||
separator string. By default, the width is 1, so the column separator
|
||||
is the character before point.
|
||||
|
||||
When a line has the separator at the proper place, @kbd{@key{F2} s}
|
||||
puts the text after the separator into the right-hand buffer, and
|
||||
deletes the separator. Lines that don't have the column separator at
|
||||
the proper place remain unsplit; they stay in the left-hand buffer, and
|
||||
the right-hand buffer gets an empty line to correspond. (This is the
|
||||
way to write a line that ``spans both columns while in two-column
|
||||
mode'': write it in the left-hand buffer, and put an empty line in the
|
||||
right-hand buffer.)
|
||||
|
||||
@kindex F2 RET
|
||||
@kindex C-x 6 RET
|
||||
@findex 2C-newline
|
||||
The command @kbd{C-x 6 @key{RET}} or @kbd{@key{F2} @key{RET}}
|
||||
(@code{2C-newline}) inserts a newline in each of the two buffers at
|
||||
corresponding positions. This is the easiest way to add a new line to
|
||||
the two-column text while editing it in split buffers.
|
||||
|
||||
@kindex F2 1
|
||||
@kindex C-x 6 1
|
||||
@findex 2C-merge
|
||||
When you have edited both buffers as you wish, merge them with
|
||||
@kbd{@key{F2} 1} or @kbd{C-x 6 1} (@code{2C-merge}). This copies the
|
||||
text from the right-hand buffer as a second column in the other buffer.
|
||||
To go back to two-column editing, use @kbd{@key{F2} s}.
|
||||
|
||||
@kindex F2 d
|
||||
@kindex C-x 6 d
|
||||
@findex 2C-dissociate
|
||||
Use @kbd{@key{F2} d} or @kbd{C-x 6 d} to dissociate the two buffers,
|
||||
leaving each as it stands (@code{2C-dissociate}). If the other buffer,
|
||||
the one not current when you type @kbd{@key{F2} d}, is empty,
|
||||
@kbd{@key{F2} d} kills it.
|
||||
|
||||
@node Editing Binary Files, Saving Emacs Sessions, Two-Column, Top
|
||||
@node Editing Binary Files
|
||||
@section Editing Binary Files
|
||||
|
||||
@cindex Hexl mode
|
||||
|
@ -5,7 +5,7 @@
|
||||
@c This file is included either in emacs-xtra.texi (when producing the
|
||||
@c printed version) or in the main Emacs manual (for the on-line version).
|
||||
@node Picture Mode
|
||||
@chapter Editing Pictures
|
||||
@section Editing Pictures
|
||||
@cindex pictures
|
||||
@cindex making pictures out of text characters
|
||||
@findex picture-mode
|
||||
@ -59,7 +59,7 @@ Additional extensions to Picture mode can be found in
|
||||
@end menu
|
||||
|
||||
@node Basic Picture
|
||||
@section Basic Editing in Picture Mode
|
||||
@subsection Basic Editing in Picture Mode
|
||||
|
||||
@findex picture-forward-column
|
||||
@findex picture-backward-column
|
||||
@ -124,7 +124,7 @@ modes), or one of the picture rectangle commands (@pxref{Rectangles in
|
||||
Picture}).
|
||||
|
||||
@node Insert in Picture
|
||||
@section Controlling Motion after Insert
|
||||
@subsection Controlling Motion after Insert
|
||||
|
||||
@findex picture-movement-up
|
||||
@findex picture-movement-down
|
||||
@ -188,7 +188,7 @@ same direction as motion after ``insertion'' currently does, while @kbd{C-c
|
||||
C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
|
||||
|
||||
@node Tabs in Picture
|
||||
@section Picture Mode Tabs
|
||||
@subsection Picture Mode Tabs
|
||||
|
||||
@kindex M-TAB @r{(Picture mode)}
|
||||
@findex picture-tab-search
|
||||
@ -228,7 +228,7 @@ up the picture. You can do this by setting the variable
|
||||
@code{indent-tabs-mode} to @code{nil}.
|
||||
|
||||
@node Rectangles in Picture
|
||||
@section Picture Mode Rectangle Commands
|
||||
@subsection Picture Mode Rectangle Commands
|
||||
@cindex rectangles and Picture mode
|
||||
@cindex Picture mode and rectangles
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011
|
||||
@c Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@node Rmail, Dired, Sending Mail, Top
|
||||
@node Rmail
|
||||
@chapter Reading Mail with Rmail
|
||||
@cindex Rmail
|
||||
@cindex reading mail
|
||||
|
@ -70,6 +70,7 @@ for editing such pictures.
|
||||
* Nroff Mode:: Editing input to the formatter nroff.
|
||||
* Formatted Text:: Editing formatted text directly in WYSIWYG fashion.
|
||||
* Text Based Tables:: Editing text-based tables in WYSIWYG fashion.
|
||||
* Two-Column:: Splitting text columns into separate windows.
|
||||
@end menu
|
||||
|
||||
@node Words
|
||||
@ -2837,3 +2838,93 @@ then inserts the generated table in the proper syntax into the
|
||||
destination buffer. The default destination buffer is
|
||||
@code{table.@var{lang}}, where @var{lang} is the language you
|
||||
specified.
|
||||
|
||||
@node Two-Column
|
||||
@section Two-Column Editing
|
||||
@cindex two-column editing
|
||||
@cindex splitting columns
|
||||
@cindex columns, splitting
|
||||
|
||||
Two-column mode lets you conveniently edit two side-by-side columns of
|
||||
text. It uses two side-by-side windows, each showing its own
|
||||
buffer.
|
||||
|
||||
There are three ways to enter two-column mode:
|
||||
|
||||
@table @asis
|
||||
@item @kbd{@key{F2} 2} or @kbd{C-x 6 2}
|
||||
@kindex F2 2
|
||||
@kindex C-x 6 2
|
||||
@findex 2C-two-columns
|
||||
Enter two-column mode with the current buffer on the left, and on the
|
||||
right, a buffer whose name is based on the current buffer's name
|
||||
(@code{2C-two-columns}). If the right-hand buffer doesn't already
|
||||
exist, it starts out empty; the current buffer's contents are not
|
||||
changed.
|
||||
|
||||
This command is appropriate when the current buffer is empty or contains
|
||||
just one column and you want to add another column.
|
||||
|
||||
@item @kbd{@key{F2} s} or @kbd{C-x 6 s}
|
||||
@kindex F2 s
|
||||
@kindex C-x 6 s
|
||||
@findex 2C-split
|
||||
Split the current buffer, which contains two-column text, into two
|
||||
buffers, and display them side by side (@code{2C-split}). The current
|
||||
buffer becomes the left-hand buffer, but the text in the right-hand
|
||||
column is moved into the right-hand buffer. The current column
|
||||
specifies the split point. Splitting starts with the current line and
|
||||
continues to the end of the buffer.
|
||||
|
||||
This command is appropriate when you have a buffer that already contains
|
||||
two-column text, and you wish to separate the columns temporarily.
|
||||
|
||||
@item @kbd{@key{F2} b @var{buffer} @key{RET}}
|
||||
@itemx @kbd{C-x 6 b @var{buffer} @key{RET}}
|
||||
@kindex F2 b
|
||||
@kindex C-x 6 b
|
||||
@findex 2C-associate-buffer
|
||||
Enter two-column mode using the current buffer as the left-hand buffer,
|
||||
and using buffer @var{buffer} as the right-hand buffer
|
||||
(@code{2C-associate-buffer}).
|
||||
@end table
|
||||
|
||||
@kbd{@key{F2} s} or @kbd{C-x 6 s} looks for a column separator, which
|
||||
is a string that appears on each line between the two columns. You can
|
||||
specify the width of the separator with a numeric argument to
|
||||
@kbd{@key{F2} s}; that many characters, before point, constitute the
|
||||
separator string. By default, the width is 1, so the column separator
|
||||
is the character before point.
|
||||
|
||||
When a line has the separator at the proper place, @kbd{@key{F2} s}
|
||||
puts the text after the separator into the right-hand buffer, and
|
||||
deletes the separator. Lines that don't have the column separator at
|
||||
the proper place remain unsplit; they stay in the left-hand buffer, and
|
||||
the right-hand buffer gets an empty line to correspond. (This is the
|
||||
way to write a line that ``spans both columns while in two-column
|
||||
mode'': write it in the left-hand buffer, and put an empty line in the
|
||||
right-hand buffer.)
|
||||
|
||||
@kindex F2 RET
|
||||
@kindex C-x 6 RET
|
||||
@findex 2C-newline
|
||||
The command @kbd{C-x 6 @key{RET}} or @kbd{@key{F2} @key{RET}}
|
||||
(@code{2C-newline}) inserts a newline in each of the two buffers at
|
||||
corresponding positions. This is the easiest way to add a new line to
|
||||
the two-column text while editing it in split buffers.
|
||||
|
||||
@kindex F2 1
|
||||
@kindex C-x 6 1
|
||||
@findex 2C-merge
|
||||
When you have edited both buffers as you wish, merge them with
|
||||
@kbd{@key{F2} 1} or @kbd{C-x 6 1} (@code{2C-merge}). This copies the
|
||||
text from the right-hand buffer as a second column in the other buffer.
|
||||
To go back to two-column editing, use @kbd{@key{F2} s}.
|
||||
|
||||
@kindex F2 d
|
||||
@kindex C-x 6 d
|
||||
@findex 2C-dissociate
|
||||
Use @kbd{@key{F2} d} or @kbd{C-x 6 d} to dissociate the two buffers,
|
||||
leaving each as it stands (@code{2C-dissociate}). If the other buffer,
|
||||
the one not current when you type @kbd{@key{F2} d}, is empty,
|
||||
@kbd{@key{F2} d} kills it.
|
||||
|
@ -1,3 +1,10 @@
|
||||
2011-08-25 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* display.texi (Specified Space): Mention that `space' specs
|
||||
influence bidi reordering.
|
||||
(Bidirectional Display): Explain how to use `(space . PROPS)' for
|
||||
separating fields with bidirectional content.
|
||||
|
||||
2011-08-24 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* display.texi (Bidirectional Display): Document return value in
|
||||
|
@ -3794,6 +3794,10 @@ with a @dfn{pixel ascent} specification (@pxref{Pixel Specification}).
|
||||
non-graphic terminals, but the other space properties in this section
|
||||
are not.
|
||||
|
||||
Note that space properties are treated as paragraph separators for
|
||||
the purposes of reordering bidirectional text for display.
|
||||
@xref{Bidirectional Display}, for the details.
|
||||
|
||||
@node Pixel Specification
|
||||
@subsection Pixel Specification for Spaces
|
||||
@cindex spaces, pixel specification
|
||||
@ -6126,8 +6130,8 @@ with bidirectional content can be displayed @emph{to the left} of the
|
||||
preceding field, producing a jumbled display and messing up the
|
||||
expected layout.
|
||||
|
||||
To countermand this, you can use one of the following techniques for
|
||||
forcing correct order of fields on display:
|
||||
To countermand this, we recommend that you use one of the following
|
||||
techniques for forcing correct order of fields on display:
|
||||
|
||||
@itemize @minus
|
||||
@item
|
||||
@ -6146,6 +6150,15 @@ Include the tab character in the field separator. The tab character
|
||||
plays the role of @dfn{segment separator} in the @acronym{UBA}
|
||||
reordering, whose effect is to make each field a separate segment, and
|
||||
thus reorder them separately.
|
||||
|
||||
@cindex @code{space} display spec, and bidirectional text
|
||||
@item
|
||||
Separate fields with a @code{display} property or overlay with the
|
||||
property value of the form @code{(space . PROPS)} (@pxref{Specified
|
||||
Space}). This display specification is treated by Emacs as a
|
||||
@dfn{paragraph separator}; the text before and after the separator is
|
||||
reordered separately, which avoids the influence of any field on its
|
||||
neighboring fields.
|
||||
@end itemize
|
||||
|
||||
@defun bidi-string-mark-left-to-right string
|
||||
|
@ -1,3 +1,23 @@
|
||||
2011-08-25 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* buff-menu.el (Buffer-menu-buffer+size): Remove calls to
|
||||
bidi-string-mark-left-to-right; they are unnecessary now.
|
||||
|
||||
2011-08-25 Deniz Dogan <deniz@dogan.se>
|
||||
|
||||
* net/quickurl.el: Documentation typo fixes.
|
||||
|
||||
2011-08-25 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* window.el (bury-buffer, quit-window): Use bury-buffer-internal.
|
||||
|
||||
2011-08-25 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* emacs-lisp/derived.el (define-derived-mode): Doc fix.
|
||||
|
||||
* mail/smtpmail.el (smtpmail-smtp-user): Add version: tag.
|
||||
(smtpmail-via-smtp): Handle nil response from smtp.
|
||||
|
||||
2011-08-24 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* proced.el (proced-marked): Inherit from `error' instead of
|
||||
|
@ -681,9 +681,9 @@ For more information, see the function `buffer-menu'."
|
||||
(string-width tail)
|
||||
2))
|
||||
Buffer-menu-short-ellipsis
|
||||
(bidi-string-mark-left-to-right tail))))
|
||||
tail)))
|
||||
;; Don't put properties on (buffer-name).
|
||||
(setq name (bidi-string-mark-left-to-right name)))
|
||||
(setq name (copy-sequence name)))
|
||||
(add-text-properties 0 (length name) name-props name)
|
||||
(add-text-properties 0 (length size) size-props size)
|
||||
(let ((name+space-width (- Buffer-menu-buffer+size-width
|
||||
|
@ -133,10 +133,10 @@ BODY can start with a bunch of keyword arguments. The following keyword
|
||||
Declare the customization group that corresponds to this mode.
|
||||
The command `customize-mode' uses this.
|
||||
:syntax-table TABLE
|
||||
Use TABLE instead of the default.
|
||||
Use TABLE instead of the default (CHILD-syntax-table).
|
||||
A nil value means to simply use the same syntax-table as the parent.
|
||||
:abbrev-table TABLE
|
||||
Use TABLE instead of the default.
|
||||
Use TABLE instead of the default (CHILD-abbrev-table).
|
||||
A nil value means to simply use the same abbrev-table as the parent.
|
||||
|
||||
Here is how you could define LaTeX-Thesis mode as a variant of LaTeX mode:
|
||||
|
@ -88,6 +88,7 @@ The default value would be \"smtp\" or 25."
|
||||
|
||||
(defcustom smtpmail-smtp-user nil
|
||||
"User name to use when looking up credentials."
|
||||
:version "24.1"
|
||||
:type '(choice (const nil) string)
|
||||
:group 'smtpmail)
|
||||
|
||||
@ -677,7 +678,7 @@ The list is in preference order.")
|
||||
(throw 'done (format "No greeting: %s" greeting)))
|
||||
(when (>= code 400)
|
||||
(throw 'done (format "Connection not allowed: %s" greeting))))
|
||||
|
||||
|
||||
(with-current-buffer process-buffer
|
||||
(set-buffer-process-coding-system 'raw-text-unix 'raw-text-unix)
|
||||
(make-local-variable 'smtpmail-read-point)
|
||||
@ -730,7 +731,7 @@ The list is in preference order.")
|
||||
|
||||
(when (member 'xusr supported-extensions)
|
||||
(smtpmail-command-or-throw process (format "XUSR")))
|
||||
|
||||
|
||||
;; MAIL FROM:<sender>
|
||||
(let ((size-part
|
||||
(if (or (member 'size supported-extensions)
|
||||
@ -769,7 +770,7 @@ The list is in preference order.")
|
||||
)
|
||||
((and auth-mechanisms
|
||||
(not ask-for-password)
|
||||
(= (car result) 530))
|
||||
(eq (car result) 530))
|
||||
;; We got a "530 auth required", so we close and try
|
||||
;; again, this time asking the user for a password.
|
||||
(smtpmail-send-command process "QUIT")
|
||||
@ -796,6 +797,7 @@ The list is in preference order.")
|
||||
nil)
|
||||
((and auth-mechanisms
|
||||
(not ask-for-password)
|
||||
(integerp (car result))
|
||||
(>= (car result) 550)
|
||||
(<= (car result) 554))
|
||||
;; We got a "550 relay not permitted" (or the like),
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; quickurl.el --- insert an URL based on text at point in buffer
|
||||
;;; quickurl.el --- insert a URL based on text at point in buffer
|
||||
|
||||
;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This package provides a simple method of inserting an URL based on the
|
||||
;; This package provides a simple method of inserting a URL based on the
|
||||
;; text at point in the current buffer. This is part of an on-going effort
|
||||
;; to increase the information I provide people while reducing the ammount
|
||||
;; of typing I need to do. No-doubt there are undiscovered Emacs packages
|
||||
@ -90,7 +90,7 @@
|
||||
;; Customize options.
|
||||
|
||||
(defgroup quickurl nil
|
||||
"Insert an URL based on text at point in buffer."
|
||||
"Insert a URL based on text at point in buffer."
|
||||
:version "21.1"
|
||||
:group 'abbrev
|
||||
:prefix "quickurl-")
|
||||
@ -194,14 +194,14 @@ in your ~/.emacs (after loading/requiring quickurl).")
|
||||
(defvar quickurl-list-last-buffer nil
|
||||
"`current-buffer' when `quickurl-list' was called.")
|
||||
|
||||
;; Functions for working with an URL entry.
|
||||
;; Functions for working with a URL entry.
|
||||
|
||||
(defun quickurl-url-commented-p (url)
|
||||
"Does the URL have a comment?"
|
||||
(listp (cdr url)))
|
||||
|
||||
(defun quickurl-make-url (keyword url &optional comment)
|
||||
"Create an URL from KEYWORD, URL and (optionaly) COMMENT."
|
||||
"Create a URL from KEYWORD, URL and (optionaly) COMMENT."
|
||||
(if (and comment (not (zerop (length comment))))
|
||||
(list keyword url comment)
|
||||
(cons keyword url)))
|
||||
@ -230,7 +230,7 @@ Note that this function is a setfable place."
|
||||
(setf (cdr ,url) ,store)))
|
||||
|
||||
(defun quickurl-url-comment (url)
|
||||
"Get the comment from an URL.
|
||||
"Get the comment from a URL.
|
||||
|
||||
If the URL has no comment an empty string is returned. Also note that this
|
||||
function is a setfable place."
|
||||
@ -304,7 +304,7 @@ Also display a `message' saying what the URL was unless SILENT is non-nil."
|
||||
|
||||
;;;###autoload
|
||||
(defun* quickurl (&optional lookup)
|
||||
"Insert an URL based on LOOKUP.
|
||||
"Insert a URL based on LOOKUP.
|
||||
|
||||
If not supplied LOOKUP is taken to be the word at point in the current
|
||||
buffer, this default action can be modifed via
|
||||
@ -323,7 +323,7 @@ buffer, this default action can be modifed via
|
||||
|
||||
;;;###autoload
|
||||
(defun quickurl-ask (lookup)
|
||||
"Insert an URL, with `completing-read' prompt, based on LOOKUP."
|
||||
"Insert a URL, with `completing-read' prompt, based on LOOKUP."
|
||||
(interactive
|
||||
(list
|
||||
(progn
|
||||
@ -335,7 +335,7 @@ buffer, this default action can be modifed via
|
||||
(quickurl-insert url))))
|
||||
|
||||
(defun quickurl-grab-url ()
|
||||
"Attempt to grab a word/url pair from point in the current buffer.
|
||||
"Attempt to grab a word/URL pair from point in the current buffer.
|
||||
|
||||
Point should be somewhere on the URL and the word is taken to be the thing
|
||||
that is returned from calling `quickurl-grab-lookup-function' once a
|
||||
@ -369,7 +369,7 @@ It is assumed that the URL is either \"unguarded\" or is wrapped inside an
|
||||
(defun quickurl-add-url (word url comment)
|
||||
"Allow the user to interactively add a new URL associated with WORD.
|
||||
|
||||
See `quickurl-grab-url' for details on how the default word/url combination
|
||||
See `quickurl-grab-url' for details on how the default word/URL combination
|
||||
is decided."
|
||||
(interactive (let ((word-url (quickurl-grab-url)))
|
||||
(list (read-string "Word: " (quickurl-url-keyword word-url))
|
||||
|
1565
lisp/org/ChangeLog
1565
lisp/org/ChangeLog
File diff suppressed because it is too large
Load Diff
@ -2795,7 +2795,7 @@ displayed there."
|
||||
(let* ((buffer (window-normalize-buffer buffer-or-name)))
|
||||
;; If `buffer-or-name' is not on the selected frame we unrecord it
|
||||
;; although it's not "here" (call it a feature).
|
||||
(unrecord-buffer buffer)
|
||||
(bury-buffer-internal buffer)
|
||||
;; Handle case where `buffer-or-name' is nil and the current buffer
|
||||
;; is shown in the selected window.
|
||||
(cond
|
||||
@ -2928,12 +2928,9 @@ one. If non-nil, reset `quit-restore' parameter to nil."
|
||||
(eq (window-buffer window) (nth 1 quit-restore)))
|
||||
(window-dedicated-p window))
|
||||
(setq deletable (window-deletable-p window)))
|
||||
;; WINDOW can be deleted.
|
||||
(unrecord-buffer buffer)
|
||||
;; Check if WINDOW's frame can be deleted.
|
||||
(if (eq deletable 'frame)
|
||||
;; WINDOW's frame can be deleted.
|
||||
(delete-frame (window-frame window))
|
||||
;; Just delete WINDOW.
|
||||
(delete-window window))
|
||||
;; If the previously selected window is still alive, select it.
|
||||
(when (window-live-p (nth 2 quit-restore))
|
||||
@ -2944,17 +2941,17 @@ one. If non-nil, reset `quit-restore' parameter to nil."
|
||||
;; in the first place.
|
||||
(eq (window-buffer window) (nth 3 quit-restore)))
|
||||
(setq resize (with-current-buffer buffer temp-buffer-resize-mode))
|
||||
;; Unrecord buffer.
|
||||
(unrecord-buffer buffer)
|
||||
(unrecord-window-buffer window buffer)
|
||||
;; Display buffer stored in the quit-restore parameter.
|
||||
(set-window-dedicated-p window nil)
|
||||
(set-window-buffer window (nth 0 quit-restore))
|
||||
(set-window-start window (nth 1 quit-restore))
|
||||
(set-window-point window (nth 2 quit-restore))
|
||||
(when (and resize (/= (nth 4 quit-restore) (window-total-size window)))
|
||||
(window-resize
|
||||
window (- (nth 4 quit-restore) (window-total-size window))))
|
||||
(and resize
|
||||
(/= (nth 4 quit-restore) (window-total-size window))
|
||||
(window-resize window
|
||||
(- (nth 4 quit-restore)
|
||||
(window-total-size window))))
|
||||
;; Reset the quit-restore parameter.
|
||||
(set-window-parameter window 'quit-restore nil)
|
||||
(when (window-live-p (nth 5 quit-restore))
|
||||
@ -2963,11 +2960,12 @@ one. If non-nil, reset `quit-restore' parameter to nil."
|
||||
;; Otherwise, show another buffer in WINDOW and reset the
|
||||
;; quit-restore parameter.
|
||||
(set-window-parameter window 'quit-restore nil)
|
||||
(unrecord-buffer buffer)
|
||||
(switch-to-prev-buffer window 'bury-or-kill)))
|
||||
|
||||
;; Kill WINDOW's old-buffer if requested
|
||||
(if kill (kill-buffer buffer))))
|
||||
(if kill
|
||||
(kill-buffer buffer)
|
||||
(bury-buffer-internal buffer))))
|
||||
|
||||
;;; Splitting windows.
|
||||
(defsubst window-split-min-size (&optional horizontal)
|
||||
|
@ -1,4 +1,4 @@
|
||||
2011-08-24 Paul Eggert <eggert@cs.ucla.edu>
|
||||
2011-08-25 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Integer and memory overflow issues (Bug#9196).
|
||||
|
||||
@ -422,6 +422,32 @@
|
||||
(gs_load): Use printmax_t to print the widest integers possible.
|
||||
Check for integer overflow when computing image height and width.
|
||||
|
||||
2011-08-25 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
|
||||
the display spec is of the form `(space ...)'.
|
||||
(handle_display_spec): Return the value returned by
|
||||
handle_single_display_spec, not just 1 or zero.
|
||||
(handle_single_display_spec): If the display spec is of the form
|
||||
`(space ...)', and specifies display in the text area, return 2
|
||||
rather than 1.
|
||||
(try_cursor_movement): Check for the need to scroll more
|
||||
accurately, and prefer exact match for point under bidi. Don't
|
||||
advance `row' beyond the last row of the window.
|
||||
|
||||
* dispextern.h (struct bidi_it): Rename the disp_prop_p member
|
||||
into disp_prop; all users changed.
|
||||
|
||||
* bidi.c (bidi_fetch_char): If compute_display_string_pos returns
|
||||
DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
|
||||
for the text covered by the display property.
|
||||
|
||||
2011-08-25 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
|
||||
Change return value to nil.
|
||||
(Frecord_buffer): Delete unused function.
|
||||
|
||||
2011-08-24 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
|
||||
|
71
src/bidi.c
71
src/bidi.c
@ -553,7 +553,7 @@ bidi_cache_iterator_state (struct bidi_it *bidi_it, int resolved)
|
||||
bidi_cache[idx].next_for_ws = bidi_it->next_for_ws;
|
||||
bidi_cache[idx].ignore_bn_limit = bidi_it->ignore_bn_limit;
|
||||
bidi_cache[idx].disp_pos = bidi_it->disp_pos;
|
||||
bidi_cache[idx].disp_prop_p = bidi_it->disp_prop_p;
|
||||
bidi_cache[idx].disp_prop = bidi_it->disp_prop;
|
||||
}
|
||||
|
||||
bidi_cache_last_idx = idx;
|
||||
@ -827,7 +827,7 @@ bidi_init_it (EMACS_INT charpos, EMACS_INT bytepos, int frame_window_p,
|
||||
bidi_it->prev_for_neutral.orig_type = UNKNOWN_BT;
|
||||
bidi_it->sor = L2R; /* FIXME: should it be user-selectable? */
|
||||
bidi_it->disp_pos = -1; /* invalid/unknown */
|
||||
bidi_it->disp_prop_p = 0;
|
||||
bidi_it->disp_prop = 0;
|
||||
/* We can only shrink the cache if we are at the bottom level of its
|
||||
"stack". */
|
||||
if (bidi_cache_start == 0)
|
||||
@ -907,19 +907,22 @@ bidi_char_at_pos (EMACS_INT bytepos, const unsigned char *s, int unibyte)
|
||||
|
||||
/* Fetch and return the character at BYTEPOS/CHARPOS. If that
|
||||
character is covered by a display string, treat the entire run of
|
||||
covered characters as a single character u+FFFC, and return their
|
||||
combined length in CH_LEN and NCHARS. DISP_POS specifies the
|
||||
character position of the next display string, or -1 if not yet
|
||||
computed. DISP_PROP_P non-zero means that there's really a display
|
||||
string at DISP_POS, as opposed to when we searched till DISP_POS
|
||||
without findingone. When the next character is at or beyond that
|
||||
position, the function updates DISP_POS with the position of the
|
||||
next display string. STRING->s is the C string to iterate, or NULL
|
||||
if iterating over a buffer or a Lisp string; in the latter case,
|
||||
STRING->lstring is the Lisp string. */
|
||||
covered characters as a single character, either u+2029 or u+FFFC,
|
||||
and return their combined length in CH_LEN and NCHARS. DISP_POS
|
||||
specifies the character position of the next display string, or -1
|
||||
if not yet computed. DISP_PROP non-zero means that there's really
|
||||
a display string at DISP_POS, as opposed to when we searched till
|
||||
DISP_POS without finding one. If DISP_PROP is 2, it means the
|
||||
display spec is of the form `(space ...)', which is replaced with
|
||||
u+2029 to handle it as a paragraph separator. When the next
|
||||
character is at or beyond that position, the function updates
|
||||
DISP_POS with the position of the next display string. STRING->s
|
||||
is the C string to iterate, or NULL if iterating over a buffer or a
|
||||
Lisp string; in the latter case, STRING->lstring is the Lisp
|
||||
string. */
|
||||
static inline int
|
||||
bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos,
|
||||
int *disp_prop_p, struct bidi_string_data *string,
|
||||
int *disp_prop, struct bidi_string_data *string,
|
||||
int frame_window_p, EMACS_INT *ch_len, EMACS_INT *nchars)
|
||||
{
|
||||
int ch;
|
||||
@ -933,7 +936,7 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos,
|
||||
{
|
||||
SET_TEXT_POS (pos, charpos, bytepos);
|
||||
*disp_pos = compute_display_string_pos (&pos, string, frame_window_p,
|
||||
disp_prop_p);
|
||||
disp_prop);
|
||||
}
|
||||
|
||||
/* Fetch the character at BYTEPOS. */
|
||||
@ -943,9 +946,9 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos,
|
||||
*ch_len = 1;
|
||||
*nchars = 1;
|
||||
*disp_pos = endpos;
|
||||
*disp_prop_p = 0;
|
||||
*disp_prop = 0;
|
||||
}
|
||||
else if (charpos >= *disp_pos && *disp_prop_p)
|
||||
else if (charpos >= *disp_pos && *disp_prop)
|
||||
{
|
||||
EMACS_INT disp_end_pos;
|
||||
|
||||
@ -953,9 +956,23 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos,
|
||||
property. Hopefully, it will never be needed. */
|
||||
if (charpos > *disp_pos)
|
||||
abort ();
|
||||
/* Return the Unicode Object Replacement Character to represent
|
||||
the entire run of characters covered by the display string. */
|
||||
ch = 0xFFFC;
|
||||
/* Text covered by `display' properties and overlays with
|
||||
display properties or display strings is handled as a single
|
||||
character that represents the entire run of characters
|
||||
covered by the display property. */
|
||||
if (*disp_prop == 2)
|
||||
{
|
||||
/* `(space ...)' display specs are handled as paragraph
|
||||
separators for the purposes of the reordering; see UAX#9
|
||||
section 3 and clause HL1 in section 4.3 there. */
|
||||
ch = 0x2029;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* All other display specs are handled as the Unicode Object
|
||||
Replacement Character. */
|
||||
ch = 0xFFFC;
|
||||
}
|
||||
disp_end_pos = compute_display_string_end (*disp_pos, string);
|
||||
*nchars = disp_end_pos - *disp_pos;
|
||||
if (*nchars <= 0)
|
||||
@ -1013,11 +1030,11 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos,
|
||||
/* If we just entered a run of characters covered by a display
|
||||
string, compute the position of the next display string. */
|
||||
if (charpos + *nchars <= endpos && charpos + *nchars > *disp_pos
|
||||
&& *disp_prop_p)
|
||||
&& *disp_prop)
|
||||
{
|
||||
SET_TEXT_POS (pos, charpos + *nchars, bytepos + *ch_len);
|
||||
*disp_pos = compute_display_string_pos (&pos, string, frame_window_p,
|
||||
disp_prop_p);
|
||||
disp_prop);
|
||||
}
|
||||
|
||||
return ch;
|
||||
@ -1125,7 +1142,7 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p)
|
||||
int ch;
|
||||
EMACS_INT ch_len, nchars;
|
||||
EMACS_INT pos, disp_pos = -1;
|
||||
int disp_prop_p = 0;
|
||||
int disp_prop = 0;
|
||||
bidi_type_t type;
|
||||
const unsigned char *s;
|
||||
|
||||
@ -1173,7 +1190,7 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p)
|
||||
bytepos = pstartbyte;
|
||||
if (!string_p)
|
||||
pos = BYTE_TO_CHAR (bytepos);
|
||||
ch = bidi_fetch_char (bytepos, pos, &disp_pos, &disp_prop_p,
|
||||
ch = bidi_fetch_char (bytepos, pos, &disp_pos, &disp_prop,
|
||||
&bidi_it->string,
|
||||
bidi_it->frame_window_p, &ch_len, &nchars);
|
||||
type = bidi_get_type (ch, NEUTRAL_DIR);
|
||||
@ -1198,7 +1215,7 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p)
|
||||
break;
|
||||
/* Fetch next character and advance to get past it. */
|
||||
ch = bidi_fetch_char (bytepos, pos, &disp_pos,
|
||||
&disp_prop_p, &bidi_it->string,
|
||||
&disp_prop, &bidi_it->string,
|
||||
bidi_it->frame_window_p, &ch_len, &nchars);
|
||||
pos += nchars;
|
||||
bytepos += ch_len;
|
||||
@ -1335,7 +1352,7 @@ bidi_resolve_explicit_1 (struct bidi_it *bidi_it)
|
||||
bidi_it->ch_len = 1;
|
||||
bidi_it->nchars = 1;
|
||||
bidi_it->disp_pos = (string_p ? bidi_it->string.schars : ZV);
|
||||
bidi_it->disp_prop_p = 0;
|
||||
bidi_it->disp_prop = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1343,7 +1360,7 @@ bidi_resolve_explicit_1 (struct bidi_it *bidi_it)
|
||||
display string, treat the entire run of covered characters as
|
||||
a single character u+FFFC. */
|
||||
curchar = bidi_fetch_char (bidi_it->bytepos, bidi_it->charpos,
|
||||
&bidi_it->disp_pos, &bidi_it->disp_prop_p,
|
||||
&bidi_it->disp_pos, &bidi_it->disp_prop,
|
||||
&bidi_it->string, bidi_it->frame_window_p,
|
||||
&bidi_it->ch_len, &bidi_it->nchars);
|
||||
}
|
||||
@ -2078,7 +2095,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
|
||||
struct bidi_string_data bs = bidi_it->string;
|
||||
bidi_type_t chtype;
|
||||
int fwp = bidi_it->frame_window_p;
|
||||
int dpp = bidi_it->disp_prop_p;
|
||||
int dpp = bidi_it->disp_prop;
|
||||
|
||||
if (bidi_it->nchars <= 0)
|
||||
abort ();
|
||||
|
32
src/buffer.c
32
src/buffer.c
@ -1698,27 +1698,16 @@ record_buffer (Lisp_Object buffer)
|
||||
call1 (Vrun_hooks, Qbuffer_list_update_hook);
|
||||
}
|
||||
|
||||
DEFUN ("record-buffer", Frecord_buffer, Srecord_buffer, 1, 1, 0,
|
||||
doc: /* Move BUFFER to the front of the buffer list.
|
||||
Return BUFFER. */)
|
||||
(Lisp_Object buffer)
|
||||
{
|
||||
CHECK_BUFFER (buffer);
|
||||
|
||||
record_buffer (buffer);
|
||||
/* Move BUFFER to the end of the buffer (a)lists. Do nothing if the
|
||||
buffer is killed. For the selected frame's buffer list this moves
|
||||
BUFFER to its end even if it was never shown in that frame. If
|
||||
this happens we have a feature, hence `unrecord-buffer' should be
|
||||
called only when BUFFER was shown in the selected frame. */
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/* Move BUFFER to the end of the buffer (a)lists. Do nothing if the
|
||||
buffer is killed. For the selected frame's buffer list this moves
|
||||
BUFFER to its end even if it was never shown in that frame. If
|
||||
this happens we have a feature, hence `unrecord-buffer' should be
|
||||
called only when BUFFER was shown in the selected frame. */
|
||||
|
||||
DEFUN ("unrecord-buffer", Funrecord_buffer, Sunrecord_buffer, 1, 1, 0,
|
||||
doc: /* Move BUFFER to the end of the buffer list.
|
||||
Return BUFFER. */)
|
||||
DEFUN ("bury-buffer-internal", Fbury_buffer_internal, Sbury_buffer_internal,
|
||||
1, 1, 0,
|
||||
doc: /* Move BUFFER to the end of the buffer list. */)
|
||||
(Lisp_Object buffer)
|
||||
{
|
||||
Lisp_Object aelt, aelt_cons, tem;
|
||||
@ -1746,7 +1735,7 @@ Return BUFFER. */)
|
||||
if (!NILP (Vrun_hooks))
|
||||
call1 (Vrun_hooks, Qbuffer_list_update_hook);
|
||||
|
||||
return buffer;
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
DEFUN ("set-buffer-major-mode", Fset_buffer_major_mode, Sset_buffer_major_mode, 1, 1, 0,
|
||||
@ -6017,8 +6006,7 @@ Functions running this hook are `get-buffer-create',
|
||||
defsubr (&Sother_buffer);
|
||||
defsubr (&Sbuffer_enable_undo);
|
||||
defsubr (&Skill_buffer);
|
||||
defsubr (&Srecord_buffer);
|
||||
defsubr (&Sunrecord_buffer);
|
||||
defsubr (&Sbury_buffer_internal);
|
||||
defsubr (&Sset_buffer_major_mode);
|
||||
defsubr (&Scurrent_buffer);
|
||||
defsubr (&Sset_buffer);
|
||||
|
@ -1861,8 +1861,9 @@ struct bidi_it {
|
||||
bidi_dir_t sor; /* direction of start-of-run in effect */
|
||||
int scan_dir; /* direction of text scan, 1: forw, -1: back */
|
||||
EMACS_INT disp_pos; /* position of display string after ch */
|
||||
int disp_prop_p; /* if non-zero, there really is a
|
||||
`display' property/string at disp_pos */
|
||||
int disp_prop; /* if non-zero, there really is a
|
||||
`display' property/string at disp_pos;
|
||||
if 2, the property is a `space' spec */
|
||||
int stack_idx; /* index of current data on the stack */
|
||||
/* Note: Everything from here on is not copied/saved when the bidi
|
||||
iterator state is saved, pushed, or popped. So only put here
|
||||
|
103
src/xdisp.c
103
src/xdisp.c
@ -3143,11 +3143,15 @@ next_overlay_change (EMACS_INT pos)
|
||||
text property whose value is a string. STRING is data about the
|
||||
string to iterate; if STRING->lstring is nil, we are iterating a
|
||||
buffer. FRAME_WINDOW_P is non-zero when we are displaying a window
|
||||
on a GUI frame. */
|
||||
on a GUI frame. DISP_PROP is set to zero if we searched
|
||||
MAX_DISP_SCAN characters forward without finding any display
|
||||
strings, non-zero otherwise. It is set to 2 if the display string
|
||||
uses any kind of `(space ...)' spec that will produce a stretch of
|
||||
white space in the text area. */
|
||||
EMACS_INT
|
||||
compute_display_string_pos (struct text_pos *position,
|
||||
struct bidi_string_data *string,
|
||||
int frame_window_p, int *disp_prop_p)
|
||||
int frame_window_p, int *disp_prop)
|
||||
{
|
||||
/* OBJECT = nil means current buffer. */
|
||||
Lisp_Object object =
|
||||
@ -3160,8 +3164,9 @@ compute_display_string_pos (struct text_pos *position,
|
||||
EMACS_INT lim =
|
||||
(charpos < eob - MAX_DISP_SCAN) ? charpos + MAX_DISP_SCAN : eob;
|
||||
struct text_pos tpos;
|
||||
int rv = 0;
|
||||
|
||||
*disp_prop_p = 1;
|
||||
*disp_prop = 1;
|
||||
|
||||
if (charpos >= eob
|
||||
/* We don't support display properties whose values are strings
|
||||
@ -3170,7 +3175,7 @@ compute_display_string_pos (struct text_pos *position,
|
||||
/* C strings cannot have display properties. */
|
||||
|| (string->s && !STRINGP (object)))
|
||||
{
|
||||
*disp_prop_p = 0;
|
||||
*disp_prop = 0;
|
||||
return eob;
|
||||
}
|
||||
|
||||
@ -3187,9 +3192,11 @@ compute_display_string_pos (struct text_pos *position,
|
||||
|| !EQ (Fget_char_property (make_number (charpos - 1), Qdisplay,
|
||||
object),
|
||||
spec))
|
||||
&& handle_display_spec (NULL, spec, object, Qnil, &tpos, bufpos,
|
||||
frame_window_p))
|
||||
&& (rv = handle_display_spec (NULL, spec, object, Qnil, &tpos, bufpos,
|
||||
frame_window_p)))
|
||||
{
|
||||
if (rv == 2)
|
||||
*disp_prop = 2;
|
||||
return charpos;
|
||||
}
|
||||
|
||||
@ -3201,7 +3208,7 @@ compute_display_string_pos (struct text_pos *position,
|
||||
CHARPOS (tpos) = XFASTINT (pos);
|
||||
if (CHARPOS (tpos) >= lim)
|
||||
{
|
||||
*disp_prop_p = 0;
|
||||
*disp_prop = 0;
|
||||
break;
|
||||
}
|
||||
if (STRINGP (object))
|
||||
@ -3212,8 +3219,10 @@ compute_display_string_pos (struct text_pos *position,
|
||||
if (!STRINGP (object))
|
||||
bufpos = CHARPOS (tpos);
|
||||
} while (NILP (spec)
|
||||
|| !handle_display_spec (NULL, spec, object, Qnil, &tpos, bufpos,
|
||||
frame_window_p));
|
||||
|| !(rv = handle_display_spec (NULL, spec, object, Qnil, &tpos,
|
||||
bufpos, frame_window_p)));
|
||||
if (rv == 2)
|
||||
*disp_prop = 2;
|
||||
|
||||
return CHARPOS (tpos);
|
||||
}
|
||||
@ -4075,7 +4084,9 @@ handle_display_prop (struct it *it)
|
||||
/* Subroutine of handle_display_prop. Returns non-zero if the display
|
||||
specification in SPEC is a replacing specification, i.e. it would
|
||||
replace the text covered by `display' property with something else,
|
||||
such as an image or a display string.
|
||||
such as an image or a display string. If SPEC includes any kind or
|
||||
`(space ...) specification, the value is 2; this is used by
|
||||
compute_display_string_pos, which see.
|
||||
|
||||
See handle_single_display_spec for documentation of arguments.
|
||||
frame_window_p is non-zero if the window being redisplayed is on a
|
||||
@ -4092,6 +4103,7 @@ handle_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|
||||
EMACS_INT bufpos, int frame_window_p)
|
||||
{
|
||||
int replacing_p = 0;
|
||||
int rv;
|
||||
|
||||
if (CONSP (spec)
|
||||
/* Simple specerties. */
|
||||
@ -4110,11 +4122,11 @@ handle_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|
||||
{
|
||||
for (; CONSP (spec); spec = XCDR (spec))
|
||||
{
|
||||
if (handle_single_display_spec (it, XCAR (spec), object, overlay,
|
||||
position, bufpos, replacing_p,
|
||||
frame_window_p))
|
||||
if ((rv = handle_single_display_spec (it, XCAR (spec), object,
|
||||
overlay, position, bufpos,
|
||||
replacing_p, frame_window_p)))
|
||||
{
|
||||
replacing_p = 1;
|
||||
replacing_p = rv;
|
||||
/* If some text in a string is replaced, `position' no
|
||||
longer points to the position of `object'. */
|
||||
if (!it || STRINGP (object))
|
||||
@ -4126,11 +4138,11 @@ handle_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < ASIZE (spec); ++i)
|
||||
if (handle_single_display_spec (it, AREF (spec, i), object, overlay,
|
||||
position, bufpos, replacing_p,
|
||||
frame_window_p))
|
||||
if ((rv = handle_single_display_spec (it, AREF (spec, i), object,
|
||||
overlay, position, bufpos,
|
||||
replacing_p, frame_window_p)))
|
||||
{
|
||||
replacing_p = 1;
|
||||
replacing_p = rv;
|
||||
/* If some text in a string is replaced, `position' no
|
||||
longer points to the position of `object'. */
|
||||
if (!it || STRINGP (object))
|
||||
@ -4139,9 +4151,10 @@ handle_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (handle_single_display_spec (it, spec, object, overlay,
|
||||
position, bufpos, 0, frame_window_p))
|
||||
replacing_p = 1;
|
||||
if ((rv = handle_single_display_spec (it, spec, object, overlay,
|
||||
position, bufpos, 0,
|
||||
frame_window_p)))
|
||||
replacing_p = rv;
|
||||
}
|
||||
|
||||
return replacing_p;
|
||||
@ -4517,8 +4530,17 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|
||||
|
||||
if (valid_p && !display_replaced_p)
|
||||
{
|
||||
int retval = 1;
|
||||
|
||||
if (!it)
|
||||
return 1;
|
||||
{
|
||||
/* Callers need to know whether the display spec is any kind
|
||||
of `(space ...)' spec that is about to affect text-area
|
||||
display. */
|
||||
if (CONSP (value) && EQ (XCAR (value), Qspace) && NILP (location))
|
||||
retval = 2;
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Save current settings of IT so that we can restore them
|
||||
when we are finished with the glyph property value. */
|
||||
@ -4576,6 +4598,7 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|
||||
it->method = GET_FROM_STRETCH;
|
||||
it->object = value;
|
||||
*position = it->position = start_pos;
|
||||
retval = 1 + (it->area == TEXT_AREA);
|
||||
}
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
else
|
||||
@ -4593,7 +4616,7 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|
||||
}
|
||||
#endif /* HAVE_WINDOW_SYSTEM */
|
||||
|
||||
return 1;
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Invalid property or property not supported. Restore
|
||||
@ -5554,7 +5577,7 @@ forward_to_next_line_start (struct it *it, int *skipped_p,
|
||||
if (it->bidi_it.disp_pos < limit)
|
||||
{
|
||||
it->bidi_it.disp_pos = limit;
|
||||
it->bidi_it.disp_prop_p = 0;
|
||||
it->bidi_it.disp_prop = 0;
|
||||
}
|
||||
do {
|
||||
bprev = it->bidi_it;
|
||||
@ -14568,19 +14591,39 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
|
||||
|
||||
do
|
||||
{
|
||||
int at_zv_p = 0, exact_match_p = 0;
|
||||
|
||||
if (MATRIX_ROW_START_CHARPOS (row) <= PT
|
||||
&& PT <= MATRIX_ROW_END_CHARPOS (row)
|
||||
&& cursor_row_p (row))
|
||||
rv |= set_cursor_from_row (w, row, w->current_matrix,
|
||||
0, 0, 0, 0);
|
||||
/* As soon as we've found the first suitable row
|
||||
whose ends_at_zv_p flag is set, we are done. */
|
||||
if (rv
|
||||
&& MATRIX_ROW (w->current_matrix, w->cursor.vpos)->ends_at_zv_p)
|
||||
/* As soon as we've found the exact match for point,
|
||||
or the first suitable row whose ends_at_zv_p flag
|
||||
is set, we are done. */
|
||||
at_zv_p =
|
||||
MATRIX_ROW (w->current_matrix, w->cursor.vpos)->ends_at_zv_p;
|
||||
if (!at_zv_p)
|
||||
{
|
||||
struct glyph_row *candidate =
|
||||
MATRIX_ROW (w->current_matrix, w->cursor.vpos);
|
||||
struct glyph *g =
|
||||
candidate->glyphs[TEXT_AREA] + w->cursor.hpos;
|
||||
EMACS_INT endpos = MATRIX_ROW_END_CHARPOS (candidate);
|
||||
|
||||
exact_match_p =
|
||||
(BUFFERP (g->object) && g->charpos == PT)
|
||||
|| (INTEGERP (g->object)
|
||||
&& (g->charpos == PT
|
||||
|| (g->charpos == 0 && endpos - 1 == PT)));
|
||||
}
|
||||
if (rv && (at_zv_p || exact_match_p))
|
||||
{
|
||||
rc = CURSOR_MOVEMENT_SUCCESS;
|
||||
break;
|
||||
}
|
||||
if (MATRIX_ROW_BOTTOM_Y (row) == last_y)
|
||||
break;
|
||||
++row;
|
||||
}
|
||||
while (((MATRIX_ROW_CONTINUATION_LINE_P (row)
|
||||
@ -14592,7 +14635,9 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
|
||||
loop before all the candidates were examined, signal
|
||||
to the caller that this method failed. */
|
||||
if (rc != CURSOR_MOVEMENT_SUCCESS
|
||||
&& (!rv || MATRIX_ROW_CONTINUATION_LINE_P (row)))
|
||||
&& !(rv
|
||||
&& !MATRIX_ROW_CONTINUATION_LINE_P (row)
|
||||
&& !row->continued_p))
|
||||
rc = CURSOR_MOVEMENT_MUST_SCROLL;
|
||||
else if (rv)
|
||||
rc = CURSOR_MOVEMENT_SUCCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user