Academic Tutorials

English | French | Portugese | German | Italian
Home Advertise Payments Recommended Websites Interview Questions FAQs
News Source Codes E-Books Downloads Jobs Web Hosting

Emacs Tutorial
Emacs Getting In and Out
Emacs Minibuffer
Emacs Using Vi
Emacs Features
Emacs Polyglot
Emacs Help for the Translator
Emacs Bookmarks and Registers

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
Apple Script
PL/SQL Tutorial
SQL Server
.NET (dotnet)
.Net Mobile
C# : C Sharp
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Assembly Language
Forth Programming
Lisp Programming
Data Warehousing
CGI Programming
Emacs Tutorial
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Operating System
Software Testing
SAP Module
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft Front Page
Microsoft InfoPath
Microsoft Access
Financial Accounting
Managerial Accounting
Network Sites

Getting In and Out of Emacs

Previoushome Next

To start emacs, just type


To temporarily suspend emacs, type C-x C-z.1. To revive it, just type fg, or better yet, %emacs (fg would only revive the most recently suspended or ``backgrounded'' job, which might not be emacs).

To exit emacs just type C-x C-c.

Emacs is so useful that most people start up an emacs session as soon as they log on to the machine, even though they may not need it right away. They just want to have it ready when the need arises.2

If you find yourself in a jam while in emacs, say by having typed the wrong thing, you can kill the current command by typing C-g.3 Remember this command!


In a typical emacs session, you will be editing several ``files'' at once. Some of these will be real files, while others will be temporary files4 which are created as the result of emacs commands.

For example, suppose I wish to edit the file WC.c. I type C-x C-f to load the file, and then type WC.c. The screen will then look like this:

/* introductory C program */

/* implements (a subset of) the Unix wc command  --  reports character,
   word and line counts; in this version, the "file" is read from the
   standard input, since we have not covered C file manipulation yet,
   but of course a real file can be read by using the Unix `<' redirection
   feature */

#define MaxLine 200

char Line[MaxLine];  /* one line from the file */

int NChars = 0,  /* total number of characters in the file */
    NWords = 0,  /* total number of words in the file */

