File: 2.html

package info (click to toggle)
lg-issue52 2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,532 kB
  • ctags: 60
  • sloc: sh: 97; perl: 96; makefile: 34
file content (236 lines) | stat: -rw-r--r-- 9,176 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.3C.j">
<TITLE>The Answer Guy 52: When "Quit Confirm" Dialogs are NOT Enough...</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
	LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<H4>"The Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
	<img src="../../gx/dennis/qbubble.gif" alt="(?)" 
		border="0" align="middle">
	<font color="#B03060">The Answer Guy</font>
	<img src="../../gx/dennis/bbubble.gif" alt="(!)" 
		border="0" align="middle">
</A></H1> 
<BR>
<H4>By James T. Dennis,
	<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
	LinuxCare,
	<A HREF="http://www.linuxcare.com/">http://www.linuxcare.com/</A> 
</H4>
</center>

<p><hr><p>
<!--  endcut ======================================================= -->
<!-- begin 2 -->
<H3 align="left"><img src="../../gx/dennis/bbubble.gif" 
	height="50" width="60" alt="(!) " border="0"
	>When "Quit Confirm" Dialogs are NOT Enough...</H3>


<p><strong>From Bryan Henderson on Tue, 21 Mar 2000  
</strong></p>
<!-- ::
When "Quit Confirm" Dialogs are NOT Enough...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:: -->
<P><STRONG>
In the moral to your sad tale of discarding the article you just
wrote, you advise emacs users to use autosave.  Actually, emacs users
have better protection available, by default.  The normal quit command
always prompts you if you have changes you haven't saved.  Even the
command for discarding changes prompts you.  There may be a command to
discard changes and exit without prompting, but I doubt anyone would
have it installed on a key.
</STRONG></P>
<P><STRONG>
Autosave is nice for protection against system failures.  But I don't
like it precisely because it takes away my ability to change my mind
and throw away my edits, and in the event of a system failure, it can
be hard to pick up from where the last autosave randomly happened.  I
prefer just to hit 'save' every time I reach a reasonable commit
point.  It's an easy habit to forge.
</STRONG></P>
<P><STRONG>
Now if I could just find a way to keep from rm'ing a file moments
after I spent an hour creating it...  I've done that a few times.
</STRONG></P>
<P><STRONG>
--
Bryan Henderson
</STRONG></P>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
Ahhh... but you miss my whole point.  I did NOT "quit" out of
xemacs.  I (accidentally) issued a '<tt>screen</tt>' command to send a
SIGQUIT (die now with a core dump!) signal to all of its
processes.
</BLOCKQUOTE>
<BLOCKQUOTE>
xemacs never had a chance to confirm (or refute) my wishes in the
matter.
</BLOCKQUOTE>
<BLOCKQUOTE>
As for having the choice to revert to earlier versions, I've used
the emacs "version-control" option for years.  It creates backup
files of the form foo.~X~ (where X is a number).  I occasionally
run a skulker to find old *.~*~ files, look them over and
pass them onto to an "<tt>xargs rm</tt>" command.  You can set that using
</BLOCKQUOTE>

