Article View: gnu.emacs.bug
Article #99433Re: Bug in write-file
From: Joseph Wells
Date: Fri, 07 Sep 1990 03:28
Date: Fri, 07 Sep 1990 03:28
32 lines
1873 bytes
1873 bytes
worley@compass.com (Dale Worley) writes: Summary: Write-file produces a strange error message when given a file name in a nonexistant directory. jbw@bucsf.bu.edu (Joe Wells) writes: Ok, here's a fix in diff format. [my patch deleted] David Lawrence (tale) pointed out that default-directory is not guaranteed to be the same as (file-name-directory buffer-file-name). Thus, the fix I posted wasn't guaranteed to work properly in all cases. I'm including a correct fix. -- Joe Wells <jbw@bu.edu> ---------------------------------------------------------------------- *** /usr14/gnu/dist-18.55/lisp/files.el Tue Aug 15 22:31:12 1989 --- files.el Thu Sep 6 23:26:45 1990 *************** *** 660,663 **** --- 660,666 ---- default-directory (file-name-directory buffer-file-name)) (auto-save-mode auto-save-default))) + (if (not (file-directory-p (file-name-directory buffer-file-name))) + (error "Directory %s doesn't exist!" + (file-name-directory buffer-file-name))) (if (not (file-writable-p buffer-file-name)) (if (yes-or-no-p
Technical Details
Message-ID:
<JBW.90Sep6232828@bucsf.bu.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!usc!zaphod.mps.ohio-state.edu!rpi!bu.edu!nntp-read!jbwReferences:
<9008281450.AA14068@sn1987a.compass.com> <JBW.90Sep3191854@bucsf.bu.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,91fdca4f1c10ca46 X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-09-07 13:31:39 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!usc!zaphod.mps.ohio-state.edu!rpi!bu.edu!nntp-read!jbw From: jbw@bucsf.bu.edu (Joseph Wells) Newsgroups: gnu.emacs.bug Subject: Re: Bug in write-file Message-ID: <JBW.90Sep6232828@bucsf.bu.edu> Date: 7 Sep 90 03:28:28 GMT References: <9008281450.AA14068@sn1987a.compass.com> <JBW.90Sep3191854@bucsf.bu.edu> Sender: news@bu.edu.bu.edu Distribution: gnu Organization: Boston University Computer Science Department Lines: 32 Posted: Fri Sep 7 04:28:28 1990 In-reply-to: jbw@bucsf.bu.edu's message of 3 Sep 90 23:18:54 GMT