[Top][All Lists]

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

How does Emacs find the buffer for a file?

From: Kai Großjohann
Subject: How does Emacs find the buffer for a file?
Date: Sat, 15 Jun 2002 20:08:35 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu)

When you do C-x C-f /some/file RET, then Emacs runs
insert-file-contents and puts the output in some buffer.  How does
Emacs determine the buffer from the filename?

Here's some background on why I'm asking this strange question:

There is a bug in Tramp, and I don't know how to start tracking it
down.  Tramp allows you to edit remote files.  If you say C-x C-f
/foo RET (editing the local file /foo), and then say C-x C-f
/address@hidden/foo RET (editing a remote file, also named /foo, via
Tramp), then the remote file contents are inserted into the buffer
containing the local file /foo.

Evaling (buffer-file-name) and buffer-file-name in the remote file
returns "/[sm/address@hidden/foo".  (The "sm/" part is an optional part
of the Tramp filename syntax, and Tramp inserts a default value there
if it is not given by the user.)

~/.signature is: umop 3p!sdn    (Frank Nobis)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]