unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* symlinks and auto-detecting 2-bufs hold *same* ifile-num?
@ 2003-08-28  3:57 David Combs
  2003-08-28 18:23 ` Kevin Rodgers
  0 siblings, 1 reply; 3+ messages in thread
From: David Combs @ 2003-08-28  3:57 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: symlinks and auto-detecting 2-bufs hold *same* ifile-num?
  2003-08-28  3:57 symlinks and auto-detecting 2-bufs hold *same* ifile-num? David Combs
@ 2003-08-28 18:23 ` Kevin Rodgers
  2003-08-30  2:46   ` David Combs
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Rodgers @ 2003-08-28 18:23 UTC (permalink / raw)


David Combs wrote:

> 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.

See the "File Name Aliases" node of the Emacs manual.  You

need to set either find-file-existing-other-name or
find-file-visit-truename to t.

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: symlinks and auto-detecting 2-bufs hold *same* ifile-num?
  2003-08-28 18:23 ` Kevin Rodgers
@ 2003-08-30  2:46   ` David Combs
  0 siblings, 0 replies; 3+ messages in thread
From: David Combs @ 2003-08-30  2:46 UTC (permalink / raw)


In article <3F4E488B.7050309@yahoo.com>,
Kevin Rodgers  <ihs_4664@yahoo.com> wrote:



THANK YOU SO MUCH!!!

Who knows how much grief that's going to same me.


David

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-08-30  2:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-28  3:57 symlinks and auto-detecting 2-bufs hold *same* ifile-num? David Combs
2003-08-28 18:23 ` Kevin Rodgers
2003-08-30  2:46   ` David Combs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).