From owner-freebsd-questions Sun Dec 14 12:22:56 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA06857 for questions-outgoing; Sun, 14 Dec 1997 12:22:56 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from kstreet.interlog.com (root@kstreet.interlog.com [198.53.146.171]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA06847 for ; Sun, 14 Dec 1997 12:22:49 -0800 (PST) (envelope-from kws@kstreet.interlog.com) Received: (from kws@localhost) by kstreet.interlog.com (8.8.7/8.8.8) id OAA29389; Sun, 14 Dec 1997 14:55:07 -0500 (EST) (envelope-from kws) Date: Sun, 14 Dec 1997 14:55:07 -0500 (EST) Message-Id: <199712141955.OAA29389@kstreet.interlog.com> From: Kevin Street MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: freebsd-questions@freebsd.org Cc: cao@bus.net Subject: Re: editing linked files w/emacs In-Reply-To: <85lnxp5mr2.fsf@localhost.zilker.net> References: <85lnxp5mr2.fsf@localhost.zilker.net> X-Mailer: VM 6.31 under 20.2 XEmacs Lucid Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Dave Marquardt writes: >"Chuck O'Donnell" writes: >> While using emacs to edit to a file with more than one hard link, and >> saving with save-buffer (C-x C-s), emacs saves the newly edited buffer to >> a new disk file, leaving the remaining links to refer to the original file >> which is now out of date. >> >> To keep all link references current, I have to delete other links and >> relink the file each time I make an edit. I must be doing something wrong >> here. > >You might have better luck asking on one of the Emacs newsgroups >(comp.emacs, gnu.emacs, etc.). I *believe* there is some sort of >Emacs Lisp variable you can set to cause Emacs to not move the old >version of the file `foo' to `foo~' and then write the modified file >to `foo'. It's probably in the Emacs INFO stuff somewhere. There are 3 variables you want to look at. From the Emacs info file about backup: The choice of renaming or copying is controlled by three variables. Renaming is the default choice. If the variable `backup-by-copying' is non-`nil', copying is used. Otherwise, if the variable `backup-by-copying-when-linked' is non-`nil', then copying is used for files that have multiple names, but renaming may still used when the file being edited has only one name. If the variable `backup-by-copying-when-mismatch' is non-`nil', then copying is used if renaming would cause the file's owner or group to change. -- Kevin