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

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

Интервал:

Закладка:

Сделать

Artist mode says you can't change to another shape while drawing. Exit artist mode and then reenter. Before drawing anything, click the mouse's middle button to display the pop-up menu and select the desired shape from the Drawing menu.

Chapter 8. Markup Language Support

It's true that many of the people who use Emacs are developers, writing code, tweaking it, recompiling it, and just generally enjoying the services of an amazingly extensible work environment. A variety of people, including developers, need to produce text for publication, whether internally, online, or in book format. This chapter describes the markup language support that Emacs offers, a topic relevant to both information publishers and developers, as more and more development work uses variants of the Extensible Markup Language, XML.

Choosing a format for producing documents isn't all that straightforward these days, especially if you eschew Microsoft Word. Some people write HTML, and Emacs offers a few options for this. HTML gives you some control over formatting but displays differently on various browsers. Of course, it is important as the lingua franca of the Web.

Other text publishing options include the TEX family. TEX (pronounced "tek") is a formatter that was developed by Donald Knuth for generating books. LATEX (pronounced "lay-tek") is a set of TEX commands created by Leslie Lamport. With TEX and LATEX , you can produce very precisely formatted text with equations, interesting fonts, graphics, headers and footers, and the like. Whether using filters or features of the program itself, you can publish TEX documents in a variety of formats.

Another option for publishing text—as well as programming—is XML. XML, when combined with a Document Type Definition (DTD) or schema, enables you to write text once and publish it in a variety of formats. Extensible Style Language (XSL) is also important in this regard. Because the standards are still being defined, organizations involved in document production may choose an established XML dialect, such as DocBook, as their publication format. XML at this point provides less precise control over format, but maximizes flexibility.

XML bridges the programming and publishing worlds, and what you do with XML will in part determine what tools you use and what support you need. We discuss a few options for writing XML in Emacs, including psgml mode and Jim Clark's nxml mode, which uses Relax NG schemas rather than DTDs for validation.

Some word processors and other tools integrate formatting and editing. These tools are often called WYSIWYG (what you see is what you get) tools. What's the advantage of using Emacs versus a WYSIWYG tool? Well, whether you're writing LATEX, XML, or HTML, you can be crystal clear about what's in the file and how it's structured if you use Emacs. Save a Microsoft Word file as HTML and then open the resulting file in Emacs. Word bloats the file with additional tags and formatting that is not strictly required. In terms of output, the streamlined and straightforward code you picture in your mind's eye when viewing a page is definitely not what you get, an ironic consequence of using a WYSIWYG tool like Word to create markup files. Chances are, if you've read this far, you're planning to use Emacs anyway, so we won't belabor the point.

In this chapter, we talk about these markup modes:

• For writing HTML, Emacs HTML mode (a subset of SGML mode) and the add-on HTML helper mode are discussed.

• For writing XML, Emacs SGML mode and the add-on modes psgml mode and nxml mode are described in brief.

• For writing LATEX documents, Emacs LaTeX mode is discussed.

These major modes help you insert formatting commands, or markup, into your text. While the amount of help that Emacs offers varies, using the mode designed for your text formatter will streamline your work.

At this point we must insert a caveat. We provide a barebones introduction to the markup modes described in this chapter. What we say here will get you started, but not much more than that. Entire books could be and have been written about using each of the markup tools described here. Now that that's out of the way, let's talk about a few features that are important in all the modes: comment handling and font-lock mode.

8.1 Comments

All the modes described in this chapter share a feature with the programming language modes such as Java mode and Lisp mode, which we discuss in Chapter 9. All these modes understand comments and use a single command, M-;(for indent-for-comment) to insert the appropriate comment syntax. Table 8-1lists the comment syntax for the tools in this chapter.

Table 8-1. Comments in markup modes

If you type M-; in: Emacs inserts:
HTML mode
HTML helper mode
SGML mode
nxml mode
psgml mode
LaTeX mode %% (on blank lines)
% (on lines with content)

8.2 Font-Lock Mode

Font-lock mode is discussed primarily in Chapter 9; it's designed for coloring code to make it easier to read. But the fact is that it works well in other modes too, like the Buffer List ( Chapter 4), Dired ( Chapter 5 Chapter 5. Emacs as a Work Environment Many of the everyday things you do from a command prompt can be done from within Emacs. You can execute commands, work with directories, and print files—all without leaving Emacs. Changing tasks is as simple as jumping between buffers. What's important about this? Of course, it's nice to be able to move between tasks easily. What's even more important is that you have the same editing environment no matter what you're doing: you can use all of the Emacs editing commands to work on a file, give shell commands, then start up Dired, the directory editor, to do some file maintenance. It is simple to move text from one window to another. You can execute a command and then use Emacs commands to cut and paste the results into a file. If you're trying to compile a program and keep getting error messages, you can save the interactive session as a file and confer with someone about the problem. Despite the many advantages of modern window systems, Emacs often provides the best way to integrate the many kinds of work you do daily. Much of the information in this chapter involves integration between Emacs and the operating system. Emacs is most commonly a Unix editor, so forgive us for a bias in that direction. But we are happy to report that for users of GNU Emacs on other platforms, integration with the operating system is still available; you can use shell mode to run commands and can edit directories with Dired. There's no reason to leave Emacs no matter what your platform is. ), and in all the markup modes described in this chapter.

To turn on font lock mode, choose Syntax Highlighting from the Options menu. If you decide you want to turn it on for every session, select Save Options from the Options menu and Emacs writes your .emacs file.

For more details on font-lock mode, see Chapter 9.

8.3 Writing HTML

Without doubt, the most commonly used markup language today is hypertext markup language (HTML), used for creating web pages. HTML consists of text with tags that define characteristics about the text. HTML is not hard to write, and you could use Emacs or any other editor to write the tags and the text. An HTML tag generally looks like this:

text being tagged

For your convenience, several modes are available for writing HTML in Emacs, including HTML mode, HTML helper mode, html menus, and a variety of SGML [42]tools including sgml mode and psgml mode. Of these tools, we've chosen to describe HTML mode, a variant of sgml mode, which is included in GNU Emacs, and HTML helper mode, which is a popular add-on. If you are writing XHTML, a stricter version of HTML that can be validated, you should consider XHTML mode, described briefly in this section, or psgml mode, covered later in the XML section of this chapter.

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

Интервал:

Закладка:

Сделать

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

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


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

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

x