From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" Date: Tue, 09 Jul 2019 20:16:56 +0200 Message-ID: <87v9wb9ip3.fsf@gmx.de> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="214683"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 36490@debbugs.gnu.org, Lars Ingebrigtsen , erik_hahn@gmx.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 09 20:18:24 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkuh3-000taV-7K for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 20:18:21 +0200 Original-Received: from localhost ([::1]:52654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkuh1-0007So-Ot for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 14:18:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55426) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkugs-0007Sf-8J for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 14:18:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkugn-0005mQ-Ea for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 14:18:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53568) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkugj-0005ks-VH for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 14:18:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkugj-0006y8-Ps for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 14:18:01 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 36490-submit@debbugs.gnu.org id=B36490.156269623425676 (code B ref 36490); Tue, 09 Jul 2019 18:18:01 +0000 Original-Received: (at 36490) by debbugs.gnu.org; 9 Jul 2019 18:17:14 +0000 Original-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 Original-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 Original-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 In-Reply-To: <83sgrf3yx5.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 Jul 2019 20:23:02 +0300") X-Provags-ID: V03:K1:84OTjjapyuj+8L6Xop5HRCTBc5vP5d86U/vF8XeK6q7rQdzmvWC s+Fo9QQLXQoUvCwVZRY+6mnzG5zW6evtPi6P6//1sAdQ6+bfzEPzZCJktuQqmONRwWooDCa xoQOBG8n7teiLO+HLrg84ncSoR6vWu13tpHNov0IXIoybQzGJgnt/JHk0QkbcRaoP62sOCT OOPtRPF++YjmWXSM+M6YQ== 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 Chht12QTEkXUi33JaDyP78EmAsnPfvF7XGVRS7sZBDDXrZbi06XmN2x8tFO1Ea5VxvSFN8hj X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162536 Archived-At: 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.