Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Editing Hard Linked Files in Emacs



David Kramer wrote:
> jbk wrote:
>> jbk wrote:
>>> How do you maintain the hardlink when saving with emacs? 
>>> Version control? VI won't do.
>>>
>> Well I guess you all are stumped or to busy with the new toys.
> 
> Well, I didn't get much help either, but I'm assuming it's the holidays.
> 
>> My work around is to edit the original and save as another then:
>>
>> cat <saveAs> > <originalFile>
>>
>> this works for now.
> 
> I didn't answer because I don't understand the problem.  Are you talking
> about files that are the same inodes, as created by "ln" without the the
> "-s" option?  How could emacs (or any program) possibly change the
> contents of one without changing the contents of the other, since they
> point to the same spot on the disk?
> 
> Can you explain the problem in greater detail?
> 

Yes, I want to change one to change them all.

In emacs the default is to save the original as
<original.~>. So the original remains hard linked to the
others. I've looked at all the save options in the emacs
info files and tried a number without getting a solution
that worked. There are a number of network scripts in etc
that are hard linked. I didn't realize this until I tried to
correct a problem and discovered that my edits were not
being recognized because the other remaining hard linked
files were not changed also.
In VI you can do it. My work around is sufficient for now.

Jim KR







BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org