Path: utzoo!attcan!uunet!cs.utexas.edu!usc!ucsd!ucbvax!zurich.ai.mit.edu!markf From: markf@zurich.ai.mit.edu Newsgroups: comp.soft-sys.andrew Subject: Re: Ez of symbolically linked files. Message-ID: <9006281834.AA10268@zurich.ai.mit.edu> Date: 28 Jun 90 18:34:17 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: markf@zurich.ai.mit.edu Organization: The Internet Lines: 46 >> From: Adam Stoller >> To: Info-Andrew >> Subject: Re: Ez of symbolically linked files. >> In-Reply-To: <9006251438.AA01624@zurich.ai.mit.edu> >> References: <9006251438.AA01624@zurich.ai.mit.edu> >> >> EZ currently offers the feature of being able to warn you about saving >> [Save As] a file with a name that is already in use and [Save] about >> possibly overwriting changes which occured underneath your editing >> session. >> >> It seems to me a similar device (lstat?) could be used to determine if >> the file which is about to be written is actually a symbolic (or hard??) >> link and warn you of that as well. >> >> I haven't looked at the code that does the former (nor am I volunteering >> to do the latter) - but I can't imagine it would be that hard? >> (probably the hardest thing is to figure out how to word the question >> that needs to be answered) >> >> --fish For my emacs write-file-hook I have a mechanism like the following: if file is a symbolic link then ask "Symbolic link. Overwrite ? " if the answer is yes then overwrite the file that the link points to. else ask "Remove symbolic link and create %s? " if the answer is yes then remove the link and create the file . endif endif endif Note that two "no" answers allows you to totally back out of the write. Mark Friedman MIT Artificial Intelligence Lab 545 Technology Sq. Cambridge, Ma. 02139 markf@zurich.ai.mit.edu ------- End of Unsent Draft