Выбрать главу

The FSF was created precisely to distribute programs under terms that encourage you to share, rather than hoard, software. The GPL is designed to prevent an unfortunately common practice—namely, a company taking public domain code, making a few modifications and bug fixes, and then copyrighting the modified version. Once a company does this, the program has essentially become private property and disappears from the public domain. Stallman formed the foundation because he finds this practice abhorrent. As he explains in the GNU Manifesto, "I cannot in good conscience sign a nondisclosure agreement or a software license agreement . . . So that I can continue to use computers without dishonor, I have decided to put together a sufficient body of free software so that I will be able to get along without any software that is not free." Elsewhere in the manifesto, Stallman calls sharing software the "fundamental act of friendship among programmers." Their software is free because it can be shared and will always be shareable—without restriction. FSF software is not under restrictive copyright laws, which Stallman objects to in principle. In fact, he coined the term copyleft to describe the FSF's sharable software base.[3]

Since GNU Emacs was first released, many other pieces of the GNU operating environment have fallen into place: C and C++ compilers (gcc and g++), a very powerful debugger (gdb), substitutes for lex and yacc (called flex and bison, respectively), a Unix shell (bash, which stands for "Bourne-Again Shell"), the Gimp (a graphics tool comparable to Adobe PhotoShop), GNOME (a desktop environment for Linux), and many other programs and libraries. Many important open source projects that originally used variants of the GPL or other licensing schemes have adopted the GPL as their license, including Python, Mozilla, and Zope. Author David Wheeler argues that all open source projects should release their software under a GPL-compatible license[4] (see http://www.dwheeler.com/essays/gpl-compatible.html for his views and some statistics about GPL'd software). With Linux, GNU tools, and other GPL'd software, it's possible to have a complete operating environment consistent with the values set forth by the FSF.

An Approach to Learning Emacs

This book is designed to get you started with Emacs as quickly as possible, whether you are an experienced computer user or a novice. The first two chapters give you the basics you need to know, and the rest of the book builds on these basics. After the first two chapters, you don't have to read the rest consecutively; you can skip to the topics that interest you. Additionally, the book is designed to give you just the level of hand-holding you want; you can either read the book in detail or skim it, looking for tables of commands and examples.

Here are some reading paths you could take:

If Read
You are a casual user Preface, Chapter 1-Chapter 3, Chapter 14
You are a programmer or system administrator Preface, Chapter 1-Chapter 5, Chapter 9-Chapter 12
You are a writer or production person Preface, Chapter 1-Chapter 3, Chapter 7, Chapter 8, Chapter 14
You want to customize Emacs Chapter 10 and possibly Chapter 11
You write HTML or XML Preface, Chapter 1-Chapter 3, Chapter 8
You want to use operating system commands in Emacs Chapter 5
You use Emacs on Windows or Mac OS X Chapter 13

These reading paths are offered only as a guideline. Emacs is one gigantic, functionally rich editor. We've divided it up into digestible bites for you, so you don't have to be put off by its size and scope. The best way to learn Emacs is incrementally; learn a little now, then learn more features as you get curious about them. If you need to do something and don't know how to do it in Emacs, Emacs probably already does it; if it doesn't, you can learn how to write a Lisp function to add it to Emacs (see Chapter 11 for details). The online help system is an excellent place to learn about new features on the fly; online help is discussed in Chapter 1 and in more detail in Chapter 14.

Here's a list of some features you might want to learn about on a rainy day:

• How to use multiple Emacs buffers, windows, and frames (Chapter 4)

• Word abbreviation mode (Chapter 3)

• Macros (Chapter 6)

• How to map function keys to Emacs commands (Chapter 10)

• How to issue (and edit) shell commands (Chapter 5)

• How to organize files in Emacs (Chapter 5)

• Using ediff to compare files (Chapter 12)

Here's a quick summary of what's in each chapter:

Chapter 1, Emacs Basics, tells you how to start Emacs and how to work with files. It also provides a quick introduction to the online help system.

Chapter 2, Editing, explains commands for moving around, copying and pasting text, and undoing changes. It also introduces very basic customization.

Chapter 3, Search and Replace, covers more editing features, including search and replace, word abbreviation mode, and spell checking.

Chapter 4, Using Buffers, Windows, and Frames, describes how to use multiple buffers and windows, both Emacs-style windows (that divide a single OS window) and traditional OS windows (which Emacs refers to as frames). It also discusses how to bookmark your place in large files.

Chapter 5, Emacs as a Work Environment, talks about issuing commands from within Emacs, working with files and directories, and using basic time management tools such as the calendar and diary.

вернуться

3

FSF programs such as Emacs are often distributed with commercial systems. Even in these cases, the General Public License guarantees your right to use and give away their programs without restriction. Of course, the license does not apply to other proprietary software with which GNU tools have been shipped.

вернуться

4

GPL-compatible is a critical distinction for many organizations. As our reviewer Mike Trent points out, many organizations release their software under a modified GPL because the GPL's license is actually "viral." That is, if one line of GPL'd code appears in a project, the entire project must be GPL'd. This means corporations interested in protecting their assets but still wanting to share code with the open source community cannot use the GPL without some modification.