From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.bugs Subject: bug#43961: read carefully: dired-file-name-at-point vs dired-filename-at-point Date: Tue, 13 Oct 2020 12:58:10 +0200 Message-ID: References: <20201012142522.m24zmrzzuiiao4ck@E15-2016.optimum.net> <20201013040807.xk2q54jnquthda7y@E15-2016.optimum.net> <87blh667zs.fsf@gnus.org> <20201013102511.5nuu3p3dcyr6poft@E15-2016.optimum.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8477"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 43961@debbugs.gnu.org, Lars Ingebrigtsen , Richard Stallman To: Boruch Baum Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 13 13:16:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSIHs-00024t-Iy for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Oct 2020 13:16:12 +0200 Original-Received: from localhost ([::1]:35516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSIHr-00033h-Ei for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Oct 2020 07:16:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSI1G-0000bu-Qj for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2020 06:59:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33775) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kSI1G-0006TH-Hv for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2020 06:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kSI1G-0006Eb-Gj for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2020 06:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Arthur Miller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Oct 2020 10:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43961 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 43961-submit@debbugs.gnu.org id=B43961.160258670423918 (code B ref 43961); Tue, 13 Oct 2020 10:59:02 +0000 Original-Received: (at 43961) by debbugs.gnu.org; 13 Oct 2020 10:58:24 +0000 Original-Received: from localhost ([127.0.0.1]:45321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSI0d-0006Di-Ok for submit@debbugs.gnu.org; Tue, 13 Oct 2020 06:58:24 -0400 Original-Received: from mail-db8eur06olkn2013.outbound.protection.outlook.com ([40.92.51.13]:60525 helo=EUR06-DB8-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSI0Y-0006DR-EE for 43961@debbugs.gnu.org; Tue, 13 Oct 2020 06:58:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cC4SXLQ1BwDwPKorTyNFIqtuDlW2Q6ZDGr+B7tb1AUJVwuBBUVH7YabaYBAhDp3eswQsYNpg9e4NS8X7SxAypKcYTVcy/HglY33x/TC+azdEsujNH5OZs5oIOwGHpC0aXeVuF4cAl/zQgsZ9aMtBKUtmtBNI1FP4Rf62C3edID7mR1AxPseqC/y3FER3+iL3hPjERYQ7ODWNqXE4Kpu9t5FIQ6fYOl5aIJiJufj3HAmzkVq+tjWMp7j28CuFA3RKQpFSqlFAjyytjSLuZQWei4oQ4vN6doB3+DIveCS6b9pOO0bu71jIie3irneuwqmDU/kjq8fEJx5dAPY2eapaOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+pNR6/62nrY00VynwRTBynuglqnmf+uw2g5z+YEvtL0=; b=NisW8uJKnU8GHOBTaCpFUkReeACUr83dFRgcbSQY7WIyXSQVGrYNqFGePFT9rgfQ17Pvjn9JXYxtXVLkjNYE5TawEpozCbuxCVMWVbCQxSCYG1IJ0OQk57KkLm9ChniZC5EXZI2IA4krywOLau3/YAE5lcLbqK2SQC5HWrfwFIM98AgLWbPx2x2YViebpsjeSp/VsvVvcYaQblRjwPIbZXj0Pystm9Pa6SDY62D7jmE4dEhkOOYxP4e/uOsv149zoo1HleVLWB9+gNUvf4hygPLVg/2Zb9SY5Nvs3AcOITF9VthA9vPvG00aoTcThuTKji8duF8CeWIvAnXP7ds4tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+pNR6/62nrY00VynwRTBynuglqnmf+uw2g5z+YEvtL0=; b=Grym2c1uWX2ck6tVLXZ54RtS/N5P3XV5YRaxwmSCRY1byx1WK7pJJI0QYs3fI/7T9CyO/Bo1wya9Yo1RzhP8p+E92BBfKq3H09vezagN+FjrHEMmse+kawObEDjyJhYNRR3WxFjggrZWIHPGGKP1hNmT7Pfo4Jmyks1/1WWo0tWbVyBuK7/Xm5+YfV9FoPNZDlZitkOtpzcU31QndYLTr3lEEXMeRp5rBsTOTjjyLphsoJh0tgXKgdfacRMjvZERgp2KVL1PRrCfT0nHmdXm2fObNuC/MMaKRyLxvfFeNDKROqJShUEsVD6KywEgCDmKTslzcjC3dOdZYjhxOlXfBg== Original-Received: from AM7EUR06FT049.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::4d) by AM7EUR06HT107.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.23; Tue, 13 Oct 2020 10:58:11 +0000 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com (2a01:111:e400:fc36::45) by AM7EUR06FT049.mail.protection.outlook.com (2a01:111:e400:fc36::457) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.23 via Frontend Transport; Tue, 13 Oct 2020 10:58:11 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:1EFB3571C9D87A96B4577D9C2F4772B26B06183C69569622D9F29CF5B3073019; UpperCasedChecksum:31062AE4E042B2CC2469188622079468320C72D9763346657E1D392CD470C923; SizeAsReceived:7715; Count:46 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::b547:51cd:16c5:4487]) by VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::b547:51cd:16c5:4487%7]) with mapi id 15.20.3455.031; Tue, 13 Oct 2020 10:58:11 +0000 In-Reply-To: <20201013102511.5nuu3p3dcyr6poft@E15-2016.optimum.net> (Boruch Baum's message of "Tue, 13 Oct 2020 06:25:12 -0400") X-TMN: [wOqAL8/e8nIRNho+MpM438N/0JcgEx8I] X-ClientProxiedBy: AM6P193CA0037.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::14) To VI1PR06MB4526.eurprd06.prod.outlook.com (2603:10a6:803:ac::17) X-Microsoft-Original-Message-ID: <87k0vubdfh.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM6P193CA0037.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20 via Frontend Transport; Tue, 13 Oct 2020 10:58:11 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 03d8d181-77bf-4e53-2c42-08d86f66e053 X-MS-TrafficTypeDiagnostic: AM7EUR06HT107: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M4ue2E8ttY63CnToD94os6vemLAr3Ep5Dvua4YObZF6CrhxWPbBdJJP3bRQsecvsgC3TJk+Hft7oGCovtoIJtxDAIhellctYufZNiWJHc/9/awhjK+1QMMSfQK9bbWkWvWwZDOJskrm40sJwizeBEgmNDA+6vOQtz+Qm8O7CjoXSnxjY7tPP49m6mqdYtr6+d/HIaIG7TsqjIrimNcpXgQ== X-MS-Exchange-AntiSpam-MessageData: OPt3IYlPYKmh4N1wC/CnFNj8BSrcFChPsThekwHnsfYLLAURK7DpSeCxbHALkR+snX7rnQ6lDZsRH6xu+XzZd69LdL2Bkn3GAuCsW4E7kNUR/fT4zwkCOFrefhW9wzWbiGiJDRmKl69SLRWxXCfb7w== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03d8d181-77bf-4e53-2c42-08d86f66e053 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2020 10:58:11.8457 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT049.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT107 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190412 Archived-At: Boruch Baum writes: > On 2020-10-13 06:54, Lars Ingebrigtsen wrote: >> Boruch Baum writes: >> >> > They return different values. One returns an expanded (canonical) >> > path-name, and the other an abbreviated one. >> >> Why not just have one call the other, and wrap the results in >> abbreviate-file-name? > > You could, but you wouldn't be saving anything since the inner function > would still need to perform the expansion, so for the abbreviated > function you end up in effect with an inefficient (abbrev (expand file)) > instead of a choice between (abbrev file) or (expand file). > > Also, much of the change ends up being defaliases, docstrings and > deprecation notices, so its more clearly presented without nesting > functions. > > -- > hkp://keys.gnupg.net > CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 Boruch you are mind reader! At least I thought so when I saw your mail yesterday. I was playing with Dired myself on Monday and I actually wrote a mail about those two functions + file-name-directory and directory-file-name, I just never send it. dired-filename-at-point is supposed to return a filename closest to the point, according to docs. For me it didn't work at all. But I mostly disliked the name. Why are there two almost identical name for different functionality? I like self-documented names for variables but if there are names like directory-file-name and file-name-directory or something like dired-file-name-at-point and dired-filename-at-point; then I have to remember and actively think about which one was that I want? Usually ends up with unnecessary look-up into docs, because I don't remember which one was that I want. Not that I hate so much to think :-), but it does interrupt the flow of thoughts. I understand that logic was 'objectoworkon-followed-by-operation' but I still find it unnecessary convoluted. It is just so much more straightforward if each function has unique descriptive name, and yes I am aware that such names are sometimes hard to get by. I have seen also discussion about string-replace and replace-string, can we plase not? For the reason above. And for the new APIs added, please don't use naming patterns like word1-word2 and word2-word1 or similar where same words are used just with some slight variation.