Debra Cameron - Learning GNU Emacs, 3rd Edition

Здесь есть возможность читать онлайн «Debra Cameron - Learning GNU Emacs, 3rd Edition» весь текст электронной книги совершенно бесплатно (целиком полную версию без сокращений). В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Год выпуска: 2004, ISBN: 2004, Издательство: O'Reilly Media, Жанр: Программы, Программирование, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Learning GNU Emacs, 3rd Edition: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Learning GNU Emacs, 3rd Edition»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

GNU Emacs is the most popular and widespread of the Emacs family of editors. It is also the most powerful and flexible. Unlike all other text editors, GNU Emacs is a complete working environment—you can stay within Emacs all day without leaving.
, 3rd Edition tells readers how to get started with the GNU Emacs editor. It is a thorough guide that will also "grow" with you: as you become more proficient, this book will help you learn how to use Emacs more effectively. It takes you from basic Emacs usage (simple text editing) to moderately complicated customization and programming.The third edition of
describes Emacs 21.3 from the ground up, including new user interface features such as an icon-based toolbar and an interactive interface to Emacs customization. A new chapter details how to install and run Emacs on Mac OS X, Windows, and Linux, including tips for using Emacs effectively on those platforms.
, third edition, covers:
• How to edit files with Emacs
• Using the operating system shell through Emacs
• How to use multiple buffers, windows, and frames
• Customizing Emacs interactively and through startup files
• Writing macros to circumvent repetitious tasks
• Emacs as a programming environment for Java, C++, and Perl, among others
• Using Emacs as an integrated development environment (IDE)
• Integrating Emacs with CVS, Subversion and other change control systems for projects with multiple developers
• Writing HTML, XHTML, and XML with Emacs
• The basics of Emacs Lisp
The book is aimed at new Emacs users, whether or not they are programmers. Also useful for readers switching from other Emacs implementations to GNU Emacs.

Learning GNU Emacs, 3rd Edition — читать онлайн бесплатно полную книгу (весь текст) целиком

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Learning GNU Emacs, 3rd Edition», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Thirty deletions by default is a nice size—far more generous than most programs offer. But you can enlarge or reduce the size of the kill ring if you wish, using a variable called kill-ring-max. To experiment, give the command: M-x set-variable Enter kill-ring-max Enter new-value Enter(where new-value is a number).

2.3.3 Selecting and Pasting

Using the menus, you can access text from the kill ring in a more straightforward way: by choosing Edit → Select and Paste. A menu showing deletions appears, with the most recent ones on top. To show you as many deletions as possible, each line in the window represents a separate deletion. So if you've killed a large region, say 500 lines, you see only the beginning of the first line of that deletion, ellipses, and the end of the deletion. Your selection is pasted into the buffer at the cursor position.

Table 2-5summarizes commands for working with regions.

Table 2-5. Commands for working with regions

Keystrokes Command name Action
C-@or C- Space set-mark-command Mark the beginning (or end) of a region.
C-x C-x exchange-point-and-mark Exchange location of cursor and mark.
C-w kill-region Delete the region.
C-y yank Paste most recently killed or copied text.
M-w kill-ring-save Copy the region (so it can be pasted with C-y).
M-h mark-paragraph Mark paragraph.
C-x C-p mark-page Mark page.
C-x h mark-whole-buffer Mark buffer.
M-y yank-pop After C-y, pastes earlier deletion.

2.4 Emacs and the Clipboard

Emacs 21 plays well with the clipboard, though it still may not do what you want it to in some cases. Let's dig into this in a little more detail.

2.4.1 Placing Text on the Clipboard

By default, text that you cut or copy using icons on the toolbar or options on the Edit menu is placed on the clipboard and is accessible to other applications.

Unfortunately, Emacs diverges by platform on this issue. Normally we save platform-specific issues for Chapter 13, but cutting and pasting is such a vital operation that we must describe the differences here.

On Windows and Mac OS X (but not on Linux) any text you cut or copy using C-wor M-wis also copied to the clipboard.

