man > emacs.emacs(1)

📖 NAME

emacs — GNU project Emacs editor

🚀 Quick Reference

Use CaseCommandDescription
Edit a fileemacs fileOpen file in Emacs
Start without init fileemacs -qSkip loading ~/.emacs
Start as daemon (server)emacs --daemonRun Emacs server in background
Open at line numberemacs +25 fileGo to line 25 on startup
Evaluate Lisp expressionemacs --eval '(message "hi")'Run arbitrary Lisp at startup
Batch mode (scripting)emacs --batch -l script.el -f some-functionNon-interactive script execution
Run in terminal (no GUI)emacs -nwForce text-only display
Custom fontemacs -fn "DejaVu Sans Mono"Set fixed-width font for GUI

📋 SYNOPSIS

emacs [ command-line switches ] [ files ... ]

📝 DESCRIPTION

GNU Emacs is a version of Emacs, written by the author of the original (PDP-10) Emacs, Richard Stallman. The user functionality of GNU Emacs encompasses everything other editors do, and it is easily extensible since its editing commands are written in Lisp.

The primary documentation of GNU Emacs is in the GNU Emacs Manual, which you can read using Info, either from Emacs or as a standalone program. Please look there for complete and up-to-date documentation. This man page is updated only when someone volunteers to do so.

Emacs has an extensive interactive help facility, but the facility assumes that you know how to manipulate Emacs windows and buffers. CTRL-h or F1 enters the Help facility. Help Tutorial (CTRL-h t) starts an interactive tutorial to quickly teach beginners the fundamentals of Emacs. Help Apropos (CTRL-h a) helps you find a command with a name matching a given pattern, Help Key (CTRL-h k) describes a given key sequence, and Help Function (CTRL-h f) describes a given Lisp function.

GNU Emacs's many special packages handle mail reading (RMail) and sending (Mail), outline editing (Outline), compiling (Compile), running subshells within Emacs windows (Shell), running a Lisp read-eval-print loop (Lisp-Interaction-Mode), automated psychotherapy (Doctor), and much more.

🔧 Emacs Options

The following options are of general interest:

The following options are Lisp-oriented (these options are processed in the order encountered):

The following options are useful when running Emacs as a batch editor:

đŸ–Ĩī¸ Using Emacs with X

Emacs has been tailored to work well with the X window system. If you run Emacs from under X windows, it will create its own X window to display in. You will probably want to start the editor as a background process so that you can continue using your original window.

Emacs can be started with the following X switches:

You can set X default values for your Emacs windows in your .Xresources file (see xrdb(1)). Use the following format:

emacs.keyword:value

where value specifies the default value of keyword. Emacs lets you set default values for the following keywords:

📚 MANUALS

You can order printed copies of the GNU Emacs Manual from the Free Software Foundation, which develops GNU software. See the online store at https://shop.fsf.org/. Your local administrator might also have copies available. As with all software and publications from FSF, everyone is permitted to make and distribute copies of the Emacs manual. The Texinfo source to the manual is also included in the Emacs source distribution.

📁 FILES

/usr/local/share/info
— files for the Info documentation browser. The complete text of the Emacs reference manual is included in a convenient tree structured form. Also includes the Emacs Lisp Reference Manual, useful to anyone wishing to write programs in the Emacs Lisp extension language, and the Introduction to Programming in Emacs Lisp.
/usr/local/share/emacs/$VERSION/lisp
— Lisp source files and compiled files that define most editing commands. Some are preloaded; others are autoloaded from this directory when used.
/usr/local/libexec/emacs/$VERSION/$ARCH
— various programs that are used with GNU Emacs.
/usr/local/share/emacs/$VERSION/etc
— various files of information.
/usr/local/share/emacs/$VERSION/etc/DOC.*
— contains the documentation strings for the Lisp primitives and preloaded Lisp functions of GNU Emacs. They are stored here to reduce the size of Emacs proper.

🐛 BUGS

There is a mailing list, bug-gnu-emacs@gnu.org, for reporting Emacs bugs and fixes. But before reporting something as a bug, please try to be sure that it really is a bug, not a misunderstanding or a deliberate feature. We ask you to read the section "Reporting Bugs" in the Emacs manual for hints on how and when to report bugs. Also, include the version number of the Emacs you are running in every bug report that you send in. Bugs tend actually to be fixed if they can be isolated, so it is in your interest to report them in such a way that they can be easily reproduced.

Do not expect a personal answer to a bug report. The purpose of reporting bugs is to get them fixed for everyone in the next release, if possible. For personal assistance, consult the service directory at https://www.fsf.org/resources/service/ for a list of people who offer it.

Please do not send anything but bug reports to this mailing list. For other Emacs lists, see https://savannah.gnu.org/mail/?group=emacs.

🔓 UNRESTRICTIONS

Emacs is free; anyone may redistribute copies of Emacs to anyone under the terms stated in the GNU General Public License, a copy of which accompanies each copy of Emacs and which also appears in the reference manual.

Copies of Emacs may sometimes be received packaged with distributions of Unix systems, but it is never included in the scope of any license covering those systems. Such inclusion violates the terms on which distribution is permitted. In fact, the primary purpose of the GNU General Public License is to prohibit anyone from attaching any other restrictions to redistribution of Emacs.

Richard Stallman encourages you to improve and extend Emacs, and urges that you contribute your extensions to the GNU library. Eventually GNU (Gnu's Not Unix) will be a complete replacement for Unix. Everyone will be free to use, copy, study and change the GNU system.

đŸ‘ī¸ SEE ALSO

emacsclient(1), etags(1), X(7), xlsfonts(1), xterm(1), xrdb(1)

âœī¸ AUTHORS

Emacs was written by Richard Stallman and the Free Software Foundation. For detailed credits and acknowledgments, see the GNU Emacs manual.

ÂŠī¸ COPYING

Copyright 1995, 1999-2020 Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this document into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.

emacs.emacs(1)
📖 NAME 🚀 Quick Reference 📋 SYNOPSIS 📝 DESCRIPTION
🔧 Emacs Options đŸ–Ĩī¸ Using Emacs with X
📚 MANUALS 📁 FILES 🐛 BUGS 🔓 UNRESTRICTIONS đŸ‘ī¸ SEE ALSO âœī¸ AUTHORS ÂŠī¸ COPYING

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-04 09:35 @216.73.217.103
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^