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

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

Интервал:

Закладка:

Сделать

Emacs offers several commands for printing buffers and regions. To print a buffer with page numbers and headers for the filename, type M-x print-buffer Enter. This command sends the buffer to pr(a program that does simple formatting for listings), followed by lpr(which sends the listing to the printer). If you want to print the file directly, without the headers and page numbers that prprovides, give the command M-x lpr-buffer Enter. You can also use these commands to print a selected portion of a file. First define a region by setting a mark at one end and moving the cursor to the other end. Then give the command M-x print-region Enter(or M-x lpr-region Enter).

The lpr-bufferand lpr-regioncommands always check the variable lpr-switchesto determine whether any options should be passed to the Unix lprcommand. These options are used to request a particular printer and for many other purposes; see the manpage for lprfor more information. For example, if you want to use the printer named lpt1 whenever you print from Emacs, you would want to set lpr-switchesto -Plpt1. To do so, add the following line to your .emacs file:

(setq lpr-switches '("-Plpt1"))

Note the single quote preceding, and the parentheses surrounding, the string " -Plpt1". This is just weird-but-necessary Lisp syntax; see Chapter 11for more details.

You can also print from Dired. To print the file the cursor is on, type P. Emacs puts the default printing command in the minibuffer, and you can modify it.

Emacs also includes commands to print a buffer as a PostScript file. If you have formatted text in the file, you can print the buffer with those attributes by typing M-x ps-print-buffer-with-faces.

Table 5-3provides a summary of commands for printing.

Table 5-3. Printing commands

Keystrokes Action
M-x print-buffer FilePrint Buffer Print the buffer (similar to Unix pr | lpr).
M-x print-region FilePrint Region Print the region (similar to Unix pr | lpr).
M-x lpr-buffer Print buffer with no page numbers (similar to Unix lpr).
M-x lpr-region Print region with no page numbers (similar to Unix lpr).
P OperatePrint From Dired, put the default print command in the minibuffer; you can change it or press Enterto execute it.
M-x ps-print-buffer-with-faces FilePostscript Print Buffer Print the buffer with text attributes.
M-x ps-print-region-with-faces FilePostscript Print Region Print the region with text attributes.

5.4 Reading Manpages in Emacs

You can read Unix online documentation (called manpages ) from within Emacs by typing M-x manor by selecting Manfrom the Helpmenu. [30]This command creates a buffer with a formatted manpage in it, which you can scroll through (or copy from) using Emacs commands. Simply type: M-x man Enter Unix-command-name Enter.

For the Unix command name, you can use either a simple name, like ls, or a manpage section name like ttytab(5).

The advantage of using the mancommand is that you can scroll through the manpage easier than you can in some terminal applications or shell windows. Also, if you try to view manpages in shell mode, they may come out garbled if the settings aren't right, whereas mangives you clean text.

5.5 Using Time Management Tools

Emacs is a natural place to organize all your work. It won't replace your Palm or other handheld, but ongoing work in this area may help you sync your favorite device with your Emacs-based schedule. Here we cover the main features that Emacs itself offers—the calendar and the diary.

5.5.1 Displaying the Calendar

To display the calendar, type M-x calendar. Emacs displays a calendar window with three months: last month, this month, and next month.

Type: M-x calendar

Emacs puts the cursor on todays date and displays the date on the mode line - фото 94

Emacs puts the cursor on today's date and displays the date on the mode line. There's no room to write on the calendar; that's what the diary is for, which we'll discuss shortly.

By default, weeks start on Sunday. If you'd like them to start on Monday instead, type M-x set-variable calendar-week-start Enter 1 Enter. You enter the calendar again to have this take effect. If you'd like to have the calendar always start on Monday, add this line to your .emacs file:

(setq calendar-week-start-day 1)

If you'd like to see the calendar each time you start Emacs, you can add this line to your .emacs file:

(calendar)

5.5.1.1 Moving in the calendar

When you're in the calendar, Emacs sensibly moves by day rather than by character. C-fmoves you to the next day; C-bmoves you to the previous day. C-nmoves you to the same day of the next week; C-pmoves you back a week. The arrow keys work the same way. M-}and M-{move forward and backward by month, and C-x [and C-x ]move forward and backward by year. C-vscrolls forward by three months; M-vscrolls back three months.

The movement commands just discussed move you relative to the cursor position. If you're on Tuesday and you press C-n, you'll move to next Tuesday. If you're on January 25 and press M-}you'll move to February 25. If you're on August 15, 2004 and press C-x [, you'll move to August 15, 2003.

Other commands move to the beginning or the end of the week, month, or year. C-aand C-emove to the beginning and end of the week, M-amoves to the beginning of the month, and M-<moves to the beginning of the year. Table 5-4summarizes these calendar movement commands.

To go to a particular date, press g d. Emacs asks for the year, then the month, and then the day. Emacs moves you to the day selected (this command is well-suited for answering that all-important question, "On what day of the week does my birthday fall in 2020?").

Table 5-4. Calendar movement commands

Keystrokes Command name Action
(none) ToolsDisplay Calendar calendar Display the calendar.
. GotoToday calendar-goto-today Move to today's date.
C-f calendar-forward-day Move forward a day.
C-b calendar-backward-day Move backward a day.
C-n calendar-forward-week Move forward a week.
C-p calendar-backward-week Move backward a week.
M-} calendar-forward-month Move forward one month.
M-{ calendar-backward-month Move backward a month.
C-x ] ScrollForward 1 Year calendar-forward-year Move forward a year.
C-x [ ScrollBackward 1 Year calendar-backward-year Move backward a year.
C-a GotoBeginning of Week calendar-beginning-of-week Move to the beginning of the week.
C-e GotoEnd of Week calendar-end-of-week Move to the end of the week.
M-a GotoBeginning of Month calendar-beginning-of-month Move to the beginning of the month.
M-e GotoEnd of Month calendar-end-of-month Move to the end of the month.
M-< GotoBeginning of Year calendar-beginning-of-year Move to the beginning of the year.
M-> GotoEnd of Year calendar-end-of-year Move to the end of the year.
g d GotoOther Date calendar-goto-date Go to the specified date.
o calendar-other-month Put the specified month in the middle of the display.
C-x < ScrollForward 1 Month scroll-calendar-left Scroll forward one month.
C-x > ScrollBackward 1 Month scroll-calendar-right Scroll backward one month.
C-v ScrollForward 3 Months scroll-calendar-left-three-months Scroll forward three months.
M-v ScrollForward 3 Months scroll-calendar-right-three-months Scroll backward three months.
Space scroll-other-window Scroll another window.

5.5.1.2 Displaying holidays

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

Интервал:

Закладка:

Сделать

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

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


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

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

x