On Windows and Mac OS X, simply selecting text with the mouse places it on the clipboard. (This doesn't work on Linux.). Most applications require you to highlight text, then issue a copy command. Emacs doesn't. Table 2-6shows how this works on various platforms.

Table 2-6. Selecting text with the mouse

Linux Windows Mac OS X graphical Mac OS X terminal
Sends to clipboard? no yes yes no [13]
Sends to kill ring? yes yes yes no

To send text to the clipboard on Linux, select it with the mouse (or mark it as a region), then click on the cut or copy toolbar icon or menu option. You can also use the clipboard-specific commands listed in Table 2-7on any platform.

2.4.2 Retrieving Text from the Clipboard

As we mentioned, in other applications, you typically cut and paste by selecting text, then issuing a copy command. How do you then paste that text into Emacs?

Not surprisingly, the paste icon on the toolbar and the associated option on the Edit menu do this in most cases (see Table 2-7; Emacs on Mac OS X disables both the icon and the option inappropriately; the associated command name clipboard-yankworks, however). C-yinserts text from the clipboard too. Additionally, an easy mouse gesture works on most platforms: simply click the middle mouse button or mouse wheel in the Emacs window to paste from the clipboard. The caveat here is that you must have a mouse with a middle button.

Table 2-7. Pasting from the clipboard

Linux Windows Mac OS X graphical Mac OS X terminal
C-ypastes? yes yes yes no [14]
Toolbar paste icon pastes? yes yes no no
Edit → Paste option pastes? yes yes no no
Middle mouse button pastes? yes yes yes no
M-x clipboard-yankpastes? yes yes yes no

Another issue with cutting and pasting is encoding. Encoding is a complex topic in Emacs; full Unicode support is slated for Emacs 22. At this point, we can only point you to a variable that may help you resolve cut-and-paste related encoding issues: set-clipboard-coding-system.

If you're interested in the clipboard, you may want to change Emacs' keys for cutting and pasting to the more universal C-x, C-c, and C-v. See "Making Emacs Work the Way You Want" later in this chapter for more details.

Table 2-8summarizes clipboard-related commands.

Table 2-8. Clipboard commands

Keystrokes Command name Action
(none) clipboard-kill-region Cut region and place both in kill ring and on system clipboard.
(none) clipboard-yank Paste text from clipboard.
(none) clipboard-kill-ring-save Copy text to clipboard.

2.5 Editing Tricks and Shortcuts

Now that you've learned the basics of editing—moving the cursor to the right position, deleting, copying, and moving text—you can learn some tricks that make editing easier.

2.5.1 Fixing Transpositions

The most common typo involves the transposition of two letters, and most typos are noticed immediately after you make them. Pressing C-ttransposes two letters, to put them in the right order:

Before C-t After C-t
the best of tims e, it the best of times_ it

To transpose two letters, put the cursor on the second of the two letters to be transposed. Press C-t. (If you often transpose letters, word abbreviation mode, discussed in Chapter 3 Chapter 3. Search and Replace The commands we discussed in the first two chapters are enough to get you started, but they're certainly not enough to do any serious editing. If you're using Emacs for anything longer than a few paragraphs, you'll want the support this chapter describes. In this chapter, we cover the various ways that Emacs lets you search for and replace text. Emacs provides the traditional search and replace facilities you would expect in any editor; it also provides several important variants, including incremental searches, regular expression searches, and query-replace. We also cover spell-checking here, because it is a type of replacement (errors are sought and replaced with corrections). Finally, we cover word abbreviation mode; this feature is a type of automatic replacement that can be a real timesaver. , cleans up typos automatically.)

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Learning GNU Emacs, 3rd Edition»

Представляем Вашему вниманию похожие книги на «Learning GNU Emacs, 3rd Edition» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Learning GNU Emacs, 3rd Edition»

Обсуждение, отзывы о книге «Learning GNU Emacs, 3rd Edition» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x