Eli Zaretskii <eliz@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 76023) by debbugs.gnu.org; 3 Feb 2025 12:30:29 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 03 07:30:29 2025 Received: from localhost ([127.0.0.1]:38197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tevav-0005Gr-74 for submit <at> debbugs.gnu.org; Mon, 03 Feb 2025 07:30:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39634) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tevat-0004ya-FN; Mon, 03 Feb 2025 07:30:27 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1tevan-0004VN-Hw; Mon, 03 Feb 2025 07:30:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xI4v5LTtVlMXiGmwI/pTWv/1vRsDyJUNsR7qCSg20kE=; b=Kzl9+eLhoP51 H/8Pmvah386b1lg64Hxh13DUtI+T56VcKaIdifZAWCKtw2zh79b+FiCnuEgGpBk51LVHfPeo5wC4O gZZXFO2QPYqz3qyEOeIl6rf8PzGdYkgQWTUhk/tztlzsY3SS7mrBg1t08RVshU0IvIowOreQNf1HO pEdn3T4aYIGsiVPbR5zK+YKlRfqo/VxRVbjEaqaT23O3oOfpEeKmvymrxEsflGNxC7RMWw+pnboG2 Kbc5i5nXGcPJRQyrsTA780KSc1S7Lg3G2WeTJXy9WXy3af9THMmm2bDxUQ1sVYHB2MY++ezg84vmx cYcCcjKCGK8RWA0YkRbcJw==; Date: Mon, 03 Feb 2025 14:30:16 +0200 Message-Id: <861pwfcisn.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: arthur miller <arthur.miller@HIDDEN> In-Reply-To: <DU2PR02MB10109B85FECBC25A5C6D7D7DB96F52@HIDDEN> (message from arthur miller on Mon, 3 Feb 2025 03:12:39 +0000) Subject: Re: bug#76023: 31.0.50; Observed behavior for substitute-in-file-name different from the doc string References: <DU2PR02MB10109B85FECBC25A5C6D7D7DB96F52@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76023 Cc: 76023 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) tags 76023 notabug thanks > From: arthur miller <arthur.miller@HIDDEN> > Date: Mon, 3 Feb 2025 03:12:39 +0000 > > According to docstring, text ending with '/~' should be descarded through > the slash. Does not happen: > > (substitute-in-file-name "some-string/~$HOME") => some-string/~C:\Users\arthur > > However: > > (substitute-in-file-name "some-string~/$HOME") => C:\Users\arthur Yes. Emacs on MS-Windows doesn't support the "~foo" notation, which means "the home directory of user named 'foo'", because that's not possible (or at least not easy) on Windows. So on Windows we treat the "~" character literally in those cases. The above is the direct consequence of that non-support. > Which seems to be the promised effect. I guess it was a typo in > the doc string and the code comment, otherwise it is a bug in the > implementation. '//' works as advertised, so I guess it is just a typo in > the doc string. It isn't a typo in the doc string, because on Posix systems Emacs behaves like the doc string says. It is a common trait in documentation Emacs not to describe too many details about the idiosyncrasies of MS-Windows, especially in dark corners such as this one. > Furthermore, I find it a bit arcane, or at least unnexpected that I get > a native namestring, instead of Emacs path, since other functions in the > fileo.c return Emacs internal (unix-like) namestrings (thus far I have > tested them). That shouldn't matter, since Emacs can use both forward and backslashes in file names. > If it is a "feature" to get the native namestring, at least perhaps mention it? It is a feature, but I don't think we want to mention it, because it's Windows-specific, and because "~$HOME" makes very little sense on Windows.
bug-gnu-emacs@HIDDEN
:bug#76023
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 3 Feb 2025 03:17:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 02 22:17:56 2025 Received: from localhost ([127.0.0.1]:37047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1temyC-0004pt-2I for submit <at> debbugs.gnu.org; Sun, 02 Feb 2025 22:17:56 -0500 Received: from lists.gnu.org ([2001:470:142::17]:33134) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <arthur.miller@HIDDEN>) id 1temy9-0004pd-8U for submit <at> debbugs.gnu.org; Sun, 02 Feb 2025 22:17:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <arthur.miller@HIDDEN>) id 1temy1-0007qM-GK for bug-gnu-emacs@HIDDEN; Sun, 02 Feb 2025 22:17:45 -0500 Received: from mail-francecentralazolkn190130003.outbound.protection.outlook.com ([2a01:111:f403:d20a::3] helo=PA4PR04CU001.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <arthur.miller@HIDDEN>) id 1temxz-0002X6-Mw for bug-gnu-emacs@HIDDEN; Sun, 02 Feb 2025 22:17:45 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uhRLK62sJhmgsVN3iCSxod2VFg+9F526oX4OZ8vafOlsj4VVntITLF+Jc1AUpKVEewRBNPg1cZgPHS0tvq8FJAeqqzkZsHgH7IiFX0UudmF/Ope6BZuNsxrRrzVC3PGhFtCHH8m1XxV4i/vx/GZcHOBddWXLRxJ7wNQJn1xFtLkAXvyL6k8mo0IdUsWztechYXZ9NvmKr0wvv9m4T68u85zP+QpwvakFDE/RpEa/4WcaSMPM3Po5NOmgxeGVpf1XegOeqF15ccj4J7E5OCLw0iJDoHHUD3DyzVRN1Pwt5zwSlWb2YE4d8KgDWPs2eJvTovEJwwpf2IlfNcyyJhY56A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KJPxropn8ilSzZ+oT9KVKUTZjrsJRjw7kqc0/C5ulFg=; b=PoD/SbnlbOWju6lXoEpUaJMl+ZK5o3MtwRanXuzhT4fiMz4t48q7b6St0bVgbyN2jhMc8+PZbFMI06fcSvv6vEpVqJJwLwaPmfaMB0wJp7sJ26eke+1cTJI4n6hgysfe2cu/eQjd1yxnymM6luCD49kV8wmif0KXbJlydzx1PPX4EcnFQAT79z1Fkq3BWyL0tIkUkFeZ62lGFNBTaxT75KczN0Re3DSo42gyvDs5FCnzQhItrp5+IIPXNiIL/EgNtm1klUWgFANfdq4YEu8IbDbjjJT6ds0IAGafArT0UPsaOd+sbzpi7GehdUacGoS+KUEO2khwxqOOUuSdoYqwGg== 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=KJPxropn8ilSzZ+oT9KVKUTZjrsJRjw7kqc0/C5ulFg=; b=hg7X90B0AqLEx/R3ahKXTn2Kt25lv4v+BqyKrL436tGxE46R39AG3j+OCqzHEuHlpih/hg1kPpN760LRiy3VqsghJeAgpcpRwGNZacE+Z6VzTrepGvFk51lGPY4i0c7OFONIVa7aNFxhWKW6owuQonKhETegJRUcNtWBiTz9HWjQJz7eLYPCVQlp0z9DE1Q7vZZ89IE+iUwrPju5zQ789rOIkOXEtWiZqIIWXynQ5cU0XbvPV6l6WiGJlBMCkTp+QOkCH1gI1X1znWUSWEPU3fymy+XlDYDwwwY6v5HL6+GEZsxhGIyNkaRPzhfKf55Q1ZAvN/ELOwwjyjsQXCM2Cg== Received: from DU2PR02MB10109.eurprd02.prod.outlook.com (2603:10a6:10:497::14) by DB9PR02MB6633.eurprd02.prod.outlook.com (2603:10a6:10:218::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8398.18; Mon, 3 Feb 2025 03:12:40 +0000 Received: from DU2PR02MB10109.eurprd02.prod.outlook.com ([fe80::f3c9:d4cb:290:d487]) by DU2PR02MB10109.eurprd02.prod.outlook.com ([fe80::f3c9:d4cb:290:d487%5]) with mapi id 15.20.8398.025; Mon, 3 Feb 2025 03:12:39 +0000 From: arthur miller <arthur.miller@HIDDEN> To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN> Subject: 31.0.50; Observed behavior for substitute-in-file-name different from the doc string Thread-Topic: 31.0.50; Observed behavior for substitute-in-file-name different from the doc string Thread-Index: AQHbdekLW2BNjNZZBkWqvVWO5b7Bvw== Date: Mon, 3 Feb 2025 03:12:39 +0000 Message-ID: <DU2PR02MB10109B85FECBC25A5C6D7D7DB96F52@HIDDEN> Accept-Language: sv-SE, en-US Content-Language: sv-SE X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DU2PR02MB10109:EE_|DB9PR02MB6633:EE_ x-ms-office365-filtering-correlation-id: f3e733f2-6960-4903-de2a-08dd44009e06 x-microsoft-antispam: BCL:0; ARA:14566002|15030799003|19110799003|8060799006|7092599003|15080799006|461199028|8062599003|440099028|3412199025|41001999003|102099032; x-microsoft-antispam-message-info: =?iso-8859-1?Q?5Q2hOaeziRKE9z+9ww002f6UM8oTBgh5uk7GHrfFbbzn5EA3gqefXUXapu?= =?iso-8859-1?Q?acAqPWbpj1O1COml+iJtlLRzCstAppaqVJ1r9snkAjCqrqajUJpNDqO6Rx?= =?iso-8859-1?Q?cXgytH5WrN8CcdwD4DY/Atkin44p0y2gm8FmJjE/uQzOUSa0p3vE+rw7Yi?= =?iso-8859-1?Q?FzZiwkQFN3qoGqMqFMxs2+drNDTP3EMbub4wZF2l80IfTaJs3uGTEnkGsG?= =?iso-8859-1?Q?uzcWUL23hyhMagQI83Gy7JxRyOa9lPTVDwjewQg7TF9ktDSnaSJrPtbDNV?= =?iso-8859-1?Q?trP0Cx7nNw918582bMpLbN3x0lRDXYge99sLDHLw1H+7X1U92O11FTJgD/?= =?iso-8859-1?Q?2r4SPm9+JE2yIyZslEGkdRxl/RocJb4cQ38bXYuuEeMW6FJO6zweJyYWJo?= =?iso-8859-1?Q?RNaRNQFv3tDkEnW1vTCUsGcjUI9PJ6lUWRYkGF/563penRqghvPwF5OHH4?= =?iso-8859-1?Q?siT5ef8hc4ScfdJEb4DYMiJlSmP9kgxoNq/FaP+1NmhvdUiUe7+ruu1+gu?= =?iso-8859-1?Q?Ubjl8Zh6pze3uR7qBMiV3u710oqR4VrXiyuA9NbNdCjRH9LURMDo4ql+2Z?= =?iso-8859-1?Q?3CBLWSinQ4gKLNEF+ieZPrrh2uzMooMLmcP3nIWG3BT+T7jRlEYL9/6c1Z?= =?iso-8859-1?Q?nrxYPKzljmiRDS1LiZCLYAdsmWg71t/9E30zuXylAqFzZhxfeJwQBhhKvw?= =?iso-8859-1?Q?l1cMHoleEeMSvSHR/EDKdnW27PsAh8cfgFZC/uMrgAkGteOmEVYS6vEpd/?= =?iso-8859-1?Q?WyYHXANHDKTNrMF/OUEdfqIlsgkCq9+AGpUUVdiTiIb628tnTNsk9Wuvg5?= =?iso-8859-1?Q?QA/xoJ+cwymPMp/zCP5Vsf/IaxwuTLThbmYZlISp4RADx41hgfns4iR4Sv?= =?iso-8859-1?Q?9NZtDuMLH+2t+q3jYGLnpWq7nRO+bYNFwaA8itrSlc4sEadQl4bImcwyh5?= =?iso-8859-1?Q?QbOu62GfL6pMmy84DmrF8/0nxhavtmK9eLb2EtWNBJCsWYgFajKA0endDC?= =?iso-8859-1?Q?+i/umLN5N0NsvLhcDYR3GT9V0aTWuaJJqpeatbPBQ882VPh812Oc5taZIj?= =?iso-8859-1?Q?f1mgCLa4MtfbG8sOQhpLO1hLA50Ol0d5Wmcf/SHbVBCepaEOte5uZI77Vz?= =?iso-8859-1?Q?FEJpRgDBGZu218F3udIuQcn3emQqnPk2LrbO+9NIfJD6RCEOi8SFY+ly0K?= =?iso-8859-1?Q?SKd3K+LYJWXeHg=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?xzIQrYPJdgcUT6VI5JUqS5GbuinLmBpvVPHVmuq3azkKy2WB0Sja6t/3T8?= =?iso-8859-1?Q?/uaOUvHeaoBQqi8LC/C8ekTywcnyPYCFcgT5Kddljz+NWI5zzxe0FTcWN3?= =?iso-8859-1?Q?xjFZlBWlqW+nGbBC1PmMXCne+hEU+1o0MSYf3FHQc7G9aIO7PaSPCSNXSF?= =?iso-8859-1?Q?DksYZuFK2h5xIdXItz0Oo2k7akMpHU1bFLoYVLbJOnqQ1ANlpH3Ktfj8GH?= =?iso-8859-1?Q?d/yjve9r7h5RTxmCyg9wTNLZrA+vevGK55t9KKGXXxOh7SHKVIgegP4s6I?= =?iso-8859-1?Q?/FBAsd7LhFlPCBYfWmHUsIX+6o4tbpG5mVV6vhiaZOmy+x9eSNf8Oc8irl?= =?iso-8859-1?Q?fb6mcUSq/LEv/7+2Gulc21AN8p+PUd43QRLSEHJDvr8KFusMirRA/TJ4HG?= =?iso-8859-1?Q?ej2S5LtZ3pNkRJ4c1GqtUmelmwz9pyKdENm7VivUDVIUe0rYJERP7mVInT?= =?iso-8859-1?Q?MgnXd9CFAV9taT93Oyz/WN4RSXYBj3Op36Tj/DD70TpAoedDFp7gXwEO6t?= =?iso-8859-1?Q?mCTQzcjvQqhHLXxWpoKsdAy8PYPVkIYKZRZTNltyHQmkh6vsHjS329oRnf?= =?iso-8859-1?Q?SWEaWZsj8W3LnIeBFlD6sTM/9p9mwydiAV0phvXwwvTsg4SGSFE5DznDQb?= =?iso-8859-1?Q?+ekzk3/QZ4x2w9j+KQrc4Y670t6cWZ9SpqwyFyE1rldEAF1J2L6u3R1GMP?= =?iso-8859-1?Q?jkEdXk8N5W6xUYs99S7UNMMQqaXt7K0aufKoZIqFf3P+rP+Q1Y0t+k6wQq?= =?iso-8859-1?Q?MnJV4LZKIZgIlPrugTjHLPISAcPuAyfUn4p1CoWifiO+RzbmkRd7CXwoeL?= =?iso-8859-1?Q?q2KsTrh1eQQiuq5Lh/EcvM62Ej+Gy5UWbaMj6eTcvAMbUMDKzF2GFb+8Zt?= =?iso-8859-1?Q?tSEpM4vm4oL8X/JLSQiSRtCIRM4G382+mB/rL07B9cTTzwynZkl3c9yhAi?= =?iso-8859-1?Q?avFucy/3NMf2RT5uSgB+ueJPU65vOswYpKWWAjHOgBmzsW7UA+VR0xVm5s?= =?iso-8859-1?Q?SI+AlrTKb04GWSLNBoIHelVVmgtp0DVeNEQ8gr9rwnemk8LZeHxIKNlcew?= =?iso-8859-1?Q?E5qgrfBp8+KC6p0aV59hvH9qagrOqaJXnk6pC3kVpcmYhK0bPxctpNKuPJ?= =?iso-8859-1?Q?gdmerjMv/FP79rZfggsaI4ptd5tp7hMIgEC/SFNbckyrj9nXn2oC2Nvw/t?= =?iso-8859-1?Q?IuFOO3iaKTzhjc4OyLUxkUbR6zNxz/di8ahA1KKf6g5lTKo8IkUwfvDcC7?= =?iso-8859-1?Q?8OUh9VruHZB8YI+f7abGIRjXmZPzl1/T5Pmc1t3ec=3D?= Content-Type: multipart/alternative; boundary="_000_DU2PR02MB10109B85FECBC25A5C6D7D7DB96F52DU2PR02MB10109eu_" MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-7828-19-msonline-outlook-12d23.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DU2PR02MB10109.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: f3e733f2-6960-4903-de2a-08dd44009e06 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2025 03:12:39.8388 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR02MB6633 Received-SPF: pass client-ip=2a01:111:f403:d20a::3; envelope-from=arthur.miller@HIDDEN; helo=PA4PR04CU001.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) --_000_DU2PR02MB10109B85FECBC25A5C6D7D7DB96F52DU2PR02MB10109eu_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable According to docstring, text ending with '/~' should be descarded through the slash. Does not happen: (substitute-in-file-name "some-string/~$HOME") =3D> some-string/~C:\Users\a= rthur However: (substitute-in-file-name "some-string~/$HOME") =3D> C:\Users\arthur Which seems to be the promised effect. I guess it was a typo in the doc string and the code comment, otherwise it is a bug in the implementation. '//' works as advertised, so I guess it is just a typo in the doc string. Furthermore, I find it a bit arcane, or at least unnexpected that I get a native namestring, instead of Emacs path, since other functions in the fileo.c return Emacs internal (unix-like) namestrings (thus far I have tested them). (substitute-in-file-name "some-string~/$HOME/test") =3D> C:\Users\arthu/tes= t It can be fixed by wrapping into `expand-file-name', but that might or might not be desirable (to expand from relative path). If it is a "feature" to get the native namestring, at least perhaps mention= it? --_000_DU2PR02MB10109B85FECBC25A5C6D7D7DB96F52DU2PR02MB10109eu_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-= 1"> <style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo= ttom:0;} </style> </head> <body dir=3D"ltr"> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> According to docstring, text ending with '/~' should be descarded through</= div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> the slash. Does not happen:</div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;= color: rgb(0, 0, 0);"> (substitute-in-file-name "some-string/~$HOME") =3D> some-strin= g/~C:\Users\arthur</div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;= color: rgb(0, 0, 0);"> However:</div> <div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;= color: rgb(0, 0, 0);"> <br> </div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> (substitute-in-file-name "some-string~/$HOME") =3D> C:\Users\a= rthur</div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> Which seems to be the promised effect. I guess it was a typo in</div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> the doc string and the code comment, otherwise it is a bug in the</div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> implementation. '//' works as advertised, so I guess it is just a typo in</= div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> the doc string.</div> <div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;= color: rgb(0, 0, 0);"> <br> </div> <div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;= color: rgb(0, 0, 0);"> Furthermore, I find it a bit arcane, or at least unnexpected that I get</di= v> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> a native namestring, instead of Emacs path, since other functions in the</d= iv> <div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;= color: rgb(0, 0, 0);"> fileo.c return Emacs internal (unix-like) namestrings (thus far I have</div= > <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> tested them).</div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> (substitute-in-file-name "some-string~/$HOME/test") =3D> C:\Us= ers\arthu/test</div> <div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;= color: rgb(0, 0, 0);"> <br> </div> <div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;= color: rgb(0, 0, 0);"> It can be fixed by wrapping into `expand-file-name', but that might or</div= > <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> might not be desirable (to expand from relative path).</div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> If it is a "feature" to get the native namestring, at least perha= ps mention it?</div> </body> </html> --_000_DU2PR02MB10109B85FECBC25A5C6D7D7DB96F52DU2PR02MB10109eu_--
arthur miller <arthur.miller@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#76023
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.