Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!j.cc.purdue.edu!nwd From: nwd@j.cc.purdue.edu (Daniel Lawrence) Newsgroups: comp.emacs Subject: Re: MicroEmacs is dangerous!! Summary: uEMACS 3.9 Keywords: File naming and write protect. Reading Manuals. Message-ID: <8883@j.cc.purdue.edu> Date: 3 Feb 89 13:50:26 GMT References: <1028@sdcc15.ucsd.edu> Reply-To: nwd@j.cc.purdue.edu (Daniel Lawrence) Distribution: usa Organization: Purdue University Lines: 66 In article <1028@sdcc15.ucsd.edu> pa1343@sdcc15.ucsd.edu (pa1343) writes: >Beware! Emacs 3.9 is dangerous. If you don't name a file it can't >save it until a name is given. Perhaps reading the manual would help here. First off if you would have stated your edit session by typing: emacs Then uEMACS would have supplied you with a named buffer and had been ready to write your file out. Second, the command ^X-^W (wriite-file) would have prompted you for a file name. >Worse yet, in mess-dos if a disk is write >protected, the program can't write to it and bombs with Abort, Retry, Just >Give it up. First, intercepting the DOS critical error handler is generally not done with MSDOS programs and can cause some very serious problems if anything goes wrong. Second, MSDOS 3.0 and above has another option on this prompt, (F)ail. If you type this, MSDOS will return a failure on the open and EMACS will report "[Can not write file]" on the command line. > These bugs need to be fixed. Suggestion: if file does >not have a name, ASK for one. Second, check for write protect in mess- >dos and for permission in UNIX and allow alternate save paths. > Write protect problems in MSDOS? Did you consider pulling out the disk, unwrite-protecting it, re-inserting it and hitting "R" for retry? Under UNIX MicroEMACS does check for protections and will return proper error messeges for that. Also, as always, macroes can be used to do anything you care to like this: 23 store-macro !if &seq $cfname "" set $cfname @"File name to save to: " !endif save-file !endm bind-to-key execute-macro-23 ^X^S bind-to-key execute-macro-23 FND (or bind-to-key execute-macro-23 FN0 under the new 3.10 bindings) >-- >+------------------------------------------------------------------------------+ >| John J. Marco -- pa1343@sdcc15.ucsd.edu | >|uunet!altnet!vsi1!ubvax!ames!pasteur!helios.ee.lbl.gov!nosc!ucsd!sdcc15!pa1343| >+------------------------------------------------------------------------------+ I am unhappy that someone would post a note to usenet decrying the dangers of a program of which they have probably not opened the manual to. Any tool or program can be mis-used if you do not attempt to learn how to use it. If the place you recieved MicroEMACS from did not supply a manual, tell me and I will mail you one. Daniel Lawrence (317) 742-5153 nwd@j.cc.purdue.edu The Programmer's Room Fido 1:201/10 (317) 742-5533