From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mattias =?UTF-8?Q?Andr=C3=A9e?= Newsgroups: gmane.emacs.bugs Subject: bug#33564: Incorrect path canonicalisation Date: Sat, 1 Dec 2018 22:14:30 +0100 Message-ID: <20181201221430.7aefa4a2.maandree@kth.se> References: <20181201210450.47f17692.maandree@kth.se> <87lg592dsg.fsf@igel.home> <20181201213514.5c22626f.maandree@kth.se> <87h8fx2chq.fsf@igel.home> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1543698791 19038 195.159.176.226 (1 Dec 2018 21:13:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Dec 2018 21:13:11 +0000 (UTC) User-Agent: Claws Mail Cc: 33564@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 01 22:13:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTCZV-0004n5-05 for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Dec 2018 22:13:05 +0100 Original-Received: from localhost ([::1]:42563 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTCbb-0005bB-Hf for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Dec 2018 16:15:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTCbV-0005Zm-H3 for bug-gnu-emacs@gnu.org; Sat, 01 Dec 2018 16:15:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTCbQ-0007p8-5H for bug-gnu-emacs@gnu.org; Sat, 01 Dec 2018 16:15:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53068) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gTCbO-0007o5-Fy for bug-gnu-emacs@gnu.org; Sat, 01 Dec 2018 16:15:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gTCbO-0007eP-3O for bug-gnu-emacs@gnu.org; Sat, 01 Dec 2018 16:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Andr=C3=A9e?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Dec 2018 21:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33564 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 33564-submit@debbugs.gnu.org id=B33564.154369887629361 (code B ref 33564); Sat, 01 Dec 2018 21:15:02 +0000 Original-Received: (at 33564) by debbugs.gnu.org; 1 Dec 2018 21:14:36 +0000 Original-Received: from localhost ([127.0.0.1]:57326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTCax-0007dU-M7 for submit@debbugs.gnu.org; Sat, 01 Dec 2018 16:14:35 -0500 Original-Received: from smtp-4.sys.kth.se ([130.237.48.193]:60478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTCav-0007dM-Oa for 33564@debbugs.gnu.org; Sat, 01 Dec 2018 16:14:34 -0500 Original-Received: from smtp-4.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-4.sys.kth.se (Postfix) with ESMTP id B776141E; Sat, 1 Dec 2018 22:14:32 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Original-Received: from smtp-4.sys.kth.se ([127.0.0.1]) by smtp-4.sys.kth.se (smtp-4.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id dxKCn60eZcTG; Sat, 1 Dec 2018 22:14:32 +0100 (CET) X-KTH-Auth: maandree [81.228.219.220] DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kth.se; s=default; t=1543698872; bh=5fBp4T4gRxY5q7d0UtuEdZmHyf4PZmCuiUke+rvd7DI=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Wq4cK2Twbj4XLsnWN5C5dRj355O0vhv0S2tKHBAZ8emKOm3RJ0qtGU7/qsHG7wI/g VJgOY7KJzZwLXoaWC1EsyQgETQRdlInL9/ijWYhnfD8m1A1T2tlff/ILAWemWQJ33M 82nApWrzWTk7YjEOGH/MLZVBe26inpTjJiI1etug= X-KTH-mail-from: maandree@kth.se Original-Received: from localhost.localdomain (81-228-219-220-no43.tbcn.telia.com [81.228.219.220]) by smtp-4.sys.kth.se (Postfix) with ESMTPSA id C6E082CD; Sat, 1 Dec 2018 22:14:31 +0100 (CET) In-Reply-To: <87h8fx2chq.fsf@igel.home> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-Awesomeness: 120 % X-Operating-System: GNU/Linux X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152970 Archived-At: On Sat, 1 Dec 2018 21:55:29 +0100 Andreas Schwab wrote: > On Dez 01 2018, Mattias Andr=C3=A9e wrote: >=20 > > On Sat, 1 Dec 2018 21:27:27 +0100 > > Andreas Schwab wrote: > > =20 > >> On Dez 01 2018, Mattias Andr=C3=A9e wrote: > >> =20 > >> > Emacs 26.1 removes ..'s incorrectly from file names. > >> > Emacs removes the directory in front the .. rather than > >> > getting its parent directory. =20 > >>=20 > >> This is deliberate. Emacs never consults the filesystem when > >> canonicalizing filenames, as documented in expand-file-name. This is > >> consistent with the logical view of the filesystem, and how the shell > >> builtin cd handles it. =20 > > > > What is the rationale for this? =20 >=20 > Canonicalizing is a pure textual operation. Yes, you said, but why should Emacs canonicalise the file names given in the command line in the first place? One would expect that if you examine a file with for example stat or cat, you with be working with that file with you give Emacs the same file name. >=20 > > No other program Bash and Emacs behave this way, including the > > coreutils. =20 >=20 > This is not true, as I explained above. Okay, dash also behaves this way, but ls, cat, and nano, for example don't (and no, you didn't explain, nor should you have, you should have given counter examples, preferably GNU program). I don't know any other program that behaves this way. The same think goes for resolving ~, normal programs use the file names given in the command line as is. >=20 > Andreas. >=20