From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: master e315544: ; * src/fileio.c (Fdirectory_append): Doc fix. Date: Sat, 24 Jul 2021 21:04:00 +0200 Message-ID: <87zgubmt3z.fsf@gmx.de> References: <20210724171858.1726.43078@vcs0.savannah.gnu.org> <20210724171900.4A26D20D0A@vcs0.savannah.gnu.org> <87h7gjo8sh.fsf@gmx.de> <871r7n1r6a.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23249"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 24 21:04:56 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m7MxE-0005iY-98 for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Jul 2021 21:04:56 +0200 Original-Received: from localhost ([::1]:41296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7MxD-0004cc-AU for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Jul 2021 15:04:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7MwQ-0003YV-7Y for emacs-devel@gnu.org; Sat, 24 Jul 2021 15:04:06 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:60943) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7MwN-0003aR-UM; Sat, 24 Jul 2021 15:04:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1627153441; bh=XsDqcwwXj2LprqCrROB/Qg8ocAB5m3oYlsWxnf2F4lM=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=HoO/U9LaBjx8gWE1l/L3R99lccLREPBoZnYAjafNenuNFMi4F9NNLT467LCC1lo19 Dumgqfcy02Tg/KyXlM5jYuyJ5LaK++UXDVBH1w88fx/kmD4dCEh1+b5tpa2baCE9gu 6sFcFfK9pkVPbYNhrMRCa8r7y5AmE9QbEM59pUS0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.149.95]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MNswE-1lj7zl1nlw-00OITK; Sat, 24 Jul 2021 21:04:01 +0200 In-Reply-To: <871r7n1r6a.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 24 Jul 2021 20:51:25 +0200") X-Provags-ID: V03:K1:tttGu4/pQVXiEA45wH2ScOyHBNkU2fNcKXuqCMdJCxHV+zk5jCE FOaNhhd09DGrVeT6jOXn50ohMwPR0ahVUEF4ZUSNtljC85ecBpzKjaWlUlD9p3bw9ZCQ0qo zMiIDeg9CXf48d+pxUpMDitQ43BRY+pu/uqxFUlBzkzRhVywBX3vxiovsoW3ktnRxgh4g4Y iDgUA8Z2+CqAUe5bZtxZg== X-UI-Out-Filterresults: notjunk:1;V03:K0:ZNhEfU7Wom4=:UKETZdQ5X89cSlXcQE/leB cAKk1xD1dmpgJ1r2HangiXAKrvH+7XO0tDx/bQEclOPMRhoU4A7K+B7SqPuxmsrlSJpweAUTE CJMSIrJPvPxwKdGJ0FhyfNJubMU+i3okn/kai6ftnaAWruwbNoUwPMp2dU1NRGRnTZesifPKj m6iwvWCbtv/l37U/G57+7bhgUGOjwlMqAqFQGO0/ia2WSD0blPt3NGvQ3g8ROOEMyGZ8ij3bo WUMOV1XWYOplO7g5zd8flbZmxRVzC4KrDruEi8YKOcPzXsuhsitAWywUYwVILb1vB8z3Z4OJm 4I28xwkTUHhi9Z1veTe6YORX5DR8ZePioablB8StpDYo0jgiWDqHY1PrCJNIhUiIjRxas0Q15 pkrQpu6fEFTOklPPibCiGm3j686ZyfJfyk+2aUce55xZ6Efa4OC6c+dLxm47HYU/4XVqW6V70 tdTYcrajoxfWJ4INN2Mx02WUvaCCHs6oQ3cd3bK8tEQf8m7vz+QrqPHqvqmXVuRIecJbUHGr7 SdzaaYOwOCzCBArcWj3Q+ZhbfHrh2Xixt0lw83eNNrrk7H5H0XGro3sxXH+nWx12d7qSptTkk z9GoyFxzzD7jK6rcXaEXlESdcJj57ApcnvrWnb84Kv/axCB5w20lCaoUkoNXTPVNDYFZNsuMK VmNwDS4aXuIR5qnk5JLOraJyfSFyhjHVF4xfCC4FirJjPYcrLVfNyQdoKMWUf+Kgnr6LAywRb BEOoPutJv0YVI77pCLteJuvcLxo/qtDxfIoJ+KvBvn0dg/FUA+LCO+DzB0hhs2Geb8TFnnws Received-SPF: pass client-ip=212.227.15.19; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271575 Archived-At: Lars Ingebrigtsen writes: >> FTR, I believe COMPONENTS might also contain nil elements, which should >> be ignored. > > I'm not sure I follow. You want to extend the interface to allow nil > elements? I'm not sure that would be very useful? It's rather a nice to have. Sometimes, I have a list of file name fragments, and I hope to avoid the checks for being non-empty strings ... But I can do this in my code. >> Furthermore, we have >> >> (directory-append "foo/" "/bar") => "foo//bar" >> >> I would expect "foo/bar", meaning that all leading slashes in COMPONENTS >> are removed. > > Well, I think that's over into DWIM-land again (which is what > expand-file-name does, and this function deliberately doesn't do). expand-file-name and file-name-as-directory are functions which call a handler, for example Tramp. directory-append is much cheaper, and if it could do this string handling, I could avoid those functions. It would be more performant. Best regards, Michael.