From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-15?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: How does Emacs find the buffer for a file? Date: Sat, 15 Jun 2002 20:08:35 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1024164571 2950 127.0.0.1 (15 Jun 2002 18:09:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 15 Jun 2002 18:09:31 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17JHzP-0000lT-00 for ; Sat, 15 Jun 2002 20:09:31 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17JIOm-0000cK-00 for ; Sat, 15 Jun 2002 20:35:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17JHz3-0004uF-00; Sat, 15 Jun 2002 14:09:09 -0400 Original-Received: from waldorf.cs.uni-dortmund.de ([129.217.4.42]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17JHyc-0004sT-00 for ; Sat, 15 Jun 2002 14:08:42 -0400 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id g5FI8eb07312 for ; Sat, 15 Jun 2002 20:08:41 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id UAA26010; Sat, 15 Jun 2002 20:08:35 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 736023B5DF; Sat, 15 Jun 2002 20:08:35 +0200 (CEST) Original-To: emacs-devel@gnu.org Original-Lines: 21 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4893 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4893 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 /[user@host]/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/user@host]/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.) kai -- ~/.signature is: umop 3p!sdn (Frank Nobis)