From unknown Sun Jun 15 08:35:54 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#67438 <67438@debbugs.gnu.org> To: bug#67438 <67438@debbugs.gnu.org> Subject: Status: 29.1; WDired uses `substitute-in-file-name', so `$$' is changed to `$' - undocumented? Reply-To: bug#67438 <67438@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:35:54 +0000 retitle 67438 29.1; WDired uses `substitute-in-file-name', so `$$' is chang= ed to `$' - undocumented? reassign 67438 emacs submitter 67438 Drew Adams severity 67438 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 24 18:36:23 2023 Received: (at submit) by debbugs.gnu.org; 24 Nov 2023 23:36:24 +0000 Received: from localhost ([127.0.0.1]:37484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6fie-0001l4-G1 for submit@debbugs.gnu.org; Fri, 24 Nov 2023 18:36:23 -0500 Received: from lists.gnu.org ([2001:470:142::17]:41964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6fia-0001ko-3W for submit@debbugs.gnu.org; Fri, 24 Nov 2023 18:36:19 -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 ) id 1r6fiP-00086N-Mg for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 18:36:05 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6fiL-0005yj-FD for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 18:36:05 -0500 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AONDhXL001644 for ; Fri, 24 Nov 2023 23:35:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=SoG2rfFbEakeWlTQosxfpIsjVlVoc6IcyxjpfXfPlRE=; b=N5bX+Tk7ZOeDPxz4H6puPmmAMQl0w2tKcklmLCqhVZT79zKFjaabOAIimKF3hcmk5Jib f1ZvCTPT36t9rWBX8MBUrrsU26K0LBoGXN+KNfFMqBn3+/fr7On38obJTG5XQh8CM1Tg JE0l1Aw8TWwq8GzkcZA/r/dlH9g4ALUr2dyv+Gkbje0V8uxwoGSX4UcsTUojvZMQ4cTh 4+Q+G+y0Pl8HY5pn9ZMPfPXBgY7vM0wWpnBQy2CM7em67SU3RNkMn8oCMbhPMmNQ65PQ K9ddZ8+DoyTBgO/dbEJpV5ZymGiUG3ht9WfZFCuzdhpxOUnRh9EjpwY9PPOkxHawb98q Jw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uen5bktwe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 24 Nov 2023 23:35:58 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3AOKH7nQ011030 for ; Fri, 24 Nov 2023 23:35:57 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2169.outbound.protection.outlook.com [104.47.56.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uekqc3rsq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 24 Nov 2023 23:35:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X/drhd6B7rIuZG8k7DpJ9jWjYJ7lCBczZf7ZkOmFkpy0v2IhXvjDnvBC2K5cuX/Sn85GhwLL3RM3NdnABZrapxWmklrHsmHzDEkAVat5oR1sEAiX9P9+sEucQH4WDtvCnNhYhGLLa69muHqFCnwAPcG+lqoSoPWztiLFCGRY0tERUvEZtS1fUWqPsUmzw3uKhfqpKLgXbjA7mUtYCnhqhFNyPU38wqyh0lk8GJLgnmm/KMTUrVGgi8021+y8fBohKQeBSxlVvm/JsLRLSTNe7sm0AfX62iBvdcwzqWRNwtwMdNH5n/a9DlRmGm+h4tT/ou7yn7WweKN/0+kIdEHzbw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SoG2rfFbEakeWlTQosxfpIsjVlVoc6IcyxjpfXfPlRE=; b=UG8xmtzuj+f5/sG4QwBEEgaK+o1gN8uWzG7T5yjeotCdBctFMJZ9qT28UZFGoc5aHl8Khz+lqrq5Ht6uFMA3jfyDDXfgidJ5LV+PNUV4sS9KmIVjqsMihk2Hv+Ytgs9C814f49k0Upk9lvKKreb0Kc1ti9y1RjpFXQzp9DECUFcPsqz81Bm/W9p9t3q1aiUpnczDgpIbkCfP704U8dkZmnJ5UrWsjEJthWdZnRHwaMiTl/a/25AqsScvPezW/eAv5fD67DRXcC8b3mqsPkAX6gKYs1PcZ8ra94i6flCSYatslXOGFYYl2JMzKGE2daMfLtbuKxHlJ6pMopXdI//Ibg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SoG2rfFbEakeWlTQosxfpIsjVlVoc6IcyxjpfXfPlRE=; b=eWASpMaScSuNO3jkZJ4OS42s5nRzsN6QmUamaCkwGD7Qj/Y59ZS2PWYyy/f2PxLc+Gid9HCDaf5rDohEdXU/6mfxHRPgWr877qyW0ZjhdVklBnfzFXtV9HGkAoRX4dt/I0MMM34gmGuXCWsXCHgkXjczDls30yRVsLTlJgtlN6s= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by CH0PR10MB5259.namprd10.prod.outlook.com (2603:10b6:610:c2::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.24; Fri, 24 Nov 2023 23:35:55 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::3b4c:a669:c229:47b4]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::3b4c:a669:c229:47b4%7]) with mapi id 15.20.7025.021; Fri, 24 Nov 2023 23:35:55 +0000 From: Drew Adams To: "bug-gnu-emacs@gnu.org" Subject: 29.1; WDired uses `substitute-in-file-name', so `$$' is changed to `$' - undocumented? Thread-Topic: 29.1; WDired uses `substitute-in-file-name', so `$$' is changed to `$' - undocumented? Thread-Index: AdofLrAzVtfRlITiQbmh27++H9Rl3Q== Date: Fri, 24 Nov 2023 23:35:54 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|CH0PR10MB5259:EE_ x-ms-office365-filtering-correlation-id: f3a4aa65-5917-47a2-55c3-08dbed461a6f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lDXdun3xG9z0GUWlmgschjAG3wHyPy+Lnvm4j9B8NCultncnUpERaY9j1G08y4auV9+Vkj4lPULNRj59KnSQjBH9PABNeKxYL/l48yzHdJh8D10HPwRx3D7k81/d/XzPEwLSyy+0yeTPYwE9hUnbQed1GRUmnAcVtxHtZ+dazN73xwQBfDB8eR63z5nKyl0cWzIMJArRwcGJUFCnAUb9gOvAIzjsmSrBen69BEGi9kepea6PpejdRaw6/21TlPdqM/vFEEXZ6LeEF6mQZOz4BeHTiQmYz0GVK4KXE+pRT1++8AIqdEdaWoiw5sETfyy5qiaYMrZFxGjuA/NIyWFxmcNkOMKknSdpKwKbgoxBrNHd1s1/ZkwxMLLRdE5JoqIr+oYN/KxX5MqNgFQuMmYbBYr2T02iK2VNCPU2gkA5k3Pf2wceoS+ee5z5t2TkrbGoB3WfQ6fPufofXFwpRZb6tIfc/kYs9FBYrVP3ukwXhgvA4tgyb0ZMmRnLmKH9Uhy+4JywiUOQK/+yoY2G1CGhNHdPBddi/zvIOjmUGhwmprbJEN8aHGz88zzAJY/8okb77uWBBI1I6Wq5B30qsnMjzaYchIGwEHAUJIn84KBZCzTntsHGR3qNNDdj+dDGdKTDlyMbKK/7dWOvm9hmthDVsA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(396003)(136003)(346002)(376002)(39860400002)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(2906002)(52536014)(44832011)(76116006)(66946007)(55016003)(9686003)(41300700001)(66556008)(8936002)(8676002)(6916009)(316002)(66446008)(66476007)(64756008)(6506007)(7696005)(478600001)(71200400001)(5660300002)(45080400002)(26005)(38100700002)(86362001)(122000001)(38070700009)(33656002)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ayLp4k7TxNkOEEfKIb2hH2MTROiNRF8FJULyAklnrMa2bCPbfKGrOTvsMoFZ?= =?us-ascii?Q?O+gCHeXQ6sYNh/f2bxJPdFoCWGS/i1i/1hNPnGywuQu2LK7qTICJD9J1n4aY?= =?us-ascii?Q?HKPFDaqpqHT1Ao52eiz+EM72V4ESJkuMa001Ou497S9+F5hHSwoG6QBmyHKT?= =?us-ascii?Q?Wad37cqEgYaxMDS7ByjOxLpHrNnYRnkqZUul/HUWLRZZx4PK9TddMG+sWtHA?= =?us-ascii?Q?kGt+7xBF5YtNQuqlKgDf70XHNneE8r38eN9VV8T7T96Qtpz6n1dp+VkoJ24A?= =?us-ascii?Q?gMSCTSxR5J/G3op1DTdHt7FmlWFnVvdR0a/h7UkFqKenGy8ggUAbCdIBTQKr?= =?us-ascii?Q?1vXDPAkvNcj6D5AQF7ocgwUSD2+aBCMKTNve2a+Eth6PLUdDkUErf26Xu4e1?= =?us-ascii?Q?tB25Vbhm3zwvC5aDeJJJuE6H1M9NTH08BbkzWKg2Uj6vNmoYJ16idL7kRuii?= =?us-ascii?Q?imopd81dCleLe2S22X2K4TjQI5kNATzAQ3vW04hnFe0dfhePqIBbglyvqBx9?= =?us-ascii?Q?kbEEaOW1pqsK6XYrx9nvHgdEtSszWyoUikgbE29JKGCUL6Yg5gC4PgoH5F7h?= =?us-ascii?Q?jHxFtMLBFydZbmIw0RSB3JjFsX2mMIff8j3J1Qqm2+SVpy3MP/MgajacL0y8?= =?us-ascii?Q?idfrpW2EMDRIrHp2D3nq+4fV3OsSYW5gt7ao/50EwaP83XUbNKh+7HlYo7Ao?= =?us-ascii?Q?DPZ1rVNHJaZxxxkUYNzhhFePN2EuVdplJPB7BFQ6pJ6N4H27nCpazWUQG7Xb?= =?us-ascii?Q?QBwoi6Bk25wpLsGjBmxtzm+Er22BHJA6eAIffID9XPS6ft3tCv7HgLahbgq5?= =?us-ascii?Q?V31CZFtkfRNgkj911ozzomv3EXKdysgR1uJUyhYHJSaypqfRyBFgCzTYchfs?= =?us-ascii?Q?JAoP+EFJBYPPNTN8MAWX+dZsF9DXAJlDjQDom63czfFcGvhbm2HgcMJ7MNy/?= =?us-ascii?Q?fcQVA4VWtdUg7I2Wcdctgq/k2ky0UaWB6h/4WXmtQz4WYW2c5yinsvxuOHwq?= =?us-ascii?Q?2zc8eJrbdxvhBRYFLO0q5XGEZbqcVkbU+asQ+9tme4bntzQKe0woNvw3SNZ9?= =?us-ascii?Q?g8pKvWA2NlFP0yd8hTDsgLNQFWOp8g41idYOTvXMORi08LXEtaLiUMTmDnvp?= =?us-ascii?Q?3oLlniMDvJsYSanQamTuCo2qAFFqsbQUFwvdf2IOmdgXHES6fZLw/8YQQor9?= =?us-ascii?Q?qOl1X/AejX6bZvbC7mkjshLv8KlO47qqDtkylGL2NXQfNEYYbWzYKqucc0xM?= =?us-ascii?Q?oChN+A3PmP2zD0SZq8A67XG+im2uuFvcezdvJ2OuE110g8wqhEnOW2u75Ak5?= =?us-ascii?Q?gasMItO+xxim1rJN4upvnvtFUKCgeuP6wFYDr48HUURaDCbZdpUTHWzE8eZW?= =?us-ascii?Q?3IrIiVcuoKqyqPQINhgxjvOBl1lSTUcNdWYZx0UuLfa1bqawJobFbkH+kWNj?= =?us-ascii?Q?9ZLp/Y1h1KHyYWJnTMHEDw8+gnzfcaORfsaAmoEYXyuvHqXgHuvlSZAEpICD?= =?us-ascii?Q?E7pSvE+JsYfxFhD/NKPMkE6CyOcD7oBd2znDA1dpiGAG6RlOM7hZTpirjk3v?= =?us-ascii?Q?LvIrGcrZ5nPyKscUrnJSUsn6nRoXsEzsA9i/l2dQ?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: N8XYfda9nAJCbkQpfeHxdyfJz4ID7Wu3MASDpAAGEtGJMCsnBuC4TWjiT7JdC6yVSgqLYs9Ac7X2O2Nc/fNiACjn1zuLSik6pXHrdjfopaS5Rc+buUN5GTVrQISlw+zt/HbGpVB2OrAcc4cEOcdFaWPHNlBfAlPCEKd0JfRoqD2VZolBsP7t3HRhqieIdtkJ+/EWBT1CXkUF76yBFRffo/7aOPq77LswnNay6c3AYxSQ8uq6ncK5C/qCOrOjxngnlSXf1xFjnO/4K4JNU5SYXPVXFEnhCpXH0PSi+Z+XP3Sc3n1eCkWautW8oa3BMSe9zSmR0YwgRzWYd+XgKFWI4uWRZsQG58/z4qAjT8Yt6Za+Z99jbdnWzYvGdr/F5oiHHn8Dl8as5z2L23FLR4rdXc+49AgdSGJwYeGUMtfKKwkmqEr/fozmvESpFZzQtMZnKTkZUC9Sy3jEOKUIkFq2UX1k2s2c6Uh5N0ZmN6bpXR2GEcc343l+BmU2gOyd0f2aV13UKR38YpHARtrbv+hxmSWkY/sWsuuPjtHLkEV1N8I06qiczEytaF9qzOM18FXq2MYZBsVMc5/+c7uSpTF9QupkaljWXTjQgE08MSwQ5xuKi2AyXimzqYkNB4HAuiFgTNoRMeSxv5Xa55lj8RTZObpiUK6XLKyM9M6wMqnhmCzVwG02Zs0IskOwgtv1ZwWvkRy90t17ZWDjhWZNGKvR7Odg6pqpcC0b03czfeQL5G93rLPevVdoCJJRoYhEIw06 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3a4aa65-5917-47a2-55c3-08dbed461a6f X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Nov 2023 23:35:54.9462 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xv18OinFMM08+P/ykA/6Hu4kMRmmF0tSMRiaP3VriIp+8XLKwzi5y46SPNwke8uP+MKYYmGdMjZdc+di+16XmQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR10MB5259 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-24_09,2023-11-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 adultscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311240184 X-Proofpoint-GUID: 2AbUFGn7LGfNa5syBOYYIr-8dLjimUPR X-Proofpoint-ORIG-GUID: 2AbUFGn7LGfNa5syBOYYIr-8dLjimUPR Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit 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 (-) emacs -Q C-x d aaa ; Go to a directory with a file named `aaa' C-x C-q Append $$$$ to the file name, to give `aaa$$$$' C-x C-q The resulting file was named `aaa$$', not `aaa$$$$'. It seems that every occurrence of `$$' in a file name is treated as just `$'. (The position of the `$$' in the new file name seems to be irrelevant.) I see this in older Emacs releases as well. I found nothing in the doc that would indicate that this is supposed to happen (and preferably why). And the only occurrence of char `$' in wdired.el seems benign. Ah, I found it - it comes from `substitute-in-file-name': (substitute-in-file-name "aa$$$$") ; -> "aa$$" But is that appropriate behavior in this context? If it is, then maybe the doc should tell you what to do if you want literal `$' chars. (I tried escaping with `\$`, but that ended up being changed to `/' and changing the file to an empty directory!) OK, the doc of `substitute-in-file-name' says to use `$$' to get a single `$'. So that's clear enough. But what's not clear from the WDired doc is that that function is used (instead of `expand-file-name') by WDired. The WDired doc is pretty scant, overall. This, at least, should be mentioned I think. And any other gotchas - special (non-literal) treatment of the text used in file names. That would include use of `\' as a directory separator on MS Windows, I suppose. In GNU Emacs 29.1 (build 2, x86_64-w64-mingw32) of 2023-08-02 built on AVALON Windowing system distributor 'Microsoft Corp.', version 10.0.19045 System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.3570) Configured using: 'configure --with-modules --without-dbus --with-native-compilation=3Daot --without-compress-install --with-tree-sitter CFLAGS=3D-O2' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB (NATIVE_COMP present but libgccjit not available) Important settings: value of $LANG: ENU locale-coding-system: cp1252 From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 03:11:27 2023 Received: (at 67438) by debbugs.gnu.org; 25 Nov 2023 08:11:28 +0000 Received: from localhost ([127.0.0.1]:37715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6nl9-0007R8-Hp for submit@debbugs.gnu.org; Sat, 25 Nov 2023 03:11:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6nl6-0007Qt-UD for 67438@debbugs.gnu.org; Sat, 25 Nov 2023 03:11:25 -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 ) id 1r6nkw-0001ac-64; Sat, 25 Nov 2023 03:11:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=RFHhMoTb9rgcJuBYyNYofstpGFodMEpujcczimfM24Y=; b=RbElJvfMFlmygpCM+Hc5 XC2xwPhZkhUa5Hi/SJgpmgmClZAQ8EuQi4yg0qfD4RaAzddUiCUGIDKQV7hbLlJ39uUga6DhHZJYP dUSc/ok7cn5Z9QYFW1unIyzAtjHjlAc8o/ONFeCQiNeDAt1CoI4kq4LDjFaDf6fPljkzLpI2hpejL 5ki9HGm30SVGWDGMJU46jdAHENDuhrj+pZuIeck/3mF8uQuFUuAtRU+p/KrJFMqzTZpbDNqkrnv7h E5v2pHKUjDHlTxnYG5sbnZt6wBrcPPFNhj7PVWKJ49Iynnl3YqkvD3oVxYHz26rvzoV7ingrVKC63 9+be1S617DAvnQ==; Date: Sat, 25 Nov 2023 10:11:11 +0200 Message-Id: <83h6ladzhc.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-Reply-To: (message from Drew Adams on Fri, 24 Nov 2023 23:35:54 +0000) Subject: Re: bug#67438: 29.1; WDired uses `substitute-in-file-name', so `$$' is changed to `$' - undocumented? References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67438 Cc: 67438@debbugs.gnu.org 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: Drew Adams > Date: Fri, 24 Nov 2023 23:35:54 +0000 > > emacs -Q > > C-x d aaa ; Go to a directory with a file named `aaa' > > C-x C-q > > Append $$$$ to the file name, to give `aaa$$$$' > > C-x C-q > > The resulting file was named `aaa$$', not `aaa$$$$'. > > It seems that every occurrence of `$$' in a file name is treated as just > `$'. (The position of the `$$' in the new file name seems to be > irrelevant.) > > I see this in older Emacs releases as well. I found nothing in the doc > that would indicate that this is supposed to happen (and preferably > why). And the only occurrence of char `$' in wdired.el seems benign. > > Ah, I found it - it comes from `substitute-in-file-name': > > (substitute-in-file-name "aa$$$$") ; -> "aa$$" > > But is that appropriate behavior in this context? The $ processing is an integral part of the Emacs interpretation of file names. The Emacs user manual says in "File Names": The character ‘$’ is used to substitute an environment variable into a file name. The name of the environment variable consists of all the alphanumeric characters after the ‘$’; alternatively, it can be enclosed in braces after the ‘$’. For example, if you have used the shell command ‘export FOO=rms/hacks’ to set up an environment variable named ‘FOO’, then both ‘/u/$FOO/test.c’ and ‘/u/${FOO}/test.c’ are abbreviations for ‘/u/rms/hacks/test.c’. If the environment variable is not defined, no substitution occurs, so that the character ‘$’ stands for itself. Note that environment variables set outside Emacs affect Emacs only if they are applied before Emacs is started. To access a file with ‘$’ in its name, if the ‘$’ causes expansion, type ‘$$’. This pair is converted to a single ‘$’ at the same time that variable substitution is performed for a single ‘$’. Alternatively, quote the whole file name with ‘/:’ (*note Quoted File Names::). File names which begin with a literal ‘~’ should also be quoted with ‘/:’. You will see this behavior _everywhere_ where Emacs accepts file names from the user. For example, try: M-x rename-file RET foo RET foo$$$$ RET the resulting file name will be "foo$$", with 2 $ characters instead of 4. WDired interprets file names in the same way, and that is OK because anything else would be inconsistent. > If it is, then maybe the doc should tell you what to do if you want > literal `$' chars. It's hard to find where and how to document that in WDired's doc string, without also describing the other special processing of file names. Again, this is part of the basic file-name semantics in Emacs, so repeating it in every command that accepts file names would be excessive and unjustified. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 03:44:58 2023 Received: (at 67438) by debbugs.gnu.org; 25 Nov 2023 08:44:58 +0000 Received: from localhost ([127.0.0.1]:37752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6oHZ-0008HK-Pp for submit@debbugs.gnu.org; Sat, 25 Nov 2023 03:44:58 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:47859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6oHW-0008H9-6i for 67438@debbugs.gnu.org; Sat, 25 Nov 2023 03:44:56 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Scllg3rjvz1qsPG; Sat, 25 Nov 2023 09:44:47 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 4Scllg1t4rz1qqlS; Sat, 25 Nov 2023 09:44:47 +0100 (CET) X-Virus-Scanned: amavis at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavis, port 10024) with ESMTP id Fn7ibDSZuaws; Sat, 25 Nov 2023 09:44:46 +0100 (CET) X-Auth-Info: eVVuQPClb1ZjHjP0KKpx0uF2squOcNnkwBCiQluuRUjIU8VJ6EJxzzboMMGhPHFa Received: from tiger.home (aftr-62-216-205-193.dynamic.mnet-online.de [62.216.205.193]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 25 Nov 2023 09:44:46 +0100 (CET) Received: by tiger.home (Postfix, from userid 1000) id E4B472273EA; Sat, 25 Nov 2023 09:44:45 +0100 (CET) From: Andreas Schwab To: Eli Zaretskii Subject: Re: bug#67438: 29.1; WDired uses `substitute-in-file-name', so `$$' is changed to `$' - undocumented? In-Reply-To: <83h6ladzhc.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 Nov 2023 10:11:11 +0200") References: <83h6ladzhc.fsf@gnu.org> X-Yow: I'm having a tax-deductible experience! I need an energy crunch!! Date: Sat, 25 Nov 2023 09:44:45 +0100 Message-ID: <875y1qdxxe.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.1 (+++) 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: On Nov 25 2023, Eli Zaretskii wrote: > WDired interprets file names in the same way, and that is OK because > anything else would be inconsistent. If you edit a file name that contains a $ sequence that is altered by substitute-in-file-name you must change each $ to $$ that you want to keep. Content analysis details: (3.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [212.18.0.9 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [62.216.205.193 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.18.0.9 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 67438 Cc: 67438@debbugs.gnu.org, Drew Adams 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.1 (++) 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: On Nov 25 2023, Eli Zaretskii wrote: > WDired interprets file names in the same way, and that is OK because > anything else would be inconsistent. If you edit a file name that contains a $ sequence that is altered by substitute-in-file-name you must change each $ to $$ that you want to keep. Content analysis details: (2.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.18.0.9 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [62.216.205.193 listed in zen.spamhaus.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [212.18.0.9 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager On Nov 25 2023, Eli Zaretskii wrote: > WDired interprets file names in the same way, and that is OK because > anything else would be inconsistent. If you edit a file name that contains a $ sequence that is altered by substitute-in-file-name you must change each $ to $$ that you want to keep. -- 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."