From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64102: 28.2; fails to find pathname with a sub dir as symlink and with parent dir ('..') Date: Sun, 18 Jun 2023 11:53:56 +0300 Message-ID: <83352pp2vv.fsf@gnu.org> References: <83352rubii.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26652"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jacob@teamconnectusa.com, 64102@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 18 10:55:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qAoBm-0006h8-GU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Jun 2023 10:55:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAoBb-000772-B2; Sun, 18 Jun 2023 04:55:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAoBa-00076s-BC for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 04:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAoBa-00047l-2a for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 04:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAoBZ-0005LN-Vn for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 04:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jun 2023 08:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64102 X-GNU-PR-Package: emacs Original-Received: via spool by 64102-submit@debbugs.gnu.org id=B64102.168707844820473 (code B ref 64102); Sun, 18 Jun 2023 08:55:01 +0000 Original-Received: (at 64102) by debbugs.gnu.org; 18 Jun 2023 08:54:08 +0000 Original-Received: from localhost ([127.0.0.1]:53180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAoAh-0005K9-Lb for submit@debbugs.gnu.org; Sun, 18 Jun 2023 04:54:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAoAe-0005Jc-AT for 64102@debbugs.gnu.org; Sun, 18 Jun 2023 04:54:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAoAX-0003pu-Mw; Sun, 18 Jun 2023 04:53:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=sBWmcROYKQJJU5XtcULzEFKDyk4OokefdkOndPdNvXI=; b=jf5fq2kv1zxg iXY933ua2gv5BiaLHIz6ZWBXrXkMENg1jDwDfEXGE0mxc6xuJWWZnwDrJJpQk9TFBDwfmFIdc41eR FFIf3N7pkdUdG3Tv2vII7Q1iQ/GUvl6aeZTIeoLXnlWLM+LrGzp8goZW2L2Uxi9SyfyHxkGaKnoPs +/y94CSxAR/flwdr6cO2Ap3woxjEmrcKY0dUMp6BuH1EAkt3Cj4ZiVw6RzWID4EvbsePOfb1Jdu+v JrQskUKy36s4Hk0if1ZCljZAp64rUbi2nDEuanZXS1+g6p3MiaiXHhrdMT/ZeXoflmxQvjqB/M//I /dHDHA8lNKbmHAt+9K9ggg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAoAV-0003R9-Tk; Sun, 18 Jun 2023 04:53:57 -0400 In-Reply-To: <83352rubii.fsf@gnu.org> (message from Eli Zaretskii on Fri, 16 Jun 2023 10:11:49 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263613 Archived-At: > Cc: 64102@debbugs.gnu.org > Date: Fri, 16 Jun 2023 10:11:49 +0300 > From: Eli Zaretskii > > > Date: Thu, 15 Jun 2023 22:25:56 +0000 > > msip_labels: > > From: Jacob Burckhardt via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" > > > > Reproduce the bug by running this: > > > > mkdir -p /tmp/usr2/lib/gcc/x86_64-linux-gnu/12 > > mkdir /tmp/usr2/include > > echo symbolic link test > /tmp/usr2/include/test.h > > \ln -s usr2/lib /tmp/lib2 > > cat /tmp/lib2/gcc/x86_64-linux-gnu/12/../../../../include/test.h > > emacs -q /tmp/lib2/gcc/x86_64-linux-gnu/12/../../../../include/test.h > > > > Emacs failed to display the content of that file in a buffer. Since the above cat command shows the contents, Emacs should be able to show it as well. The following bug is similar and includes some explanations that also apply to my bug. > > > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8035 > > > > Note that the following code succeeds. You might consider using code like this to fix the bug: > > > > (find-file (file-truename "/tmp/lib2/gcc/x86_64-linux-gnu/12/../../../../include/test.h")) > > This would mean expand-file-name would need to call file-truename to > resolve such tricky symlinks, which I think is not reasonable. We > never did that, AFAICT, and the code in find-file-noselect that begins > with expand-file-name on the argument FILENAME has been there since > 1992. Paul, any comments or ideas?