<blockquote><pre>(setq version-control 't)
</pre></blockquote>
<BLOCKQUOTE>
In your <tt>init.elc</tt> (or <tt>.emacs</tt>) file.  (I use a common emacs
method of having a simple <tt>.emacs</tt> file like:
</BLOCKQUOTE>

<blockquote><pre>(load (expand-file-name "~/.elisp/init.elc"))
</pre></blockquote>
<BLOCKQUOTE>
and I maintain a <tt>~/.elisp/init.el</tt> file, which I byte-compile
into a <tt>.elc</tt> when I change it.  That's an old trick.
</BLOCKQUOTE>
<BLOCKQUOTE>
Anyway,  I've now added:
</BLOCKQUOTE>

<blockquote><pre>(setq auto-save-default 't)
(setq auto-save-timeout 600)
(setq auto-save-interval 500)
</pre></blockquote>
<BLOCKQUOTE>
... which sets the auto-save flag to on, saves if I leave my
keyboard for ten minutes (actually depends on buffer size, but I
tend not to spend too much time editing 200K and larger buffers)
and sets the editor to save every 500 keystrokes (which is about
every quarter page.
</BLOCKQUOTE>
<BLOCKQUOTE>
That should keep me out of too much trouble.
</BLOCKQUOTE>

<!-- sig -->


<!-- end 2 -->
<!--              . . . . . . . . . . . . . . . . . . .              -->
<HR WIDTH="40%" ALIGN="center">
<!-- begin 2 -->
<H3 align="left"><img src="../../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>March Linux Gazette blurb</H3>


<p><strong>Answered by Bryan Henderson on Tue, 21 Mar 2000  
</strong></p>
<P><STRONG>
Ahhh... but you miss my whole point.  I did NOT "quit" out of
xemacs.  I (accidentally) issued a '<tt>screen</tt>' command
</STRONG></P>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
Yeah, I did.  I didn't (and still don't) know what '<tt>screen</tt>' is.
Thanks for the info.
</BLOCKQUOTE>

<em><p>[ <tt>screen</tt> is an application designed to allow you to have 
	multiple screens available when you're logged into one console.  
	When I use an ssh session, it allows me to maintain much the same 
	habits as I normally do on virtual consoles, by switching amid the 
	several possible screens.
</p><p>Jim's favorite use for it is the keyboard driven cut and paste buffer.
	It also can be used to maintain state while you leave one terminal
	(say, your desktop) and return from another one (say, across an ssh
	link from your other office).
</p><p>-- Heather ] </p></em>

<BLOCKQUOTE>
And I am also grateful for the tip on running a compiled init file.  I've
been struggling recently with whether to use an old Emacs or a new one,
considering that the new one is painfully slow, especially to start up.
compiling the init file could make a noticeable difference.
</BLOCKQUOTE>
<BLOCKQUOTE>
--
Bryan Henderson
</BLOCKQUOTE>

<!-- end 2 -->
<!--startcut ======================================================= -->
<P> <hr> <P>
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
	>Copyright &copy;</a> 2000, James T. Dennis 
<BR>Published in <I>The Linux Gazette</I> Issue 52 April 2000</H5>
<H6 ALIGN="center">HTML transformation  by
	<A HREF="mailto:star@tuxtops.com">Heather Stern</a> of
	Tuxtops, Inc.,
	<A HREF="http://www.tuxtops.com/">http://www.tuxtops.com/</A> 
</H6>
<P> <hr> <P>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<TABLE WIDTH="95%"><TR VALIGN="center" ALIGN="center">
<TD colspan="2" rowspan="2"><A 
	HREF="../lg_answer52.html"
	><IMG SRC="../../gx/dennis/answernew.gif"
              ALT="[ Answer Guy Current Index ]"></A>
<TD colspan="2" rowspan="2"><A 
	HREF="../../tag/kb.html"
	><IMG SRC="../../gx/dennis/answertoc.gif"
              ALT="[ Index of Past Answers ]"></A></td>
  <TD WIDTH="11%"><A HREF="../lg_answer52.html#greeting"><img
	src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A></TD>
  <TD WIDTH="11%"><A HREF="1.html">1</A></TD>
  <TD WIDTH="11%"><A HREF="2.html">2</A></TD>
  <TD WIDTH="11%"><A HREF="3.html">3</A></TD>
  <TD WIDTH="11%"><A HREF="4.html">4</A></TD>
</TR><TR VALIGN="center" ALIGN="center">
  <TD WIDTH="11%"><A HREF="5.html">5</A></TD>
  <TD WIDTH="11%"><A HREF="6.html">6</A></TD>
  <TD WIDTH="11%"><A HREF="7.html">7</A></TD>
  <TD WIDTH="11%"><A HREF="8.html">8</A></TD>
  <TD WIDTH="11%"><A HREF="9.html">9</A></TD>
</TR><TR VALIGN="center" ALIGN="center">
  <TD WIDTH="10%"><A HREF="10.html">10</A></TD>
  <TD WIDTH="10%"><A HREF="11.html">11</A></TD>
  <TD WIDTH="10%"><A HREF="12.html">12</A></TD>
  <TD WIDTH="10%"><A HREF="13.html">13</A></TD>
  <TD WIDTH="11%"><A HREF="14.html">14</A></TD>
  <TD WIDTH="11%"><A HREF="15.html">15</A></TD>
  <TD WIDTH="11%"><A HREF="16.html">16</A></TD>
  <TD WIDTH="11%"><A HREF="17.html">17</A></TD>
</TR><TR VALIGN="center" ALIGN="center">
  <TD WIDTH="10%"><A HREF="18.html">18</A></TD>
  <TD WIDTH="10%"><A HREF="19.html">19</A></TD>
  <TD WIDTH="10%"><A HREF="20.html">20</A></TD>
  <TD WIDTH="10%"><A HREF="21.html">21</A></TD>
  <TD WIDTH="11%"><A HREF="22.html">22</A></TD>
  <TD WIDTH="11%"><A HREF="23.html">23</A></TD>
  <TD WIDTH="11%"><A HREF="24.html">24</A></TD>
</TR></TABLE>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<P> <hr> <P>
<!-- begin lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<A HREF="../index.html"
	><IMG SRC="../../gx/indexnew.gif" ALT="[ Table Of Contents ]"></A>
<A HREF="../../index.html"
	><IMG SRC="../../gx/homenew.gif" ALT="[ Front Page ]"></A>
<A HREF="../lg_bytes52.html"
	><IMG SRC="../../gx/back2.gif" ALT="[ Previous Section ]"></A>
<A HREF="../../faq/index.html"
	><IMG SRC="../../gx/dennis/faq.gif"
              ALT="[ Linux Gazette FAQ ]"></A>
<A HREF="../lg_tips52.html"
	><IMG SRC="../../gx/fwd.gif" ALT="[ Next Section ]"></A>
<!-- end lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
</BODY></HTML>
<!--endcut ========================================================= -->