From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.bugs Subject: bug#508: emacs 22.2.1 becomes confused Date: Mon, 30 Jun 2008 19:53:51 +0200 Message-ID: <871w2evmfk.fsf@gmx.de> References: Reply-To: Sven Joachim , 508@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1214849258 18079 80.91.229.12 (30 Jun 2008 18:07:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Jun 2008 18:07:38 +0000 (UTC) Cc: 508@emacsbugs.donarmstrong.com To: Bruce Korb Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 30 20:08:24 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KDNnU-0003jF-Be for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Jun 2008 20:08:16 +0200 Original-Received: from localhost ([127.0.0.1]:45311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDNmd-0005yE-Rs for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Jun 2008 14:07:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KDNmY-0005vK-FK for bug-gnu-emacs@gnu.org; Mon, 30 Jun 2008 14:07:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KDNmW-0005rc-Ku for bug-gnu-emacs@gnu.org; Mon, 30 Jun 2008 14:07:17 -0400 Original-Received: from [199.232.76.173] (port=57211 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDNmW-0005rQ-HA for bug-gnu-emacs@gnu.org; Mon, 30 Jun 2008 14:07:16 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:33874) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KDNmV-0002q0-Vf for bug-gnu-emacs@gnu.org; Mon, 30 Jun 2008 14:07:16 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5UI7Cbb028130; Mon, 30 Jun 2008 11:07:12 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m5UI55d5027040; Mon, 30 Jun 2008 11:05:05 -0700 X-Loop: don@donarmstrong.com Resent-From: Sven Joachim Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 30 Jun 2008 18:05:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 508 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 508-submit@emacsbugs.donarmstrong.com id=B508.121484871225059 (code B ref 508); Mon, 30 Jun 2008 18:05:05 +0000 Original-Received: (at 508) by emacsbugs.donarmstrong.com; 30 Jun 2008 17:58:32 +0000 Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m5UHwRgu025053 for <508@emacsbugs.donarmstrong.com>; Mon, 30 Jun 2008 10:58:29 -0700 Original-Received: (qmail invoked by alias); 30 Jun 2008 17:58:21 -0000 Original-Received: from p54863B6A.dip.t-dialin.net (EHLO debian) [84.134.59.106] by mail.gmx.net (mp026) with SMTP; 30 Jun 2008 19:58:21 +0200 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX18yRtR0gK8yjiIBRAR89g7UTwC4zPziv/klrlCkup gbG64iTDcGFUVy In-Reply-To: (Bruce Korb's message of "Mon, 30 Jun 2008 08:03:12 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Mon, 30 Jun 2008 14:07:17 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:18575 Archived-At: On 2008-06-30 17:03 +0200, Bruce Korb wrote: > I recently re-installed my system. For various reasons not worth > going into here, > I renamed my home directory from /home/foo to /home/Foo and re-created my > "foo" user name. It is not possible to edit anything in the /home/Foo hierarchy > with emacs. At all. I can cd to the correct directory and invoke "emacs file" > and it will try to open the equivalently named file under /home/foo. Somebody > somewhere fiddled some code such that tab-completion works correctly, but > when it comes to actually "visiting" the file, the blasted thing substitutes > "$HOME" for "/home/Foo". This is with HOME=/home/foo, I suppose? Because when I tried to reproduce it, I set $HOME to /home/Foo and files beneath /home/foo became inaccessible. > Someone please be kind enough to find that > "strncasecmp" and replace it with "strncmp" and put out an emergency fix. Actually, this is not a problem in the C code, but rather in Lisp, in the function abbreviate-file-name. The following patch tries to take care of this by matching the home directory case-sensitively on systems which usually have such filesystems, could you please test it? --8<---------------cut here---------------start------------->8--- --- files.el.~1.985.~ 2008-06-11 07:54:21.000000000 +0200 +++ files.el 2008-06-30 19:37:37.000000000 +0200 @@ -1412,7 +1412,10 @@ (file-exists-p (file-name-directory (substring filename (1- (match-end 0)))))) (setq filename (substring filename (1- (match-end 0))))) - (let ((tail directory-abbrev-alist)) + (let ((tail directory-abbrev-alist) + (case-fold-search + (if (memq system-type '(ms-dos windows-nt darwin macos vax-vms axp-vms)) + t nil))) ;; If any elt of directory-abbrev-alist matches this name, ;; abbreviate accordingly. (while tail --8<---------------cut here---------------end--------------->8--- Changelog entry: 2008-06-30 Sven Joachim * files.el (abbreviate-file-name): Match the home directory case-sensitively on systems that have case-sensitive filesystems. Regards, Sven