mirror of
git://slackware.nl/current.git
synced 2024-12-29 10:25:00 +01:00
137 lines
4.4 KiB
HTML
137 lines
4.4 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta name="generator" content="HTML Tidy, see www.w3.org" />
|
||
|
<title>Saving Files</title>
|
||
|
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" />
|
||
|
<link rel="HOME" title="Slackware Linux Essentials" href="index.html" />
|
||
|
<link rel="UP" title="Emacs" href="emacs.html" />
|
||
|
<link rel="PREVIOUS" title="Basic Editing" href="emacs-basic-editing.html" />
|
||
|
<link rel="NEXT" title="Slackware Package Management" href="package-management.html" />
|
||
|
<link rel="STYLESHEET" type="text/css" href="docbook.css" />
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||
|
</head>
|
||
|
<body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"
|
||
|
alink="#0000FF">
|
||
|
<div class="NAVHEADER">
|
||
|
<table summary="Header navigation table" width="100%" border="0" cellpadding="0"
|
||
|
cellspacing="0">
|
||
|
<tr>
|
||
|
<th colspan="3" align="center">Slackware Linux Essentials</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td width="10%" align="left" valign="bottom"><a href="emacs-basic-editing.html"
|
||
|
accesskey="P">Prev</a></td>
|
||
|
<td width="80%" align="center" valign="bottom">Chapter 17 Emacs</td>
|
||
|
<td width="10%" align="right" valign="bottom"><a href="package-management.html"
|
||
|
accesskey="N">Next</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<hr align="LEFT" width="100%" />
|
||
|
</div>
|
||
|
|
||
|
<div class="SECT1">
|
||
|
<h1 class="SECT1"><a id="EMACS-SAVING-FILES" name="EMACS-SAVING-FILES">17.5 Saving
|
||
|
Files</a></h1>
|
||
|
|
||
|
<p>In order to save a file, you type</p>
|
||
|
|
||
|
<table border="0" bgcolor="#E0E0E0" width="100%">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="SCREEN">
|
||
|
<kbd class="USERINPUT">C-x C-s</kbd>
|
||
|
</pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<p>Emacs will not ask you for a filename, the buffer will just be saved to the file it
|
||
|
was loaded from. If you want to save your text to another file, type</p>
|
||
|
|
||
|
<table border="0" bgcolor="#E0E0E0" width="100%">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="SCREEN">
|
||
|
<kbd class="USERINPUT">C-x C-w</kbd>
|
||
|
</pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<p>When you save the file for the first time in this session, Emacs will normally save
|
||
|
the old version of your file to a backup file, which has the same name appended with a
|
||
|
tilde: so if you're editing a file “<tt class="FILENAME">cars.txt</tt>”,
|
||
|
Emacs will create a backup “<tt class="FILENAME">cars.txt~</tt>”.</p>
|
||
|
|
||
|
<p>This backup file is a copy of the file that you opened. While you are working, Emacs
|
||
|
will also regularly create an auto-save copy of the work you are doing, to a file named
|
||
|
with hash signs: <tt class="FILENAME">#cars.txt#</tt>. This backup is deleted when you
|
||
|
save the file with C-x C-s.</p>
|
||
|
|
||
|
<p>When you are done editing a file, you can kill the buffer that holds it by typing</p>
|
||
|
|
||
|
<table border="0" bgcolor="#E0E0E0" width="100%">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="SCREEN">
|
||
|
<kbd class="USERINPUT">C-x k</kbd>
|
||
|
</pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<p>Emacs will then ask you which buffer you want to kill, with the current buffer as
|
||
|
default, which you can select by hitting <b class="KEYCAP">ENTER</b>. If you haven't
|
||
|
saved your file yet, Emacs will ask you if you really want to kill the buffer.</p>
|
||
|
|
||
|
<div class="SECT2">
|
||
|
<h2 class="SECT2"><a id="EMACS-QUITING" name="EMACS-QUITING">17.5.1 Quitting
|
||
|
Emacs</a></h2>
|
||
|
|
||
|
<p>When you are done with Emacs altogether, you can type</p>
|
||
|
|
||
|
<table border="0" bgcolor="#E0E0E0" width="100%">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="SCREEN">
|
||
|
<kbd class="USERINPUT">C-x C-c</kbd>
|
||
|
</pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<p>This quits Emacs. If you have any unsaved files, Emacs will tell you so, and ask if
|
||
|
you want to save them each in turn. If you answer no to any of these, Emacs will ask for
|
||
|
one final confirmation and then quit.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="NAVFOOTER">
|
||
|
<hr align="LEFT" width="100%" />
|
||
|
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0"
|
||
|
cellspacing="0">
|
||
|
<tr>
|
||
|
<td width="33%" align="left" valign="top"><a href="emacs-basic-editing.html"
|
||
|
accesskey="P">Prev</a></td>
|
||
|
<td width="34%" align="center" valign="top"><a href="index.html"
|
||
|
accesskey="H">Home</a></td>
|
||
|
<td width="33%" align="right" valign="top"><a href="package-management.html"
|
||
|
accesskey="N">Next</a></td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td width="33%" align="left" valign="top">Basic Editing</td>
|
||
|
<td width="34%" align="center" valign="top"><a href="emacs.html"
|
||
|
accesskey="U">Up</a></td>
|
||
|
<td width="33%" align="right" valign="top">Slackware Package Management</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|
||
|
|