This looks just like regular vi, except for the bottom line, in which emacs gives some general information, like the time of day. (Again, the bottom line is in reverse video on the screen, but that doesn't show up here.)

Suppose this is my first emacs command. Then WC.c will be my first buffer. Now suppose I type

M-x calendar

in order to use emacs's built-in calendar facility.5 The screen would now look like this:

/* introductory C program */

/* implements (a subset of) the Unix wc command  --  reports character,
   word and line counts; in this version, the "file" is read from the
   standard input, since we have not covered C file manipulation yet,
   but of course a real file can be read by using the Unix `<' redirection
   feature */

        November 1992            December 1992            January 1993
      S  M Tu  W Th  F  S      S  M Tu  W Th  F  S      S  M Tu  W Th  F  S
      1  2  3  4  5  6  7            1  2  3  4  5                     1  2
      8  9 10 11 12 13 14      6  7  8  9 10 11 12      3  4  5  6  7  8  9
     15 16 17 18 19 20 21     13 14 15 16 17 18 19     10 11 12 13 14 15 16
     22 23 24 25 26 27 28     20 21 22 23 24 25 26     17 18 19 20 21 22 23
     29 30                    27 28 29 30 31           24 25 26 27 28 29 30
C-x <      Calendar    ? help/o other/c current     Sun, Dec 6, 1992       C-x >
Loading calendar.elc...done

What has happened is that emacs has created a new buffer, for the calendar, and displayed it along with my first buffer (for WC.c). The two buffers are delineated on the screen by reverse-video lines at the bottom edge of each buffer (which I have shown as long strings of asterisks here).

The calendar buffer is now a temporary file. I can edit it, e.g. delete November, and if I desire to do so, save it to a permanent file.

Here are some commands dealing with buffers:

C-x o    if two buffers appear together on the screen, move the cursor
         to the other buffer
C-x 1    if two buffers appear together on the screen, expand the one
         current containing the cursor to make that buffer fill the screen
C-x b    display another buffer which is not currently displayed; emacs 
         is usually able to guess which buffer you want, and will ask you 
         to confirm that its guess is right; otherwise, specify the buffer 
         name yourself
C-x C-b  list all buffers (note: this list itself will be a new buffer!)
C-x C-f  read in a file and create a new buffer for it
C-x C-r  read in a file and create a new buffer for it, but make the
         buffer read-only (so that the file will not accidentally get
C-x k    kill buffer; emacs will ask you to confirm that you mean
         the one currently containing the cursor; otherwise, specify 
         which one

Again, remember that any buffer is a temporary file, and thus all editing commands apply. For example, suppose I type C-x C-b to get a list of all buffers. Again, this will create a new buffer, and suppose the list is so long that it doesn't fit in one screen. Then I can use the usual editor scrolling commands (for vi, C-f and C-b) to browse through the buffer.

Getting In and Out of Emacs, and Out of Trouble

Be the first one to comment on this page.

  Emacs Tutorial eBooks

No eBooks on Emacs could be found as of now.

 Emacs Tutorial FAQs
More Links » »
 Emacs Tutorial Interview Questions
More Links » »
 Emacs Tutorial Articles

No Emacs Articles could be found as of now.

 Emacs Tutorial News

No News on Emacs could be found as of now.

 Emacs Tutorial Jobs

No Emacs Articles could be found as of now.

Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

Previoushome Next

Keywords: Getting In and Out of Emacs, Emacs, Emacs, Emacs tutorial, Emacs tutorial pdf, history of Emacs, Custamizing Style Sheet, learn Emacs

HTML Quizzes
CSS Quiz
CSS 1.0 Quiz
CSS 2.0 Quiz
XML Quizzes
XML Quiz
XSL Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizzes
JavaScript Quiz
VBScript Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizzes
ASP Quiz
SQL Quiz
ADO Quiz
CVS Quiz
Python Quiz
Apple Script Quiz
SQL Server Quiz
PHP Quiz
.NET (dotnet) Quizzes
Microsoft.Net Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
VC++ Quiz
Multimedia Quizzes
SVG Quiz
Flash Quiz
Media Quiz
Photoshop Quiz
Gimp Quiz
Matlab Quiz
Gnuplot Programming Quiz
GIF Animation Quiz
Scientific Visualization Quiz
Graphics Quiz
Web Building Quizzes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Weblogic Quiz
SEO Quiz
Web Site Hosting Quiz
Domain Name Quiz
Java Quizzes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Eclipse Quiz
J2ME Quiz
Programming Langauges Quizzes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Cobol Quiz
Assembly Language Quiz
Mainframe Quiz
Forth Programming Quiz
Lisp Programming Quiz
Pascal Quiz
Delphi Quiz
Fortran Quiz
OOPs Quiz
Data Warehousing Quiz
CGI Programming Quiz
Emacs Quiz
Gnome Quiz
ILU Quiz
Soft Skills Quizzes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz
Database Quizzes
Oracle Quiz
MySQL Quiz
Operating System Quizzes
BSD Quiz
Symbian Quiz
Unix Quiz
Internet Quiz
IP-Masquerading Quiz
IPC Quiz
Software Testing Quizzes
Testing Quiz
Firewalls Quiz
SAP Module Quizzes
ERP Quiz
Business Warehousing Quiz
SAP Basis Quiz
Material Management Quiz
Sales & Distribution Quiz
Human Resource Quiz
Netweaver Quiz
Customer Relationship Management Quiz
Production and Planning Quiz
Networking Programming Quizzes
Corba Quiz
Networking Quiz
Microsoft Office Quizzes
Microsoft Word Quiz
Microsoft Outlook Quiz
Microsoft PowerPoint Quiz
Microsoft Publisher Quiz
Microsoft Excel Quiz
Microsoft Front Page Quiz
Microsoft InfoPath Quiz
Microsoft Access Quiz
Accounting Quizzes
Financial Accounting Quiz
Managerial Accounting Quiz
Testimonials | Contact Us | Link to Us | Site Map
Copyright ? 2008. Academic All rights reserved Privacy Policies | About Us
Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Interview Questions | Discussions World | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Indian Free Ads | Jobs Assist | New Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Webhosting in India | Dedicated Server in India | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Testing Interview Questions | Tests World | The Galz | Top Masala | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World | Important Websites
Copyright ? 2003-2023 Vyom Technosoft Pvt. Ltd., All Rights Reserved.