From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Erik Hahn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jul 2019 18:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 36490@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156217728622921 (code B ref -1); Wed, 03 Jul 2019 18:09:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jul 2019 18:08:06 +0000 Received: from localhost ([127.0.0.1]:49976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hijfq-0005xd-8y for submit@debbugs.gnu.org; Wed, 03 Jul 2019 14:08:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:36485) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hijfo-0005xV-I7 for submit@debbugs.gnu.org; Wed, 03 Jul 2019 14:08:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56425) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hijfl-0004Mi-44 for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2019 14:08:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hijfh-0000Jh-5U for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2019 14:08:00 -0400 Received: from mout.gmx.net ([212.227.15.15]:52023) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hijfb-0000EB-7b for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2019 14:07:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1562177266; bh=sYm2Vwx4Ce9jPBq1xBWJxNYw2R8SHPs8/JyX7BH1CfM=; h=X-UI-Sender-Class:From:To:Subject:Date; b=c6KvEwQusr/toAzCa+PwbYVGOML+mrvrMuZ4fjPkwcTDQ0ndhCUVvAa3iE1Cs7BXM NQQGpw/lAI5aVq85ajrIo1EewNr/sBcpYsM0R6pMsH2igKiv3nhxhu/vhFbe7k/19q pS78SRRa26gETCQlSs3pgrdVrDhY7OgSRrABmaDk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p5 ([178.24.243.220]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M8QWA-1heLwo0vLM-004QxT for ; Wed, 03 Jul 2019 20:07:46 +0200 From: Erik Hahn Date: Wed, 03 Jul 2019 20:07:26 +0200 Message-ID: <87muhvyotd.fsf@gmx.de> MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:Vjl3bjZ0o6qkIMSMTeUWbheJGMAnl7aIWNcYDkBjFKvlJJ82rN+ 1UKIOrNZBq7aX2zwMzIf3W2aGO/0xNymJSfsFGB1lmURqsR06jaKHTSxbggUxVT1N6Ag+cB Aj46NsV1fzw2rlM3/RcVZkytmV93iVoZo+/RFE9m3hxzqzCavH2hp97lL+vI7FMH7o6sJ/l SRaQyPzO2ZD3+Ji+BsUew== X-UI-Out-Filterresults: notjunk:1;V03:K0:Z9mMFNCQPlw=:Qdu90VghsNp0LvaTbuEfzY ZQglnNjwHxVdDFZ1KtKxJME3i31UIL9x23qDCHU0mwfSghqzoZLqr8FcXyhFDB8fdWYJr/YOd Jwppii90pos0D7uBkVtz/zOP5xE4UuipPNwYv16GOhNohxE2EytURpOx63Fk9Z/7xTsDD9zLe VYtOvwDP4Rzs+W9qTGocq6/GJt/rB2qtL/jGz6u4yXRJ5o7AadU0dnDUy9JDMSBBKacQXnvxU a9Cu/nTbhJMLopsbpy0QzpONi1mPsf7p//Tev4god0+KOW7F0XDif0drbILruWfqKG0O8eWQY ut+QJ1X0AzEjKFRc3NioGFo+IZ4D6I6STpdwFF1AUkN9xkna7i7dmM629PQSGTLhFH6Z3u9FV i+NaShdTGfk92k1GVROz9mYc9pQ7AnykWfrrNIXKqmulGzj/bfDhrwJ4nsUd1K5QgFrOUpu8D 6m/MG2Y2m6eP0ZwCJnjSjbsEjd8bzlbaOTUzNOgYfpTcav9p5U5Sm70hpxtx/31jxleGV6L70 h+2/KFgSrQ9UWm2CWhglmDQhYD+TcXw4ZR0Rc4rUuLk3LSbZCWifB+qHTNqoRRn7EvWsAORiH MEmXJBPPRafZkWz5EQamBQ7mX1cE+inZmAW/Rmjvx1vujlXyNz2n8PUwr1IWIpfOQd5YRYjii 1RtvCNVWhvKzCrJQHJdb5JTG0TsVEH3zbQXkp3O39Qp/S5WWXtJPUAzzWYPR7chMkunuEno+e Eo3YA4yz3e4HGZAw5doei/sLRA8xAJ78uKCv0/KMaAR8sN7ikSLpGPY+cpBwQ7/a4qpUgGs+3 oWbStkY2DHn6TpH/MGhHSMpDh9mH39wLWQPf6Ylbsq53M5XNh5UilsesjT36KjiZh7AfnoHsr Q4X/JnSQg1/vKugST5Om8MHrTnYCW5r899kMqWmKHvlidFKb7p6dQiVCYi4uq9xZep/TwvTF9 czRgYbRWQX7KDGhRx4++mvg8qU60taJvqr9Ua36f5w/VLbkHw8mRA1dp8qmS5Vle4EzovnBkk DtfySqW4u3O5MAY8cwglCZXoEvOeeIzVfL1/uCjX5GCIb6Pp5+c1rzIxLWZkdVjPYT5c8n/Fl U3thIHZlwPb6e0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.15 X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Call (directory-files-recursively DIR ".*") where DIR contains a subdirectory named "~" but is not the parent of your home directory. The function will recurse into your home directory. This is probably because (expand-file-name "~" ...) returns the home directory. In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit) of 2018-11-03 built on p5 Windowing system distributor 'The X.Org Foundation', version 11.0.12003000 System Description: Gentoo Base System release 2.6 Recent messages: Configured using: 'configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-silent-rules --docdir=/usr/share/doc/emacs-26.1-r3 --htmldir=/usr/share/doc/emacs-26.1-r3/html --libdir=/usr/lib64 --program-suffix=-emacs-26 --infodir=/usr/share/info/emacs-26 --localstatedir=/var --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp --without-compress-install --without-hesiod --without-pop --with-file-notification=inotify --enable-acl --with-dbus --without-modules --without-gameuser --with-gpm --without-kerberos --without-kerberos5 --without-lcms2 --with-xml2 --without-mailutils --without-selinux --with-gnutls --with-libsystemd --with-threads --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns --without-gconf --without-gsettings --without-toolkit-scroll-bars --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --without-imagemagick --without-xft --without-cairo --without-libotf --without-m17n-flt --with-x-toolkit=lucid --with-xaw3d 'CFLAGS=-O2 -pipe -march=native' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB LUCID X11 THREADS LIBSYSTEMD Important settings: value of $LC_MONETARY: en_US.UTF-8 value of $LC_NUMERIC: en_US.UTF-8 value of $LC_TIME: en_GB.UTF-8 value of $LANG: en_GB.utf8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jul 2019 21:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Erik Hahn Cc: 36490@debbugs.gnu.org Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.15626195856588 (code B ref 36490); Mon, 08 Jul 2019 21:00:02 +0000 Received: (at 36490) by debbugs.gnu.org; 8 Jul 2019 20:59:45 +0000 Received: from localhost ([127.0.0.1]:59713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkajh-0001iB-6D for submit@debbugs.gnu.org; Mon, 08 Jul 2019 16:59:45 -0400 Received: from quimby.gnus.org ([80.91.231.51]:33604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkaje-0001hy-OE for 36490@debbugs.gnu.org; Mon, 08 Jul 2019 16:59:43 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkaja-00059V-6N; Mon, 08 Jul 2019 22:59:40 +0200 From: Lars Ingebrigtsen References: <87muhvyotd.fsf@gmx.de> Date: Mon, 08 Jul 2019 22:59:37 +0200 In-Reply-To: <87muhvyotd.fsf@gmx.de> (Erik Hahn's message of "Wed, 03 Jul 2019 20:07:26 +0200") Message-ID: <874l3w2qfa.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Erik Hahn writes: > Call (directory-files-recursively DIR ".*") where DIR contains a > subdirectory named "~" but is not the parent of your home directory. The > function will recurse into your home directory. This is [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Erik Hahn writes: > Call (directory-files-recursively DIR ".*") where DIR contains a > subdirectory named "~" but is not the parent of your home directory. The > function will recurse into your home directory. This is probably because > (expand-file-name "~" ...) returns the home directory. Oops: (expand-file-name "~" "/tmp/") => "/home/larsi" Yup; that function should be rewritten to have no instances of `expand-file-name', which is too DWIM for a function like this. I'll do a rewrite... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 08 16:59:48 2019 Received: (at control) by debbugs.gnu.org; 8 Jul 2019 20:59:48 +0000 Received: from localhost ([127.0.0.1]:59716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkajk-0001iS-HL for submit@debbugs.gnu.org; Mon, 08 Jul 2019 16:59:48 -0400 Received: from quimby.gnus.org ([80.91.231.51]:33618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkaji-0001iJ-EI for control@debbugs.gnu.org; Mon, 08 Jul 2019 16:59:46 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkajf-00059c-QY for control@debbugs.gnu.org; Mon, 08 Jul 2019 22:59:45 +0200 Date: Mon, 08 Jul 2019 22:59:43 +0200 Message-Id: <8736jg2qf4.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #36490 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 36490 + confirmed quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 36490 + confirmed quit From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jul 2019 21:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Erik Hahn Cc: 36490@debbugs.gnu.org Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156262013315647 (code B ref 36490); Mon, 08 Jul 2019 21:09:02 +0000 Received: (at 36490) by debbugs.gnu.org; 8 Jul 2019 21:08:53 +0000 Received: from localhost ([127.0.0.1]:59722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkasX-00044J-Dr for submit@debbugs.gnu.org; Mon, 08 Jul 2019 17:08:53 -0400 Received: from quimby.gnus.org ([80.91.231.51]:33758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkasV-000449-82 for 36490@debbugs.gnu.org; Mon, 08 Jul 2019 17:08:51 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkasQ-0005DY-EM; Mon, 08 Jul 2019 23:08:48 +0200 From: Lars Ingebrigtsen References: <87muhvyotd.fsf@gmx.de> Date: Mon, 08 Jul 2019 23:08:46 +0200 In-Reply-To: <87muhvyotd.fsf@gmx.de> (Erik Hahn's message of "Wed, 03 Jul 2019 20:07:26 +0200") Message-ID: <87zhlo1bfl.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Actually, the doc string of expand-file-name is either wrong, or the implementation is. It says: --- An initial =?UTF-8?Q?=E2=80=98~/=E2=80=99?= expands to your home directory. An initial =?UTF-8?Q?=E2=80=98~USER/=E2=80=99?= expands to =?UTF-8?Q?USER=E2=80=99s?= home directory. --- Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Actually, the doc string of expand-file-name is either wrong, or the implementation is. It says: --- An initial =E2=80=98~/=E2=80=99 expands to your home directory. An initial =E2=80=98~USER/=E2=80=99 expands to USER=E2=80=99s home director= y. --- Assuming the "An initial" refers to the first parameter, then (expand-file-name "~/" "/tmp/") =3D> "/home/larsi/" works as advertised, but (expand-file-name "~" "/tmp/") =3D> "/home/larsi" is a different thing: "~" is a perfectly valid file name, so having this function map that to something else is just... wrong. (expand-file-name "~larsi" "/tmp/") =3D> "/home/larsi" is the same: Also wrong and undocumented. The doc string continues with further confusion: --- See also the function =E2=80=98substitute-in-file-name=E2=80=99. --- See it for... what? For further expansions this function is going to do? Fortunately not: (expand-file-name "$HOME" "/tmp/") =3D> "/tmp/$HOME" So that's probably just meant as "that's also a function that does file name stuff, but it has nothing to do with this ~ thing we just discussed"? So what to do here? I think the current, undocumented (expand-file-name "~" "/tmp/") =3D> "/home/larsi" must surely be an error, and that should be fixed instead of the callers? Opinions? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Erik Hahn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jul 2019 21:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Lars Ingebrigtsen Cc: 36490@debbugs.gnu.org Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156262145028933 (code B ref 36490); Mon, 08 Jul 2019 21:31:02 +0000 Received: (at 36490) by debbugs.gnu.org; 8 Jul 2019 21:30:50 +0000 Received: from localhost ([127.0.0.1]:59761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkbDm-0007WL-13 for submit@debbugs.gnu.org; Mon, 08 Jul 2019 17:30:50 -0400 Received: from mout.gmx.net ([212.227.15.15]:60431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkbDk-0007Ow-L0 for 36490@debbugs.gnu.org; Mon, 08 Jul 2019 17:30:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1562621442; bh=mUMVPARqLAb4sU35pcMBpnBOGshM5hFNB027n7Ic3P4=; h=X-UI-Sender-Class:Subject:To:References:From:Cc:Date:In-Reply-To; b=illCjXD8sbV+aRrLS/RlrU8S+3ZIt9KAsnmnpZAWflEMh9NsLbtLgEkn7ODX6Y438 lDQCNmoIF8W0z2htdxqc7lg55iDlamTnRL5VAzYL+G4wK7n2wAanrrLdUgD6pSOnpT 9DL+yf4yrpUyAqr2OqupFD7sTXb7xBaOJfIUsTLQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [10.138.231.187] ([178.24.242.214]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MbPLI-1i3MYg0Za0-00Ikz0; Mon, 08 Jul 2019 23:30:42 +0200 References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> From: Erik Hahn Message-ID: Date: Mon, 8 Jul 2019 23:30:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <87zhlo1bfl.fsf@mouse.gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:p2ggfabou/X1YwUORbo/PGGkRroilLQcduHEUMmZ2nSBMQndVL6 e7xIJziG+e4QWIZVgybue7laZ1v85qpd7z3svrPGaxX/LqNe8+4z6gC2icfR9wrGv50xdhU t61hg5hlPzLxVe9nVB9K01UfesxwRejc5bee7dFz+Fjavz+K9iMxxGB69uCR0EbFM6ZdoFv yzOZIBmFL+N4HKZ2YW0jA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:6FDZ/FN5xSw=:LSpZcWWxA33OhNY2MMRhUs n0JIuloM7piam7oKGrtN2iCu6IcEt4wuGkvq02REzhYb8nI0Kz5ZHsiJdzUsgYwO/A1mnQhVd Z8XyHPp9hNqDyZEcNNAAIftqZ+fM9LINX9Cvd7BGFzctzXWlqb+65nIigeZoyLhCaXQZgfHcj gh6U1CnggW4W558DWGsB74RsTSSdximClvWvccFVhsBthhZSK248qflHVPvBu66oRt4BRYDjg IdhlHxkgHvIxmK1MI4q4LbdSaRgVk/pZAULpRpiD0ML7W30L9TzIeuAnnstaEhs/rHVJ8a9XE MlKtaMEHprhXrqoIoB3e2gabiZ1Id4aM6j/VXcaZyOiwXyUSQa334KZ0sLRoQd25RnMsYCUgE AGiBy14pOMDDPygwxlPiBxhC0UzaKx0LHsSu5NOgCR3//7Jx+SAujq4TsLhFKmt+4WABpk/Z6 7y1oNh7sSXs0efwcXt9w8WK8v+jv1zykHazS0/btS7/E3ar7XjX4H2z4+4HE6x1h91oyYcMs7 7TrUtQGr2Dr0HOuOFRYxq78mLz7kKywC0n4UVQrTwtKgWSsSYq5j9NO2La4TnZtjuZl5QvbzR DrUeZtabf1o6EME9zpSHtWtIe8Hfb0euyfl8Wi+nHYsae3JbI1ka68lMS18lcdtw7O/T+NW9a 3wW57O0P1tedurO1wtSGhjNn60BB/GtkgTW/Mg9dlGR/2xpbc3V3fMYpKYg3NiubvRitVtvFb hI45KRfnMvn9iJIpyH9fN8r+whWCOUeI2D+UZInOk7NkdlmNA9m5KrpGs+Z1OH1TzOtcGfjA4 FLmGeB7AHrrldQCbUXv+B3ocXVdobcxC8d4n2SyqiB0zVt76U5dLNcH9MEEztwi7jmjPvVTeo epjCPxAPLgsJhGIHFZcBvlMALDq23r8oeZX243bPkooNyY+YLkFI+FYsevp7RMjIyrxnzvkXM KVx7L/Mnkejj/XUPwYYfwbMjZmNsi4ksmAr/TFPsrDS3/vso/+zwfdfryUk8l7fGdpuIpO8Cx U/RLzDlptlxhUx6do2zNalJg3xD6s4ffBaYj5moTRbuXMISCOS7P3KtRyBASDEkgVWwYpbCk0 D50Qm1of7aHB/zs10TMUpcfwqPZXdwqY/dP X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 08/07/19 23:08, Lars Ingebrigtsen wrote: > The doc string continues with further confusion: > > --- > See also the function =E2=80=98substitute-in-file-name=E2=80=99. > --- > > See it for... what? For further expansions this function is going to > do? It is related in that it also chokes on files named "~": (substitute-in-file-name "/tmp/~") =3D> "~" Its doc string is also wrong. It says > If =E2=80=98/~=E2=80=99 appears, all of FILENAME through that =E2=80=98= /=E2=80=99 is discarded. but (substitute-in-file-name "/tmp/~foo") =3D> "/tmp/~foo" From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jul 2019 21:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Erik Hahn Cc: 36490@debbugs.gnu.org Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156262300612440 (code B ref 36490); Mon, 08 Jul 2019 21:57:01 +0000 Received: (at 36490) by debbugs.gnu.org; 8 Jul 2019 21:56:46 +0000 Received: from localhost ([127.0.0.1]:59800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkbcs-0003Ea-Cz for submit@debbugs.gnu.org; Mon, 08 Jul 2019 17:56:46 -0400 Received: from quimby.gnus.org ([80.91.231.51]:34300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkbcq-0003ES-PL for 36490@debbugs.gnu.org; Mon, 08 Jul 2019 17:56:45 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkbcn-0005ZG-3b; Mon, 08 Jul 2019 23:56:43 +0200 From: Lars Ingebrigtsen References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEXw4sqykINZDASXcGD+ /OtyPB/SuK5HtkdZAAACfElEQVQ4jXWTsXLbMAyG4ZrVLEaq5oY5d7ZKyTN5wXFOlCgzWat4/0fo D8pxlxZ3uVD8APwAAVO00Q+ZmmLtsvHBW5FshsNGJTYi0gH+chc7SiZq8sY9bSngerTZPLhHhBIV n/vQE3OaEZ+p/HQvBu6dtdvlakgkjlYaa+2De4G7hYiJAwMkEeu9zV/ci9jB5qb0FoBDEEgg+283 iNRcW4tUjUWJNpPgj4MJxQ+y9Wmj4Zwg3XTjxjBoSRbTh40u5yBNQV16z0W0174tSNVRgUTJFQQE db63mWm8RH0G2cxOUK81LVKZmGxGwb0CaA+SszlElJsIlVsxCiigDmjEC9N2DI0dpAEIcCMS9MET 01XLRRc30CCXGAUck+TSWVaQWJ+TDPcK4A4vVo3EotPZ4siUS7Kd9ziZQAf+tr6t63REHaWNfvZv r0EjIs+L9+sUkUq647rO62vIFSAYgIUptc8r7KPBLPmZZ2SdJylMlxArSLdU8zr4KW1M1h7/RkSa 9WNqk6HRV7A+BQUOJ2gMANxUsDzp2z47rXadus6QPVfx5VFBPNXoaTgYaveq1h+aKq07yNFgfMfF wfEDLwSNau9GNcKxfnzXt0s3ENC5PXz9BHwH6Vw7rx9nTRVQhYJnbGIZjjcAAlAjDhajpBpxanGi gICTW94FK5pu4hWQgtW952Aoph3kCua9j4JUh+ZaFes9/VwXBYK9Emy7mv4Q5B5xZfK+VDA737mx Hv2ETaZo4v5Aznu332OCWIZktNwTZMDWz0dkneDVnXDrXGW1wUm3SadzWrSu2sMeMfEOdlPvG8DG 6jLcwWfI1NaI6O827//6iyj4h0n+D4D9AehP82BHjrQVAAAAAElFTkSuQmCC Date: Mon, 08 Jul 2019 23:56:40 +0200 In-Reply-To: (Erik Hahn's message of "Mon, 8 Jul 2019 23:30:38 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Erik Hahn writes: > It is related in that it also chokes on files named "~": > > (substitute-in-file-name "/tmp/~") => "~" > > Its doc string is also wrong. It says > >> If =?UTF-8?Q?=E2=80=98/~=E2=80=99?= appears, all of FILENAME through tha [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Erik Hahn writes: > It is related in that it also chokes on files named "~": > > (substitute-in-file-name "/tmp/~") =3D> "~" > > Its doc string is also wrong. It says > >> If =E2=80=98/~=E2=80=99 appears, all of FILENAME through that =E2=80=98/= =E2=80=99 is discarded. > > but > > (substitute-in-file-name "/tmp/~foo") =3D> "/tmp/~foo" Yup, it's only if the user exists: (substitute-in-file-name "/tmp/~larsi") =3D> "~larsi" Same as with expand-file-name: (expand-file-name "~larsi" "/tmp/") =3D> "/home/larsi" (expand-file-name "~foo" "/tmp/") =3D> "/tmp/~foo" --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 15:37:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Lars Ingebrigtsen Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.15626865699737 (code B ref 36490); Tue, 09 Jul 2019 15:37:04 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 15:36:09 +0000 Received: from localhost ([127.0.0.1]:33817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hksA5-0002Wz-Iq for submit@debbugs.gnu.org; Tue, 09 Jul 2019 11:36:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hksA3-0002WZ-M2 for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 11:36:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52840) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hks9y-0005p6-8O; Tue, 09 Jul 2019 11:36:02 -0400 Received: from [176.228.60.248] (port=1781 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hks9x-0003ke-81; Tue, 09 Jul 2019 11:36:01 -0400 Date: Tue, 09 Jul 2019 18:35:46 +0300 Message-Id: <83bly35igd.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87zhlo1bfl.fsf@mouse.gnus.org> (message from Lars Ingebrigtsen on Mon, 08 Jul 2019 23:08:46 +0200) References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Date: Mon, 08 Jul 2019 23:08:46 +0200 > Cc: 36490@debbugs.gnu.org > > Actually, the doc string of expand-file-name is either wrong, or the > implementation is. > > It says: > > --- > An initial ‘~/’ expands to your home directory. > An initial ‘~USER/’ expands to USER’s home directory. > --- > > Assuming the "An initial" refers to the first parameter, then > > (expand-file-name "~/" "/tmp/") > => "/home/larsi/" > > works as advertised, but > > (expand-file-name "~" "/tmp/") > => "/home/larsi" > > is a different thing: "~" is a perfectly valid file name, so having this > function map that to something else is just... wrong. If you want "~" to be interpreted literally, you need to protect it with "/:". > (expand-file-name "~larsi" "/tmp/") > => "/home/larsi" > > is the same: Also wrong and undocumented. Why would we want to document that? > The doc string continues with further confusion: > > --- > See also the function ‘substitute-in-file-name’. > --- > > See it for... what? For expanding environment variables, and for the special effect of "//" etc. > So what to do here? I think the current, undocumented > > (expand-file-name "~" "/tmp/") > => "/home/larsi" > > must surely be an error, and that should be fixed instead of the > callers? Opinions? It is not an error. From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 15:40:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Erik Hahn Cc: 36490@debbugs.gnu.org, larsi@gnus.org Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156268677810027 (code B ref 36490); Tue, 09 Jul 2019 15:40:04 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 15:39:38 +0000 Received: from localhost ([127.0.0.1]:33823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hksDS-0002bf-3Q for submit@debbugs.gnu.org; Tue, 09 Jul 2019 11:39:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hksDP-0002bT-VD for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 11:39:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hksDK-0007zc-FD; Tue, 09 Jul 2019 11:39:30 -0400 Received: from [176.228.60.248] (port=1996 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hksDJ-00044l-QR; Tue, 09 Jul 2019 11:39:30 -0400 Date: Tue, 09 Jul 2019 18:39:15 +0300 Message-Id: <83a7dn5iak.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Erik Hahn on Mon, 8 Jul 2019 23:30:38 +0200) References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Erik Hahn > Date: Mon, 8 Jul 2019 23:30:38 +0200 > Cc: 36490@debbugs.gnu.org > > > If ‘/~’ appears, all of FILENAME through that ‘/’ is discarded. > > but > > (substitute-in-file-name "/tmp/~foo") => "/tmp/~foo" Do you have a user named "foo" on that system? If not, try a real user name instead of "foo". From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 15:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Eli Zaretskii Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156268745619416 (code B ref 36490); Tue, 09 Jul 2019 15:51:01 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 15:50:56 +0000 Received: from localhost ([127.0.0.1]:33854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hksON-000536-Mi for submit@debbugs.gnu.org; Tue, 09 Jul 2019 11:50:55 -0400 Received: from quimby.gnus.org ([80.91.231.51]:48416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hksOL-00052y-Kn for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 11:50:53 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hksOH-0006lG-83; Tue, 09 Jul 2019 17:50:51 +0200 From: Lars Ingebrigtsen References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAD1BMVEVbSk4WCQ00IykkFhtF MjcvCCv0AAACPklEQVQ4jW1U0ZUjMQhzJjTg+ArIYhowTAE+L/3XdJJ9ebcf532bZCxAIJGU8v8j 5VEt8VZK5tyvPMsI5OR9Ucu/twwhMJOAdFcewkid5dnm/nSF8/bULzLL5WUlLq5Q3Sw8KbhQQVUU BWN+OuLHy1N1IfRwEpNUA0csVwPZnJJ/W0bRLM96gxSRuD5tSJrNDSy1a9/maQrxmOBZX0tTzmxM FDQ9d0ZLTds6bP5lxkHKc4BkQ+sIwoQNRH3Z0nUflVbs+5OBWmpGSltQbHfAOWpbCp3QQgYE++hy AVAA3lEwzqxo7XCkUhfrEXrM4UTgAIDortHCD7Osf4BHjIZKbzInVD3AAlBr9E0tQgkelZqwVB1x LIRsUwn8AoCuGrnpCQwoH4ATNpp7/J7yA1AAjjbFSsKrH0C47QV5Y8Q0Atahh3o4LqbIxN8i0Kz7 Soz9hqswviyIvQHI0Vd4oLgxvHRUBoA63rWDQghgOK5qebyQ6ZjZOeVZaiaUB52AsNpvIBAJwiWB 5zecsPC73wwGDzMhpTgEz94sbiQI9zNXRwf4XsDn3mCr7ZmX0ybBtt+AQF19cbsQ+GZj5Ur9AoAx /PTkUOZSx38MDx3aOpc8v1BSeo9yYa/cgbaBjaT13LoI7O6IqAGD3+gE+Z6IB/CoQbthMNxOALcg cgOvPiqW7r3NiJZXbWMDzRE/XuNGE5ASq1lHI1CdW3l+Hva2ld/1ADxOnfDdKcKnUT8AbP0OTG7y vR8/GVypL8S1pnjY0B/uuJ4Lq2IKKgAAAABJRU5ErkJggg== Date: Tue, 09 Jul 2019 17:50:49 +0200 In-Reply-To: <83bly35igd.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 Jul 2019 18:35:46 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> An initial =?UTF-8?Q?=E2=80=98~/=E2=80=99?= expands to your home directory. >> An initial =?UTF-8?Q?=E2=80=98~USER/=E2=80=99?= expands to =?UTF-8?Q?USER=E2=80=99s?= home directory. >> --- >> >> Assuming the "An initial" refers to the first parameter, then Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> An initial =E2=80=98~/=E2=80=99 expands to your home directory. >> An initial =E2=80=98~USER/=E2=80=99 expands to USER=E2=80=99s home direc= tory. >> --- >>=20 >> Assuming the "An initial" refers to the first parameter, then [...] > If you want "~" to be interpreted literally, you need to protect it > with "/:". Sorry; I don't quite follow you here. The doc string says that "~/" is interpreted specially. There's no "/" in "~". :-) That=20 (expand-file-name "~/" "/tmp/") =3D> "/home/larsi/" is fine, because "~/" isn't a valid file name. But "~" is, and that's the problem. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 16:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Lars Ingebrigtsen Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156268875121752 (code B ref 36490); Tue, 09 Jul 2019 16:13:02 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 16:12:31 +0000 Received: from localhost ([127.0.0.1]:33941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hksjG-0005em-Qu for submit@debbugs.gnu.org; Tue, 09 Jul 2019 12:12:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hksjC-0005eX-TH for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 12:12:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hksj7-00062B-4r; Tue, 09 Jul 2019 12:12:21 -0400 Received: from [176.228.60.248] (port=3992 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hksj5-00015B-6B; Tue, 09 Jul 2019 12:12:19 -0400 Date: Tue, 09 Jul 2019 19:12:04 +0300 Message-Id: <8336jf5grv.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Lars Ingebrigtsen on Tue, 09 Jul 2019 17:50:49 +0200) References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: erik_hahn@gmx.de, 36490@debbugs.gnu.org > Date: Tue, 09 Jul 2019 17:50:49 +0200 > > > If you want "~" to be interpreted literally, you need to protect it > > with "/:". > > Sorry; I don't quite follow you here. The doc string says that "~/" is > interpreted specially. There's no "/" in "~". :-) But it does NOT say that "~" will NOT be interpreted specially. > That > > (expand-file-name "~/" "/tmp/") > => "/home/larsi/" > > is fine, because "~/" isn't a valid file name. But "~" is, and that's > the problem. No, I think the problem is that the caller should have protected the literal "~", as I said. From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 16:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Lars Ingebrigtsen Cc: 36490@debbugs.gnu.org, Eli Zaretskii , erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156268907830327 (code B ref 36490); Tue, 09 Jul 2019 16:18:01 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 16:17:58 +0000 Received: from localhost ([127.0.0.1]:33959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hksoX-0007ss-7q for submit@debbugs.gnu.org; Tue, 09 Jul 2019 12:17:58 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:54479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hksoV-0007qe-3e for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 12:17:56 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 45jnXx4LXsz1rM67; Tue, 9 Jul 2019 18:17:53 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 45jnXx2Zmcz1qqkB; Tue, 9 Jul 2019 18:17:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id XM_x6UVVf8h6; Tue, 9 Jul 2019 18:17:52 +0200 (CEST) X-Auth-Info: Mhn5dXfS3TUTZfjlQAOJleuIv+Iy+nady0lDwviCaQYipWH5DcbKF0Dii1N3+Jlh Received: from igel.home (ppp-46-244-163-181.dynamic.mnet-online.de [46.244.163.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 9 Jul 2019 18:17:52 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id D4F572C0EE1; Tue, 9 Jul 2019 18:17:51 +0200 (CEST) From: Andreas Schwab References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> X-Yow: C'MON, everybody!! I've flown in LESLIE GORE and two dozen KOSHER BUTCHERS! They'll be doing intricate MILITARY MANEUVERS to the soundtrack from "OKLAHOMA"!! Date: Tue, 09 Jul 2019 18:17:51 +0200 In-Reply-To: (Lars Ingebrigtsen's message of "Tue, 09 Jul 2019 17:50:49 +0200") Message-ID: <87tvbvb2s0.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) On Jul 09 2019, Lars Ingebrigtsen wrote: > is fine, because "~/" isn't a valid file name. "~/" is a valid file name, that happens to be a directory. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 16:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Eli Zaretskii Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156268965431591 (code B ref 36490); Tue, 09 Jul 2019 16:28:01 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 16:27:34 +0000 Received: from localhost ([127.0.0.1]:33990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hksxq-0008DT-Ab for submit@debbugs.gnu.org; Tue, 09 Jul 2019 12:27:34 -0400 Received: from quimby.gnus.org ([80.91.231.51]:49166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hksxp-0008DL-2m for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 12:27:33 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hksxk-00077F-TH; Tue, 09 Jul 2019 18:27:31 +0200 From: Lars Ingebrigtsen References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> <8336jf5grv.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEUKDUgAAEsAAU36+ARM S0QAAE+ujyb//wAAAE3+/wjWxRnUA99JAAACNklEQVQ4jbXSQYvaQBQA4FFCK3sypYUcNegiPW3J krA5RXc6LZ5scMCjNdPZklMhxYAnIwbmuNBTb7aRCPmVfZNJXN312gdxzHy+vPG9oLvfL+JO7iE3 DHkRhnkRFnkBEeSw8jxDFtxk6nLlIr/LFTnx5fg/YOP7SxAxRMgFsD0ti6ML4IXPa8CVY0xevSge R3NdbzOtcJ7DTjeSZH4Vu+HhHIYSWnCgaE+yMzAEhKwRjbpPhOI9wEysA7hZDYVOnOOpvhoyJyFw 4BshfO1Qw6NQscZ8NBOztPdQwU9xGjSl00MFZXXRKj/TNKUTLVAwKLe+1yl0yr0HCUuMMSQtyu0+ pXQSu0HZK9nc4WZnqEcBFE5UQ/xD36knAfhZwfERkoYhjColiG9JDR/anxORrKEJAFpomzX8WUPG ZtQsy/sdTwGMdGG2NRKuVvNm3/fpxlSwul/x0FKpt32fUrOC5cmIIsZMUz4qsyzr1/lUbW8c5UiH QBrhYXauSDdUD990tNPJSpADlDHYdE8M6QPoJ4ULNPXNznG0bzH2MJ4ATBBu+NTUnAoYY5xxMsWe 6Gqe1zSvasCYzxmZcjaDsX4hDB1UjX4HaTAqzJmcN30f79XLoMtWz6A++ihPAbB4rUBK2Wz5ewnf PlVgXGPUkLtlRs9ZKGjo7SAuxgxpLeG/o+nE2akaNibQcCdys127t+/TrfO3ehMdq27qOHTng21c w9Mk4C8vzW18o8CCW5tzaLvMXBrXFfwDmRTVdnC3Ri4AAAAASUVORK5CYII= Date: Tue, 09 Jul 2019 18:27:28 +0200 In-Reply-To: <8336jf5grv.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 Jul 2019 19:12:04 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> > If you want "~" to be interpreted literally, you need to protect it >> > with "/:". >> >> Sorry; I don't quite follow you here. The doc string says that "~/" is >> interpreted specially. There's [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> > If you want "~" to be interpreted literally, you need to protect it >> > with "/:". >> >> Sorry; I don't quite follow you here. The doc string says that "~/" is >> interpreted specially. There's no "/" in "~". :-) > > But it does NOT say that "~" will NOT be interpreted specially. I think it's a good idea to specify what strings will be interpreted specially -- otherwise it's a bit difficult to use that function. >> is fine, because "~/" isn't a valid file name. But "~" is, and that's >> the problem. > > No, I think the problem is that the caller should have protected the > literal "~", as I said. Any function that iterates over a list of directory files (as returned by directory-files) would then have to quote whatever it passes to expand-file-name -- or avoid that function completely. That seems like an odd design. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 16:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Lars Ingebrigtsen Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.15626906959012 (code B ref 36490); Tue, 09 Jul 2019 16:45:01 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 16:44:55 +0000 Received: from localhost ([127.0.0.1]:34014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hktEd-0002LH-3M for submit@debbugs.gnu.org; Tue, 09 Jul 2019 12:44:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hktEb-0002L4-AZ for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 12:44:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hktEV-0004MW-Rq; Tue, 09 Jul 2019 12:44:47 -0400 Received: from [176.228.60.248] (port=2002 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hktET-0007Hh-TB; Tue, 09 Jul 2019 12:44:46 -0400 Date: Tue, 09 Jul 2019 19:44:31 +0300 Message-Id: <83wogr40pc.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Lars Ingebrigtsen on Tue, 09 Jul 2019 18:27:28 +0200) References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> <8336jf5grv.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: erik_hahn@gmx.de, 36490@debbugs.gnu.org > Date: Tue, 09 Jul 2019 18:27:28 +0200 > > > No, I think the problem is that the caller should have protected the > > literal "~", as I said. > > Any function that iterates over a list of directory files (as returned > by directory-files) would then have to quote whatever it passes to > expand-file-name -- or avoid that function completely. That seems like > an odd design. What happens if a function that iterates over a directory finds a subdirectory whose name is literally "~"? From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 16:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Eli Zaretskii Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156269105117776 (code B ref 36490); Tue, 09 Jul 2019 16:51:02 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 16:50:51 +0000 Received: from localhost ([127.0.0.1]:34023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hktKN-0004cd-5W for submit@debbugs.gnu.org; Tue, 09 Jul 2019 12:50:51 -0400 Received: from quimby.gnus.org ([80.91.231.51]:49552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hktKL-0004cV-C3 for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 12:50:49 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hktKG-0007Hg-9D; Tue, 09 Jul 2019 18:50:46 +0200 From: Lars Ingebrigtsen References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> <8336jf5grv.fsf@gnu.org> <83wogr40pc.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEUKDUgAAEsAAU36+ARM S0QAAE+ujyb//wAAAE3+/wjWxRnUA99JAAACNklEQVQ4jbXSQYvaQBQA4FFCK3sypYUcNegiPW3J krA5RXc6LZ5scMCjNdPZklMhxYAnIwbmuNBTb7aRCPmVfZNJXN312gdxzHy+vPG9oLvfL+JO7iE3 DHkRhnkRFnkBEeSw8jxDFtxk6nLlIr/LFTnx5fg/YOP7SxAxRMgFsD0ti6ML4IXPa8CVY0xevSge R3NdbzOtcJ7DTjeSZH4Vu+HhHIYSWnCgaE+yMzAEhKwRjbpPhOI9wEysA7hZDYVOnOOpvhoyJyFw 4BshfO1Qw6NQscZ8NBOztPdQwU9xGjSl00MFZXXRKj/TNKUTLVAwKLe+1yl0yr0HCUuMMSQtyu0+ pXQSu0HZK9nc4WZnqEcBFE5UQ/xD36knAfhZwfERkoYhjColiG9JDR/anxORrKEJAFpomzX8WUPG ZtQsy/sdTwGMdGG2NRKuVvNm3/fpxlSwul/x0FKpt32fUrOC5cmIIsZMUz4qsyzr1/lUbW8c5UiH QBrhYXauSDdUD990tNPJSpADlDHYdE8M6QPoJ4ULNPXNznG0bzH2MJ4ATBBu+NTUnAoYY5xxMsWe 6Gqe1zSvasCYzxmZcjaDsX4hDB1UjX4HaTAqzJmcN30f79XLoMtWz6A++ihPAbB4rUBK2Wz5ewnf PlVgXGPUkLtlRs9ZKGjo7SAuxgxpLeG/o+nE2akaNibQcCdys127t+/TrfO3ehMdq27qOHTng21c w9Mk4C8vzW18o8CCW5tzaLvMXBrXFfwDmRTVdnC3Ri4AAAAASUVORK5CYII= Date: Tue, 09 Jul 2019 18:50:44 +0200 In-Reply-To: <83wogr40pc.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 Jul 2019 19:44:31 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> Any function that iterates over a list of directory files (as returned >> by directory-files) would then have to quote whatever it passes to >> expand-file-name -- or avoid that function completely [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> Any function that iterates over a list of directory files (as returned >> by directory-files) would then have to quote whatever it passes to >> expand-file-name -- or avoid that function completely. That seems like >> an odd design. > > What happens if a function that iterates over a directory finds a > subdirectory whose name is literally "~"? I think I must be missing something, because I don't think anything special should happen? (find-file "/tmp/~/foo") works fine, for instance. And (expand-file-name "foo" "/tmp/~") => "/tmp/~/foo" -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 16:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: larsi@gnus.org Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156269120318035 (code B ref 36490); Tue, 09 Jul 2019 16:54:01 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 16:53:23 +0000 Received: from localhost ([127.0.0.1]:34032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hktMo-0004go-SJ for submit@debbugs.gnu.org; Tue, 09 Jul 2019 12:53:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hktMn-0004ga-6f for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 12:53:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hktMe-0002c3-93; Tue, 09 Jul 2019 12:53:14 -0400 Received: from [176.228.60.248] (port=2512 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hktMZ-0007xA-A0; Tue, 09 Jul 2019 12:53:09 -0400 Date: Tue, 09 Jul 2019 19:52:52 +0300 Message-Id: <83v9wb40bf.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <83wogr40pc.fsf@gnu.org> (message from Eli Zaretskii on Tue, 09 Jul 2019 19:44:31 +0300) References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> <8336jf5grv.fsf@gnu.org> <83wogr40pc.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 09 Jul 2019 19:44:31 +0300 > From: Eli Zaretskii > Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de > > What happens if a function that iterates over a directory finds a > subdirectory whose name is literally "~"? Sorry, that's not what I meant to say. I meant to say how would a Lisp program know whether (expand-file-name "~/") means the home directory or a directory whose name is literally "~"? Btw, stuff like (expand-file-name "foo/~/") already does what you want, so the problem is only with the leading '~', and can be avoided if we avoid that situation. IOW, why should this example: (expand-file-name "~" "/tmp/") => "/home/larsi" determine how directory-files-recursively behaves? From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 17:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Eli Zaretskii Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156269162218812 (code B ref 36490); Tue, 09 Jul 2019 17:01:02 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 17:00:22 +0000 Received: from localhost ([127.0.0.1]:34048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hktTa-0004tM-6r for submit@debbugs.gnu.org; Tue, 09 Jul 2019 13:00:22 -0400 Received: from quimby.gnus.org ([80.91.231.51]:49696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hktTX-0004tC-1x for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 13:00:20 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hktTR-0007Lo-Vn; Tue, 09 Jul 2019 19:00:16 +0200 From: Lars Ingebrigtsen References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> <8336jf5grv.fsf@gnu.org> <83wogr40pc.fsf@gnu.org> <83v9wb40bf.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEUKDUgAAEsAAU36+ARM S0QAAE+ujyb//wAAAE3+/wjWxRnUA99JAAACNklEQVQ4jbXSQYvaQBQA4FFCK3sypYUcNegiPW3J krA5RXc6LZ5scMCjNdPZklMhxYAnIwbmuNBTb7aRCPmVfZNJXN312gdxzHy+vPG9oLvfL+JO7iE3 DHkRhnkRFnkBEeSw8jxDFtxk6nLlIr/LFTnx5fg/YOP7SxAxRMgFsD0ti6ML4IXPa8CVY0xevSge R3NdbzOtcJ7DTjeSZH4Vu+HhHIYSWnCgaE+yMzAEhKwRjbpPhOI9wEysA7hZDYVOnOOpvhoyJyFw 4BshfO1Qw6NQscZ8NBOztPdQwU9xGjSl00MFZXXRKj/TNKUTLVAwKLe+1yl0yr0HCUuMMSQtyu0+ pXQSu0HZK9nc4WZnqEcBFE5UQ/xD36knAfhZwfERkoYhjColiG9JDR/anxORrKEJAFpomzX8WUPG ZtQsy/sdTwGMdGG2NRKuVvNm3/fpxlSwul/x0FKpt32fUrOC5cmIIsZMUz4qsyzr1/lUbW8c5UiH QBrhYXauSDdUD990tNPJSpADlDHYdE8M6QPoJ4ULNPXNznG0bzH2MJ4ATBBu+NTUnAoYY5xxMsWe 6Gqe1zSvasCYzxmZcjaDsX4hDB1UjX4HaTAqzJmcN30f79XLoMtWz6A++ihPAbB4rUBK2Wz5ewnf PlVgXGPUkLtlRs9ZKGjo7SAuxgxpLeG/o+nE2akaNibQcCdys127t+/TrfO3ehMdq27qOHTng21c w9Mk4C8vzW18o8CCW5tzaLvMXBrXFfwDmRTVdnC3Ri4AAAAASUVORK5CYII= Date: Tue, 09 Jul 2019 19:00:13 +0200 In-Reply-To: <83v9wb40bf.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 Jul 2019 19:52:52 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Sorry, that's not what I meant to say. I meant to say how would a > Lisp program know whether (expand-file-name "~/") means the home > directory or a directory whose name is literally "~"? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Sorry, that's not what I meant to say. I meant to say how would a > Lisp program know whether (expand-file-name "~/") means the home > directory or a directory whose name is literally "~"? Well, we have documented that in expand-file-name "~/" means the home directory, and I have no problems with that. "~/" isn't something you'll ever get from functions like directory-files, so it's not something you'd feed to expand-file-name in these situations... > Btw, stuff like (expand-file-name "foo/~/") already does what you > want, so the problem is only with the leading '~', and can be avoided > if we avoid that situation. IOW, why should this example: > > (expand-file-name "~" "/tmp/") > => "/home/larsi" > > determine how directory-files-recursively behaves? expand-file-name's use case is to (basically) concatenate a directory name and a file name, but it's used instead of concat because nobody wants to care about whether the directory name has a trailing slash or not. (concat "/tmp/" "foo") => "/tmp/foo" ; Good (concat "/tmp" "foo") => "/tmpfoo" ; Bad. (expand-file-name "foo" "/tmp") => "/tmp/foo" ; Yay That's basically the use case for expand-file-name, and using it has avoided a lot of basic concatenation problems over the years (because Emacs allows sloppy handling of directory file names in most situations). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 17:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Lars Ingebrigtsen Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156269301029465 (code B ref 36490); Tue, 09 Jul 2019 17:24:01 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 17:23:30 +0000 Received: from localhost ([127.0.0.1]:34103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hktpx-0007fB-Gu for submit@debbugs.gnu.org; Tue, 09 Jul 2019 13:23:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hktpt-0007ex-O8 for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 13:23:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hktpo-0003Cf-BM; Tue, 09 Jul 2019 13:23:20 -0400 Received: from [176.228.60.248] (port=4537 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hktpm-0003GX-1a; Tue, 09 Jul 2019 13:23:19 -0400 Date: Tue, 09 Jul 2019 20:23:02 +0300 Message-Id: <83sgrf3yx5.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Lars Ingebrigtsen on Tue, 09 Jul 2019 19:00:13 +0200) References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> <8336jf5grv.fsf@gnu.org> <83wogr40pc.fsf@gnu.org> <83v9wb40bf.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de > Date: Tue, 09 Jul 2019 19:00:13 +0200 > > Eli Zaretskii writes: > > > Sorry, that's not what I meant to say. I meant to say how would a > > Lisp program know whether (expand-file-name "~/") means the home > > directory or a directory whose name is literally "~"? > > Well, we have documented that in expand-file-name "~/" means the home > directory, and I have no problems with that. Documenting a problem doesn't necessarily solve it. E.g., it is also documented that you must quote file names with special characters, but you still raised the objection that the "~" use case makes that "odd". I'm saying that the "~/" use case is "odd" as well, and for the same reasons. > "~/" isn't something you'll ever get from functions like > directory-files That's sheer luck, because: (file-name-as-directory "~") => "~/" So just running "~" through an innocent API gives you a "magic" directory name (if you consider "~" not "magic" by itself). How is this different from the "odd" use case where one must quote "~" to avoid its interpretation as the home directory? Who can guarantee that some day directory-files-recursively will not want to do something like the above? If it does, we will be right back at the same problem. I say we should fix this problem in a way that isn't fragile, and doesn't crucially depend on what the current code does or avoids doing. > > Btw, stuff like (expand-file-name "foo/~/") already does what you > > want, so the problem is only with the leading '~', and can be avoided > > if we avoid that situation. IOW, why should this example: > > > > (expand-file-name "~" "/tmp/") > > => "/home/larsi" > > > > determine how directory-files-recursively behaves? > > expand-file-name's use case is to (basically) concatenate a directory > name and a file name, but it's used instead of concat because nobody > wants to care about whether the directory name has a trailing slash or > not. Ah, but when the file name begins with a "~", the "concatenation" does more than what meets the eye. > That's basically the use case for expand-file-name, and using it has > avoided a lot of basic concatenation problems over the years (because > Emacs allows sloppy handling of directory file names in most > situations). I think this is a simplification. It ignores the fact that expand-file-name interprets ~/, it ignores the fact that it does arbitrary stuff for "remote" file names, it ignores the fact that on Windows it prepends the drive letter if there isn't one already, etc. IOW, expand-file-name is concatenation-like, but it has a few tricks up its sleeve, and in this case the trick works against us. We need to disable that trick to support files and directories whose names begin with a literal "~". I see no way around that. From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 18:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Eli Zaretskii Cc: 36490@debbugs.gnu.org, Lars Ingebrigtsen , erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156269623425676 (code B ref 36490); Tue, 09 Jul 2019 18:18:01 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 18:17:14 +0000 Received: from localhost ([127.0.0.1]:34156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkufy-0006fo-5g for submit@debbugs.gnu.org; Tue, 09 Jul 2019 14:17:14 -0400 Received: from mout.gmx.net ([212.227.15.19]:40531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkufv-0006Yy-7p for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 14:17:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1562696218; bh=4CKxaXweJ7Tgd74cYvtIbDyFqHcrpU3a6NIaIJoDJzw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=fOEe/Y0Au8BSX8YSium9q8ZIBt6jeVeA4iVIQoYaIEFallkvNkWjLIHNV88cd9BBe QEoa8UJcqFEVqDZUcfeHs2uma6F2EinuyGpSojwj7wHe/aiU3IWKodFL1ATtzdCqR3 h5TozFKz1E7ZFMypasvajg7gW36K6rQS5Lv4ItOQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.86.47.249]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MTiU3-1hv3At2PwD-00U67J; Tue, 09 Jul 2019 20:16:58 +0200 From: Michael Albinus In-Reply-To: <83sgrf3yx5.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 Jul 2019 20:23:02 +0300") References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> <8336jf5grv.fsf@gnu.org> <83wogr40pc.fsf@gnu.org> <83v9wb40bf.fsf@gnu.org> <83sgrf3yx5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Date: Tue, 09 Jul 2019 20:16:56 +0200 Message-ID: <87v9wb9ip3.fsf@gmx.de> MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:84OTjjapyuj+8L6Xop5HRCTBc5vP5d86U/vF8XeK6q7rQdzmvWC s+Fo9QQLXQoUvCwVZRY+6mnzG5zW6evtPi6P6//1sAdQ6+bfzEPzZCJktuQqmONRwWooDCa xoQOBG8n7teiLO+HLrg84ncSoR6vWu13tpHNov0IXIoybQzGJgnt/JHk0QkbcRaoP62sOCT OOPtRPF++YjmWXSM+M6YQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Ahca0od+tBI=:9ssMw6e1yGJKBjoUfu0Pr1 uuQI1kqStMxJaqcUCayjHhO4V4AidrH4i4CrUfinvzbqLY9yp95vYYCB65Cp1sjwPDIyt/mjZ cLw2l2Ko7/sPvkyuQk96jh5yagf1yeS8hmXpKAh/CLBI2Eub64kPv0+3FYGuJFshGJVha4MVR WjAxGC8s5TEpDj5FJuB9xMMBmFK2RMsTfReKVlKwMvm+cbTZ0RuQ32tS35+xzKF1B1c37g6c6 +/gf1BOP6uf1HZsqWp4MNSJ+P/jqibea6kipuxfXnWt/piOUSKuS6ZThswt5JceBAB7ANlWao zsjrp4gnYpAVwGQF8ai2ud3aS8gl4j/OpvsEbW32+zaLzSXvkj1Q1vMJjrN2H1nLlfH/+zppN db/fhEXJWohSDe3RVy2n2y+gtkzPhddXmOrnpqU73eNHp05+cytCMcv3pAKKxBJ8BvZ8jZxcR 1Ql4SWClePkZTdL0vZwDNbsbvoJpBiK0F7iKoro+qWEFvNxv18skRoiVMwDyWIFlaPrDhASeJ rnipnG2sXfdoTC3SGchGqnd1IUlnISLeUnMNi6cMMZjpum+4QVxSEFbFyVhKqMYlG/NJhXiIV IOv33TaCa1itZ4LMCZWp4i65kGVFjDWtwVbEM/7kXv8vffrXjiZbeSxb28iJNaycIrArZmzOa p86YM7/Won2Y6P42RUgB0tKZQ/Wps768JV3UtZLcx+nisnLyvro3KSgki0+bcFXVhHUq3xp4u Chht12QTEkXUi33JaDyP78EmAsnPfvF7XGVRS7sZBDDXrZbi06XmN2x8tFO1Ea5VxvSFN8hj8 Xm8RMlwb+PKW8umE0Py4dMFE0zv/dKHVRaEWxCXzgTeuK1SOG+ZTVxofl3uO902AVR90PUNub 6zrQdIy2IevMMuxJxI1wajfLJsxRs/AZx1yzJCFY9KzPnXzfmaxltvD1W6xLjPLXQsKqR1J6Y rRzovBVURLWxyvNhCEVyN8TKFcRk1gCjNrF64kHCtOrZ2q9rrVkGwKuBf0VEzC6k61627OKu2 NLdiJhRO7B5est9tU1Ic8I4jERjYpFqbzTfSJsHeJ675/4KZhcoobUsb/ng6g2jvd5DfLCbza uQos8CsT40RsV9aeq7g5KQQjQ57cLLftlfL X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> expand-file-name's use case is to (basically) concatenate a directory >> name and a file name, but it's used instead of concat because nobody >> wants to care about whether the directory name has a trailing slash or >> not. > > Ah, but when the file name begins with a "~", the "concatenation" does > more than what meets the eye. > >> That's basically the use case for expand-file-name, and using it has >> avoided a lot of basic concatenation problems over the years (because >> Emacs allows sloppy handling of directory file names in most >> situations). > > I think this is a simplification. It ignores the fact that > expand-file-name interprets ~/, it ignores the fact that it does > arbitrary stuff for "remote" file names, it ignores the fact that on > Windows it prepends the drive letter if there isn't one already, etc. > IOW, expand-file-name is concatenation-like, but it has a few tricks > up its sleeve, and in this case the trick works against us. We need > to disable that trick to support files and directories whose names > begin with a literal "~". I see no way around that. For the records, I second Eli. See also the discussion in bug#16984. And yes, I believe it makes sense to quote file names (suppress special meaning of "~") in the loop of directory-files-recursively. Best regards, Michael. From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 18:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Eli Zaretskii Cc: 36490@debbugs.gnu.org, Lars Ingebrigtsen , erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156269870914640 (code B ref 36490); Tue, 09 Jul 2019 18:59:02 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 18:58:29 +0000 Received: from localhost ([127.0.0.1]:34210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkvJt-0003o4-84 for submit@debbugs.gnu.org; Tue, 09 Jul 2019 14:58:29 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43215) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkvJr-0003nr-FG for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 14:58:28 -0400 Received: by mail-wr1-f65.google.com with SMTP id p13so3000553wru.10 for <36490@debbugs.gnu.org>; Tue, 09 Jul 2019 11:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Er+Qk+UECR5NCugn5eWQVcq8gvpGG0xEIehbznYWFEU=; b=bKqE59DSogH4w/Rs7n8HoU5T9RjwI/A5fHTq8yWLvr4BUArFyb2K9fxnvtUAnUGBUE sc6VOpZE/nJz+5ZJqpFZqT8GV5eP00ar5rkzU3AGaBvoJrTmYOv/RNdrCXT+r9NpCgkh xEZYGLRrYxqMtF+T05fnNLTGOmUYIoBZ5Wp+B6+DV67GLBr8avq1MvGudEA/hQLznIsD 0xO4kjtxUJisBE2Yb3pImZUBE3+kzJyTJTV2leTaXY59vBwtnT3NDgA3p1i9WLv7bF57 XFrjkElm++6C7aUNSjqO5uof5TQNBkNwecX+MdIup2gzPlrWb+UhBszOUd8adSLZH9eq EMXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Er+Qk+UECR5NCugn5eWQVcq8gvpGG0xEIehbznYWFEU=; b=E+QhRZ7Eard54PID1Q+kLEhUUn+6bhoiAXCBxrSTXUYISf8mRZ74zY7FdkvWH6diMi soy8+SYI1r202ihbqpeVbVGskjOnYiT1VKUIzVdzjqTHNmcfd468ZGqbs0lwcyPJqE99 cyjg4tZyDBLSEGSMmvrwJZ4ztAoTp+GaDiUi7+4x5eZg8xrPKKy3dpRhE3y7UpmhDNoe rHDBCDrErlslwrbNLG3Uz+87HbozI7+RD3loJkgRRQZL4uSkdGkdtSrKITeovhNB658O /zPtrX7zaeH0n2H+OVl/O4DeD2jgBRcfPxDLpb5GQQWZEovKFKmXqH/Ffcnk38EgP/S/ UV0A== X-Gm-Message-State: APjAAAWMkd5f3EhKA8ahIUqgEeo6ORT7kC+QG4w8REugu04PZv9oeZbV hvz8WS0MTN7OBtCKIVsqB8QO4Q== X-Google-Smtp-Source: APXvYqxXI69HlTTCux8s1r2krNx3J1G0ALn4xOXctJaoEg9/wVlIuMXnptf/AKw/Vr+lwBk80n97HQ== X-Received: by 2002:a5d:45d0:: with SMTP id b16mr26436544wrs.209.1562698701289; Tue, 09 Jul 2019 11:58:21 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id v5sm24844769wre.50.2019.07.09.11.58.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 09 Jul 2019 11:58:20 -0700 (PDT) From: "Basil L. Contovounesios" References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> <8336jf5grv.fsf@gnu.org> Date: Tue, 09 Jul 2019 19:58:18 +0100 In-Reply-To: <8336jf5grv.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 Jul 2019 19:12:04 +0300") Message-ID: <87a7dn2fxx.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> From: Lars Ingebrigtsen >> Cc: erik_hahn@gmx.de, 36490@debbugs.gnu.org >> Date: Tue, 09 Jul 2019 17:50:49 +0200 >> >> > If you want "~" to be interpreted literally, you need to pro [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnus.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.65 listed in list.dnswl.org] 1.3 PDS_NO_HELO_DNS High profile HELO but no A record X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) Eli Zaretskii writes: >> From: Lars Ingebrigtsen >> Cc: erik_hahn@gmx.de, 36490@debbugs.gnu.org >> Date: Tue, 09 Jul 2019 17:50:49 +0200 >> >> > If you want "~" to be interpreted literally, you need to protect it >> > with "/:". >> >> Sorry; I don't quite follow you here. The doc string says that "~/" is >> interpreted specially. There's no "/" in "~". :-) > > But it does NOT say that "~" will NOT be interpreted specially. Indeed it explicitly says that "~" will be interpreted specially: Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative (does not start with slash or tilde); both the directory name and a directory's file name are accepted. So AIUI (expand-file-name "~") should be equivalent to (directory-file-name (expand-file-name "~/")). -- Basil From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 19:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: "Basil L. Contovounesios" Cc: 36490@debbugs.gnu.org, larsi@gnus.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156270000916897 (code B ref 36490); Tue, 09 Jul 2019 19:21:01 +0000 Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 19:20:09 +0000 Received: from localhost ([127.0.0.1]:34292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkveq-0004OT-QI for submit@debbugs.gnu.org; Tue, 09 Jul 2019 15:20:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkven-0004Ns-Sa for 36490@debbugs.gnu.org; Tue, 09 Jul 2019 15:20:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hkveh-0002G2-WF; Tue, 09 Jul 2019 15:20:00 -0400 Received: from [176.228.60.248] (port=3784 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hkvef-00055A-Ul; Tue, 09 Jul 2019 15:19:58 -0400 Date: Tue, 09 Jul 2019 22:19:43 +0300 Message-Id: <83imsb3tio.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87a7dn2fxx.fsf@tcd.ie> (contovob@tcd.ie) References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> <8336jf5grv.fsf@gnu.org> <87a7dn2fxx.fsf@tcd.ie> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Basil L. Contovounesios" > Cc: Lars Ingebrigtsen , 36490@debbugs.gnu.org, erik_hahn@gmx.de > Date: Tue, 09 Jul 2019 19:58:18 +0100 > > So AIUI (expand-file-name "~") should be equivalent to > (directory-file-name (expand-file-name "~/")). And that's exactly what it does. From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jul 2019 11:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Eli Zaretskii Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.15627597423888 (code B ref 36490); Wed, 10 Jul 2019 11:56:02 +0000 Received: (at 36490) by debbugs.gnu.org; 10 Jul 2019 11:55:42 +0000 Received: from localhost ([127.0.0.1]:34950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlBCI-00010e-2E for submit@debbugs.gnu.org; Wed, 10 Jul 2019 07:55:42 -0400 Received: from quimby.gnus.org ([80.91.231.51]:36322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlBCF-00010V-Qr for 36490@debbugs.gnu.org; Wed, 10 Jul 2019 07:55:40 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlBC9-0008O6-JJ; Wed, 10 Jul 2019 13:55:36 +0200 From: Lars Ingebrigtsen References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> <8336jf5grv.fsf@gnu.org> <83wogr40pc.fsf@gnu.org> <83v9wb40bf.fsf@gnu.org> <83sgrf3yx5.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEXu5+aupJbBtq/NxsqU TDijmo8qFhV9MR2GdnCXjoeskUAIAAACPUlEQVQ4jXXTP3PTMBQAcN3xBaIcunO22qFDtzSGO1Y4 Ne5YAyrSSK/IZoXghrEQN9JWAybSt+U92U4Tjr6hg355f+TqEW79LloxBGVkAOEFnjMKIXJKEZwx RlhrajyAeMr5Dpww1kIFSsdJnC35q5jwoXJO8fdJAqAznhDeioe+AZ5xrRGE8GYImCEfP890EUC5 cLge9B1fLHkKAAlra/Yiu+FnAMptdOm7QiEM5/w1gDeVtg5H7q/v1pxPETa68BvrbQ/qm42nKYC7 06VafOrKY6L5fUSezAiHSh/UnTdQgGNnW8sRgeBwnSvlYzmMVIrobYqlMgDfzFn3jdX2WkS/AlSY 8WZ23P8nZNFG9ySFHusAZKKEsrIVUSGiC5KS0DyAb9+Xf74yhK45gkDw2/PLMxoV+SEcC5Uttz7/ H1S6UO1hKehx0joN4F3RyqP9jBMLoGkYtwOHMCaRgblLCs2bfYAeHjJKFqY6BOF1VQqA9h9QXuuP ef4IiAZhNMBnBNcCyBrh4hBspWu3B7KHO13pqlq58Nn34CVcr8huzk3RyAM4hd1o4FXL66ZvLhcB 5mE1aOxW+cNUVyJP4w6oM8PN8SMy9X0H7W00DY8BoHxxaRjt9oxKIzuQG63H0ggmWKDIeBJKxZDy ZVL3G4XFfnSQTGANTuHxhD3EWqMeMOWWsZYyWHJGRUM6mM4nJlsZX4dKdc5GA6TDg8YttGI828E8 iRmsM26Z/5n25wgQ8GcOK56EG+zDQcweg5D1F5yrYYQWPlurAAAAAElFTkSuQmCC Date: Wed, 10 Jul 2019 13:55:33 +0200 In-Reply-To: <83sgrf3yx5.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 Jul 2019 20:23:02 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> "~/" isn't something you'll ever get from functions like >> directory-files > > That's sheer luck, because: > > (file-name-as-directory "~") > => "~/" > > So just running "~" through an innocent AP [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> "~/" isn't something you'll ever get from functions like >> directory-files > > That's sheer luck, because: > > (file-name-as-directory "~") > => "~/" > > So just running "~" through an innocent API gives you a "magic" > directory name (if you consider "~" not "magic" by itself). How is > this different from the "odd" use case where one must quote "~" to > avoid its interpretation as the home directory? Who can guarantee > that some day directory-files-recursively will not want to do > something like the above? If it does, we will be right back at the > same problem. Well... That kinda sounds odd to me. "~/" is not, and never will be, a valid file name in any OS that Emacs is going to support from now on. So having that have a special meaning in `expand-file-name' is not surprising. Having "~" do something special is surprising. But changing that is probably not going to happen, so how about just clarifying the documentation in that function to say what "~" means explicitly instead of the caller having to guess? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jul 2019 12:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Erik Hahn Cc: 36490@debbugs.gnu.org Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.15627602894747 (code B ref 36490); Wed, 10 Jul 2019 12:05:02 +0000 Received: (at 36490) by debbugs.gnu.org; 10 Jul 2019 12:04:49 +0000 Received: from localhost ([127.0.0.1]:34960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlBL6-0001EV-Nf for submit@debbugs.gnu.org; Wed, 10 Jul 2019 08:04:48 -0400 Received: from quimby.gnus.org ([80.91.231.51]:36374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlBL4-0001EK-Cg for 36490@debbugs.gnu.org; Wed, 10 Jul 2019 08:04:47 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlBL0-0008RT-KT; Wed, 10 Jul 2019 14:04:44 +0200 From: Lars Ingebrigtsen References: <87muhvyotd.fsf@gmx.de> Date: Wed, 10 Jul 2019 14:04:42 +0200 In-Reply-To: <87muhvyotd.fsf@gmx.de> (Erik Hahn's message of "Wed, 03 Jul 2019 20:07:26 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Erik Hahn writes: > Call (directory-files-recursively DIR ".*") where DIR contains a > subdirectory named "~" but is not the parent of your home directory. The > function will recurse into your home directory. This is [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Erik Hahn writes: > Call (directory-files-recursively DIR ".*") where DIR contains a > subdirectory named "~" but is not the parent of your home directory. The > function will recurse into your home directory. This is probably because > (expand-file-name "~" ...) returns the home directory. This is now fixed on the trunk. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 10 08:04:52 2019 Received: (at control) by debbugs.gnu.org; 10 Jul 2019 12:04:52 +0000 Received: from localhost ([127.0.0.1]:34963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlBLA-0001En-07 for submit@debbugs.gnu.org; Wed, 10 Jul 2019 08:04:52 -0400 Received: from quimby.gnus.org ([80.91.231.51]:36388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlBL8-0001Ef-IO for control@debbugs.gnu.org; Wed, 10 Jul 2019 08:04:50 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlBL6-0008Rc-3R for control@debbugs.gnu.org; Wed, 10 Jul 2019 14:04:50 +0200 Date: Wed, 10 Jul 2019 14:04:47 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #36490 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 36490 fixed close 36490 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 36490 fixed close 36490 27.1 quit From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jul 2019 14:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed fixed To: Lars Ingebrigtsen Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156277064015905 (code B ref 36490); Wed, 10 Jul 2019 14:58:02 +0000 Received: (at 36490) by debbugs.gnu.org; 10 Jul 2019 14:57:20 +0000 Received: from localhost ([127.0.0.1]:36398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlE24-00048R-1z for submit@debbugs.gnu.org; Wed, 10 Jul 2019 10:57:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlE22-00048D-Ef for 36490@debbugs.gnu.org; Wed, 10 Jul 2019 10:57:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hlE1w-0005rH-Ld; Wed, 10 Jul 2019 10:57:12 -0400 Received: from [176.228.60.248] (port=3750 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hlE1t-0000Hy-Sr; Wed, 10 Jul 2019 10:57:10 -0400 Date: Wed, 10 Jul 2019 17:56:57 +0300 Message-Id: <83a7dm3pl2.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Lars Ingebrigtsen on Wed, 10 Jul 2019 13:55:33 +0200) References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> <8336jf5grv.fsf@gnu.org> <83wogr40pc.fsf@gnu.org> <83v9wb40bf.fsf@gnu.org> <83sgrf3yx5.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de > Date: Wed, 10 Jul 2019 13:55:33 +0200 > > > (file-name-as-directory "~") > > => "~/" > > > > So just running "~" through an innocent API gives you a "magic" > > directory name (if you consider "~" not "magic" by itself). How is > > this different from the "odd" use case where one must quote "~" to > > avoid its interpretation as the home directory? Who can guarantee > > that some day directory-files-recursively will not want to do > > something like the above? If it does, we will be right back at the > > same problem. > > Well... That kinda sounds odd to me. > > "~/" is not, and never will be, a valid file name in any OS that Emacs > is going to support from now on. I don't think I follow you. "~" is a perfectly valid name of a directory, and Emacs does support such names in general. So I don't think I understand why you are saying this will not be a valid file name. What did I miss? > But changing that is probably not going to happen, so how about just > clarifying the documentation in that function to say what "~" means > explicitly instead of the caller having to guess? I don't object to documenting this. From unknown Sat Jun 21 05:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jul 2019 15:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed fixed To: Eli Zaretskii Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.15628575625040 (code B ref 36490); Thu, 11 Jul 2019 15:07:01 +0000 Received: (at 36490) by debbugs.gnu.org; 11 Jul 2019 15:06:02 +0000 Received: from localhost ([127.0.0.1]:38382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlae0-0001Iy-Bi for submit@debbugs.gnu.org; Thu, 11 Jul 2019 11:06:02 -0400 Received: from quimby.gnus.org ([80.91.231.51]:56442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hladv-0001Im-9L for 36490@debbugs.gnu.org; Thu, 11 Jul 2019 11:05:58 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hladq-0004hu-4W; Thu, 11 Jul 2019 17:05:52 +0200 From: Lars Ingebrigtsen References: <87muhvyotd.fsf@gmx.de> <87zhlo1bfl.fsf@mouse.gnus.org> <83bly35igd.fsf@gnu.org> <8336jf5grv.fsf@gnu.org> <83wogr40pc.fsf@gnu.org> <83v9wb40bf.fsf@gnu.org> <83sgrf3yx5.fsf@gnu.org> <83a7dm3pl2.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUIBQUHBQQGAwPT8oPL aLpVL0IJBwe4mHoHBAQFAgJ0MKEkAAACbElEQVQ4jVWUPW/bMBCGjwFCcNR5ENzN4hBQs2H4DyjV WqCS05EBHCadHUcrTcAGvRWawn/bIyUZ8sEfIB+990kKTDStvAwhfIsiQ0SjaQt4BB9euF7K8sQQ c8xZBKsIhHOlkh5oOzOvnp7WAIYbACtccZUKkykEcQViRgDDPAUrFvnr4pIBBJAXzVjGHg9rsg3g mEwJ0lqB5zztrzcc39rWaE2uEMC7/e+0v95qbNv2V8a8peAPsmjWI+AMM0oZr0+gV1o8VYebAnHR I8IFrFf+XE+Ap3xLtAZ6F4p93Y0AMAQpe08xnO9lcwMGf1DPKCEA4cunqu4O621HVrV/YwyIWXn1 eAOfVfW8pCDwwQGc2BPoJlD9kacFFUEC39yBn2yhLtRBKS+06rrDBJ61XloC3p9pVc+BclasyNm+ SpIJVJB5SwUa3VRJclN8WFjqOPPq3mrqb0szh8e73S7ZUVMd3DQzMoBdPAfAmzvJ10t3jMcHBMxB kuwi8FY0t6epi93xJQpIwSfFELg+JgEpvGrmcT8pQjq78NA380y7OgkMaGdHMM79fUftMLElY4xu HC+54ukagJ9Akmy7MTjVfgdiQ4YY/A5sbwUKr+dg6GEEdupVCr4dmxjrAD1Ld6zlmFxBKsi8D9lu hlVUGLiqa/jOB/DFJyCkCtKVWLwPpzfT2dBEUfaylAVb5HSttjvMciNsVDgp5T8XeonZW2uWeEK6 AQRcGQJ9HHlblVI5RNbboe2hL3tlgekHtvQ24+g5JQAFuVJOKU+3ZcnovZGRL5oUhJ4ul1rFgWmj vfNCyuQqJCvjjyrTP31PJ/MfKLtSOTzMvLkAAAAASUVORK5CYII= Date: Thu, 11 Jul 2019 17:05:49 +0200 In-Reply-To: <83a7dm3pl2.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 10 Jul 2019 17:56:57 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> "~/" is not, and never will be, a valid file name in any OS that Emacs >> is going to support from now on. > > I don't think I follow you. "~" is a perfectly valid name of a > directory, and Emacs [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> "~/" is not, and never will be, a valid file name in any OS that Emacs >> is going to support from now on. > > I don't think I follow you. "~" is a perfectly valid name of a > directory, and Emacs does support such names in general. So I don't > think I understand why you are saying this will not be a valid file > name. What did I miss? "~" and "~/" are not the same thing in any OS that Emacs is currently supporting. The first is a file name (including directories, which are just files), while the second is a file name with a slash after it. Inside Emacs, though, things are different. >> But changing that is probably not going to happen, so how about just >> clarifying the documentation in that function to say what "~" means >> explicitly instead of the caller having to guess? > > I don't object to documenting this. OK; I'll do so. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no