From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: dkcombs@panix.com (David Combs) Newsgroups: gmane.emacs.help Subject: symlinks and auto-detecting 2-bufs hold *same* ifile-num? Date: 27 Aug 2003 23:57:32 -0400 Organization: PANIX -- Public Access Networks Corp. Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1062043885 16051 80.91.224.253 (28 Aug 2003 04:11:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 28 Aug 2003 04:11:25 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 28 06:11:23 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19sE83-0004DC-00 for ; Thu, 28 Aug 2003 06:11:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19sE6z-0000Gr-34 for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Aug 2003 00:10:17 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!panix!panix1.panix.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-NNTP-Posting-Host: panix1.panix.com Original-X-Trace: reader2.panix.com 1062043052 28269 166.84.1.1 (28 Aug 2003 03:57:32 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Thu, 28 Aug 2003 03:57:32 +0000 (UTC) Original-Xref: shelby.stanford.edu gnu.emacs.help:116192 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12111 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12111 I've got lots of symlinks, some being shortcut-ways to name certain directories. Before very long, it turns out that I've managed to end up with several (differently-named) buffers that are accessing the *same* file (ie, ls -li shows the same ifile-num). Only problem is that *emacs* isn't aware of this -- or if it is, it sure hasn't told (warned) me either at the creation of the dup-like buffer, nor later. Surely I can't be the first to have this problem! Of course, it's a really dangerous situation, because it's all too easy to modify one of them, and then inadvertently make some other modification to the other one -- with the final result on the disk depending on the order in which eg save-some-buffers hits them. (In no case will the result be what you want, with *both* sets of changes being in effect) There *has* to be some mode or something that makes emacs automatically check ifile-numbers and then ask: "are you *really* sure you want to do this *dangerous* thing?" (Likewise, when about to write a modified-buffer to disk, to automatically do the same check,with similar question if another differently-named buffer points to the same ifile-num.) Thanks! David