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», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

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

Интервал:

Закладка:

Сделать

Html helper mode is not part of Emacs by default. You can download it from its homepage at http://www.nongnu.org/baol-hth . Download the file into a directory such as ~/elisp , move to that directory, and then type:

% tar xvzf html-helper-mode.tar.gz

The system unpacks the tar file for you. (Of course, if you are installing on Windows, you can simply use WinZip to decompress and unpack the file.) The tar file contains several components, including:

html-helper-mode.el— the Lisp file for HTML helper mode

hhm-changelog— changes that have been made

hhm-config.el— a Lisp file that allows Emacs customization to work [47]

8.3.2.1 Starting HTML helper mode

Before you can start HTML helper mode, you have to load it into Emacs. (For a complete discussion of this topic, see "Building Your Own Lisp Library" in Chapter 11; we describe it briefly here.) Begin by typing M-x load-file Enter. Emacs asks which file to load and you enter ~/elisp/html-helper-mode.eland press Enter, adjusting the path to reflect the location where you installed html-helper-mode.el . You enter the mode by typing M-x html-helper-mode Enter. HTML helperappears on the mode line.

Making HTML helper mode part of your startup is easier. Put the following lines in your .emacs file:

(setq load-path (cons "~/elisp " load-path))

(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)

In the first line, insert the complete path for the directory in which html-helper-mode.el is located in quotation marks, replacing ~/elisp to the correct value for your system. The second line tells Emacs to load HTML helper mode automatically when you start Emacs.

If you want to use HTML helper mode for editing HTML files by default, add this line to .emacs as well:

(setq auto-mode-alist (cons '("\\.html?$" . html-helper-mode) auto-mode-alist))

If you edit other types of files with HTML helper mode, you may want to add lines to include all the types of files you edit. Adding more lines is the easiest way. For example, to make HTML helper mode the default for PHP files, add this line to .emacs :

(setq auto-mode-alist (cons '("\\.php$" . html-helper-mode) auto-mode-alist))

8.3.2.2 A brief tour of HTML helper mode

The main reason people like HTML helper mode is that it provides easy menu access to a wide variety of options. Realizing that having a crowded menu with many submenus could overwhelm new users, the authors created an option called Turn on Novice Menu. Selecting this option from the HTML menu provides a barebones menu, as shown in Figure 8-1. Novice HTML writers can use these options to create a basic HTML document without worrying about what forms, JSPs, PHP, and the like mean.

Figure 8-1. HTML helper mode's Novice menu (Mac OS X)

Selecting Turn on Expert Menu from the HTML menu returns the larger menu with its numerous submenus, as shown in Figure 8-2.

Figure 8-2. HTML helper mode's Expert menu (Mac OS X)

8.3.2.3 Inserting an HTML template

HTML helper mode inserts a template for you every time you create a new HTML file.

Type: C-x C-f new.html

HTML helper mode inserts a template with all the basic elements needed for a - фото 163

HTML helper mode inserts a template with all the basic elements needed for a valid HTML document (Windows).

The template contains all the basic HTML elements. The entire document is surrounded by

tags. Then the head and the body are separated. Following an
tag that tells the browser to insert a horizontal line, called a horizontal rule, the tag leaves a place for the author to put in his or her email address. In these days of spam, it's unlikely you'll want to do that. (You can leave the tag blank or delete it.)

If you do want to include an email address, enter a line like this in your .emacs file (substituting your own email address, of course):

(setq html-helper-address-string

"Charles Dickens")

Type: C-x C-f newfile.html

Emacs inserts the HTML template including the address Normally you begin - фото 164

Emacs inserts the HTML template, including the address.

Normally you begin filling out the template by entering title and a level-one header (these are often the same). You can then begin writing paragraphs of text. Before you start typing, press M-Enter. Emacs inserts

and positions the cursor between them. You can see from the ending paragraph tag that HTML helper mode is working toward XHTML compliance.

Type: M-Enter

Emacs positions the cursor between and so you can start insert text 8324 - фото 165

Emacs positions the cursor between

and

so you can start insert text.

8.3.2.4 Putting tags around a region

When editing HTML files, you often spend a lot of time marking up existing text. If you preface any of the tag commands with C-u, Emacs inserts the tags around a region rather than putting them at the cursor position. [48]To demonstrate, we'll start a new HTML file and insert text from our dickens file.

Type: C-x C-f ataleoftwocities.html

Emacs inserts the HTML template Move the cursor past the pair and type Cx Ci - фото 166

Emacs inserts the HTML template.

Move the cursor past the

pair and type C-x C-i dickens.

Emacs inserts the dickens text file to which we can add HTML tags If you were - фото 167

Emacs inserts the dickens text file, to which we can add HTML tags.

If you were really doing this properly, you'd type something like "A Tale of Two Cities, Chapter 1 Chapter 1. Emacs Basics Some of you out there are probably dying to get your hands on the keyboard and start typing. We won't try to stop you; turn to the section called "Starting Emacs" and you can go ahead. But do read the beginning of this chapter later when you're ready for a break. Emacs is much easier to learn if you understand some of the basic concepts involved, which we discuss in the following introduction. as the title and the first-level header. But for now, you just want to see how to mark up a region of existing text. Begin by marking the Dickens paragraph as a region and type C-u M-Enter.

Type: M-h C-u M-Enter.

Emacs inserts opening and closing paragraph tags 8325 Using completion - фото 168

Emacs inserts opening and closing paragraph tags.

8.3.2.5 Using completion

HTML helper mode supports completion. You type the beginning of a tag and press M-Tab(for tempo-complete-tag). [49]If there's more than one possibility, a window of possible completions appears. Let's say you are working on a bulleted list.

Type:

Emacs inserts the tags to begin and end the list and the tag for one list item - фото 169

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

Интервал:

Закладка:

Сделать

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

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


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

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

x