Replacing a (sym-) link by its target

"David A. Cobb" <[email protected]>
Newsgroups gmane.emacs.xemacs.design
Message-ID <[email protected]>
I've been using lndir with some success during make's -- leaving the 
source tree alone and read-only, building in the link tree. 

When it comes time to change something, it seems the best way to do it 
is make the working copy in the build tree.
If I just read the link, I get the original file -- but I also try to 
replace the (read-only) original file. 

The sequence of operations otta be something like
(if (and (visited-file-is-a-link) (target-is-read-only))
    ((rename-the-link) ;; to get it out of the way
    (write-the-buffer)
    (delete-the-renamed-link))
    ; otherwise
    (write-the-buffer))

Comment?

This seems useful enough, it may exist already.  Is there such a 
function implemented.

-- 
David A. Cobb, Software Engineer, Public Access Advocate
"By God's Grace, I am a Christian man; by my actions a great sinner." -- The Way of a Pilgrim: R.French, Tr.
Life is too short to tolerate crappy software!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.