From unknown Fri Jun 20 07:12:34 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#58835 <58835@debbugs.gnu.org> To: bug#58835 <58835@debbugs.gnu.org> Subject: Status: 28.1; try-complete-file-name-partially modifies text before point Reply-To: bug#58835 <58835@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:12:34 +0000 retitle 58835 28.1; try-complete-file-name-partially modifies text before p= oint reassign 58835 emacs submitter 58835 Anders Munch severity 58835 normal tag 58835 wontfix notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 28 08:31:34 2022 Received: (at submit) by debbugs.gnu.org; 28 Oct 2022 12:31:34 +0000 Received: from localhost ([127.0.0.1]:60581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooOWK-00062b-UV for submit@debbugs.gnu.org; Fri, 28 Oct 2022 08:31:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:60182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onyRl-0001Um-UB for submit@debbugs.gnu.org; Thu, 27 Oct 2022 04:41:16 -0400 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 1onyRj-0007pj-6l for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 04:41:04 -0400 Received: from mail-am6eur05on20603.outbound.protection.outlook.com ([2a01:111:f400:7e1b::603] helo=EUR05-AM6-obe.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 ) id 1onyRf-0007rR-Ic for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 04:41:02 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OIkMkzAtt8DLhdfU/WmuP2bOPZ2sDHTDa/842+WrsUF98rdl9UdmVuhrdD0NgKdpLRLKC9f91IHnHmIfDyNiS9fGxVRoW2YEpgPS4Qhk43/rB/LRxbRzVcQbswd4GoqZxKGPdNA9LtOq4xVERTOnZavydUdrMKr4pFM/le0YG9sTbhHNQk1fI3R1G9txlD9dgu1+qS4hmtc90iZ9IgRJ4gGOfaQ08c1gX8WAvTnsjeNsE4+wwnnkzi3AjwcbC9ZTyBr01yCpYH5FibabflaPK0g6OJEAZxRK5AAl/BWMdXigQny9WG4SNA9to98diG4nD6pJKpzTCJUIqsedNZjLiA== 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=GP9ck/LjNKqiNrkN9dtCot8T86gAAp5KdJY8wczjfBc=; b=Pgn5/UP4Ifrwf872t6GgQYwruh3/F6SYAZED6p0WKdiMD4QJJwDPXpm+fUuAYAUly/glQpN1CH9zDKT1Ncc/GnH97YFL3rx3ckxMed/7fQyLnoEGNLjNrdoOl4ne7fJi5f83fKLnhfB1KZtrlrWAawnBI+KCY6szRs7cx0hpzrtxB0IZFCq4Gbh0k7CjDH2ZF7MVLN24nhEzOWJTR5aZR6zEZvF7nx8oC8S64uHDYtwrZhCTDeTbOI1/BUGdvRJK1inApzilje4mp50I3FJ5s6Y/bPb32iIFSQMw9zkArdR2g5X2JP8lxzBJtK44X6IExC1EA6WHEzpuz4xhFcUthw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=flonidan.dk; dmarc=pass action=none header.from=flonidan.dk; dkim=pass header.d=flonidan.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=FlonidanAS.onmicrosoft.com; s=selector2-FlonidanAS-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GP9ck/LjNKqiNrkN9dtCot8T86gAAp5KdJY8wczjfBc=; b=I3Ml6yOxurW7//z+GZmWs6KRz/Co9A5Tgj+dNAziuaSPoqLruysYPelc3Ewhb8Df5Iqo+jOuwkLZYiJjo+3oQfl1RP4xtM0yd7Ap5dhjnCob3lVfPEkhCYtaK7tqbSXGuLPdi7NlrPfummZFuUPuSwYqgXZWfLMHQl1Ri45ivsg= Received: from HE1PR0502MB3004.eurprd05.prod.outlook.com (2603:10a6:3:d7::21) by AS8PR05MB8053.eurprd05.prod.outlook.com (2603:10a6:20b:335::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Thu, 27 Oct 2022 08:35:51 +0000 Received: from HE1PR0502MB3004.eurprd05.prod.outlook.com ([fe80::a5c5:c2fb:7963:bee9]) by HE1PR0502MB3004.eurprd05.prod.outlook.com ([fe80::a5c5:c2fb:7963:bee9%7]) with mapi id 15.20.5746.028; Thu, 27 Oct 2022 08:35:51 +0000 From: Anders Munch To: "bug-gnu-emacs@gnu.org" Subject: 28.1; try-complete-file-name-partially modifies text before point Thread-Topic: 28.1; try-complete-file-name-partially modifies text before point Thread-Index: Adjp3uA6nA6BSefQSMymqbwryj2g4g== Date: Thu, 27 Oct 2022 08:35:51 +0000 Message-ID: Accept-Language: en-US Content-Language: da-DK X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=flonidan.dk; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: HE1PR0502MB3004:EE_|AS8PR05MB8053:EE_ x-ms-office365-filtering-correlation-id: 2f58efb6-e200-44b3-add5-08dab7f64198 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9rcuOycO9X1j1372wBw/Re9qFywQ3zmptYNk3NbNmFw/YOY4Q/06ARcpzvDTaAkosy0y95MiGa3Rxz+w++a6IiyKbH6ZN0ig8/PQtLo/dzBFPtcR+ScpFqjGEiL//u16fKCxWug4HW+7gO8r7c4dtSeB2tCsc22+w1Ozi/u71omGqWGQuob8IzCw029so6bUvWqnq1+RAAz8ILMyow8Ocm8FxvkmAeQG7E7NXXB0vxLfBrgL7XrdCfHtEbetrt3DDWyZ9w8b7hgFHzpcz/vMoFJFkAFRpGKyXeduKfDw8JbL7s31hCQuxhjG9vtcpgYGNGQOrOYigNXTnL8CZZiQiY/RwfjLv9E2EzBqG7i//hsvquvvAMhS5j21h8TYNuNgbtyeyMB9FNqoA2EOdlAEgpHUqK3hh7aq77fSiZZahBhsvJru/joQevMPqTtAhDvbGBWwPyKJWTVMcWR+y/ac5hqwrNhtBH8Z5q+6h936nZfWtidtDh0OKeyO5Dkaw2GhY1vezC3xKjx8ND+6lLCFNBj4HRKEQabLO0k8Y0zxCvvjgzMIElHAKnT2sYVhXerIQ9FMXGaA9KXQBOX+FlHUMe3O1JCibFfFOg4K8vFGKW9efpZs93h2+sSuSDSh178ZktlRIZC4jM11pYsruTVmrHJsza+zUlCpSYQo+hRA6/7Y+KNHvviFK9CYf8EoImehFq+uREYIPlalb7Txpi5G/BSroikbHk3JvNG9IFb+9gEBwP7ya74kND4fOvUhfLdj15Hg08wZSm21CsZecXS16w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0502MB3004.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(39840400004)(376002)(136003)(396003)(366004)(346002)(451199015)(55016003)(38100700002)(2906002)(122000001)(5660300002)(83380400001)(86362001)(33656002)(38070700005)(186003)(9686003)(26005)(71200400001)(6916009)(478600001)(316002)(45080400002)(41300700001)(64756008)(66476007)(8676002)(52536014)(66556008)(66946007)(76116006)(66446008)(6506007)(8936002)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?8Ks3Dg/LwEvdp6jhPC2f8M5NCts0voupOD8joAPy27YU9HSaxJCyQoVfRjQT?= =?us-ascii?Q?Q66bYi7+a9fG20LUtS/gZfaT8bC0UxFwm/YlzBkGJXORDKGqY/MDqcLK1u6O?= =?us-ascii?Q?gtw/lFobAp92H1ARfEXrXudPK5Eh9EdE5qnuqrWjcs4h13gJQ1YWnF2uzphS?= =?us-ascii?Q?H+FT9UhDDwp1IDmey6qXVVqAympKb295uv1iwYHQ2TysToWQZvWU0vRmq9Db?= =?us-ascii?Q?XXgsT6C2/ag6Ih7h8lXV6+vRt5v6wCMCVnxK1NHQX7dKjBpir1ml71PglPuj?= =?us-ascii?Q?STg4i24FgxVIKym9YxmDuuaOIfurbbq3K9Au31MuifAFLJNyBdZ8MM7al+7l?= =?us-ascii?Q?wfDK5/AXCQf6ZpSRujQyfp5kN74wKva/SQlhK60n1Q5q5lyWFNp4tM8vto/+?= =?us-ascii?Q?7w8hFiHBkSvs105AlgmX+ouVp9awA7c9tlB283N8Zeof6a817FBr7lODGWyz?= =?us-ascii?Q?1HZ8GKYcd41FaBUMNj0U4PdlcueBMkih44vXoNYnMp2aGKOfbVP+0TJV4f6Z?= =?us-ascii?Q?wGXwgI3pL+jnDXrHxDx6j/LOK1nUMmjUi4RePJeazdvRoxUEaws239Ga9Nlw?= =?us-ascii?Q?l1SoRNlxOb0CLITvQdCms+xJAoaxwFXEpChPabt+/LOQe1lUGv7MkHV4Yxc+?= =?us-ascii?Q?NffZDBHbQFgMKTE49PElKryfM/3Nov6qihQ1QrB4boAY1laxgC5sMoMg/WZA?= =?us-ascii?Q?rQ5+1hYeODxjoLnymlm1wozQP8+jDMs7RNPJXU/z5kC6l8uCnyl56A3h89XX?= =?us-ascii?Q?c/KqRa8ncbeU40lCNg3XenzKdI4TWFWZXAo3F08o8WWeRFEi3/O2elKBuEBj?= =?us-ascii?Q?V/HQzVtpCB2WRtelP+yJAeorDbLacKJws823C4HsQ5sza36RNP6KAbOIX789?= =?us-ascii?Q?alqrMqWo1TvHSZL/0D2+o+bPaNMD+txB0+6re68cciON8QQzas6mChh/NTt7?= =?us-ascii?Q?+fQRY4m6AdUQqVhsLNCg67lJiQYaiGyYo9FfXWh/2TiIs8+i4h/aEO0yd+kG?= =?us-ascii?Q?It3+IBqlfXLCAq1MKuo9m+q38TZLg22iTcj803Pl0WZpHwZT+xu73AyPHGud?= =?us-ascii?Q?vD/+xP363UcDlbrONCYYt/yStbuZPMpw25wuz50ok2ipq064npUmxKpegCIM?= =?us-ascii?Q?UfS8U/v9QUMw19SpF1kPi8YYJS7c+GTReHyVfZdvso76pWu68QhGUDfF5Crs?= =?us-ascii?Q?i8C3cIMbYgn7kIDodD6sDK1nUcyc7HcCDA4HvneriImQK6t3Y+UHc3wW0CsT?= =?us-ascii?Q?AtiUpBwqwzkFKOwEGyzvgQvM9SjSLAec2GQN1/UeVS6VJKgcFH95ZxQ61C0R?= =?us-ascii?Q?DrdQEwIfbrWdD/HWehFk7AiKU2q/DRDd7ap0xPSj9rKODIWlbWco4yraSLIe?= =?us-ascii?Q?yS1mf6vQfgtlCM9QxCVI/+QfSmgsaF6VwsEGDlPjPyrJYXH2K2qmp5Wvq8ru?= =?us-ascii?Q?04mufP8bd+XeKkxp/R9w8hu8fpK5vcVG5xGtj8nK8xZwfL4Hso7BaCemCWFv?= =?us-ascii?Q?ogrEkA95wYKS6E/hUQ7ZHPt6LCi9iD7petCPBEQMnFPAVbwMubPCze/Jx83r?= =?us-ascii?Q?8YrZQYmOaJLNTDyRVSc=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: flonidan.dk X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: HE1PR0502MB3004.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f58efb6-e200-44b3-add5-08dab7f64198 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Oct 2022 08:35:51.6084 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 66f919b0-b207-4d78-ae72-d81c18f86ec5 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NAMTdFFx8Q9Vf57NAMyoxZHED2w9pYp3sa02lyfoc0jRd5mygrOQIyRQfkl2/Yju X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR05MB8053 Received-SPF: pass client-ip=2a01:111:f400:7e1b::603; envelope-from=ajm@flonidan.dk; helo=EUR05-AM6-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 28 Oct 2022 08:31:32 -0400 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.4 (--) When hippie-expand uses try-complete-file-name-partially on a partial path which uses platform standard directory separators, then directory separators are replaced with posix directory separators throughout the entire path. Functions that "expand" or "complete" should not change text before point. For example, when expanding c:\Documents it becomes c:/Documents and settings/ Expected behaviour: Nothing changed before point, expand to: c:\Documents and settings/ Desired behaviour is to respect platform conventions and produce c:\Documents and settings\ but I realise that would be too much to ask. In GNU Emacs 28.1 (build 2, x86_64-w64-mingw32) of 2022-04-20 built on AVALON Windowing system distributor 'Microsoft Corp.', version 10.0.19044 System Description: Microsoft Windows 10 Pro (v10.0.2009.19044.2130) Configured using: 'configure --with-modules --without-dbus --with-native-compilation --without-compress-install CFLAGS=3D-O2' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XPM ZLIB (NATIVE_COMP present but libgccjit not available) Important settings: value of $LANG: DAN locale-coding-system: cp1252 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x cl-loaddefs cl-lib hippie-exp comint ansi-color ring iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 62376 8924) (symbols 48 7619 1) (strings 32 22822 1513) (string-bytes 1 722817) (vectors 16 14919) (vector-slots 8 262293 11500) (floats 8 24 322) (intervals 56 219 0) (buffers 992 11)) From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 28 09:18:48 2022 Received: (at 58835) by debbugs.gnu.org; 28 Oct 2022 13:18:48 +0000 Received: from localhost ([127.0.0.1]:60671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooPG3-0007GD-NH for submit@debbugs.gnu.org; Fri, 28 Oct 2022 09:18:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooPFy-0007Fu-PC; Fri, 28 Oct 2022 09:18:46 -0400 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 1ooPFs-0004er-U1; Fri, 28 Oct 2022 09:18:36 -0400 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=85mrmD1Fjqop/gTMBH0vyO6dWoB5TJlkDHRYvfrZNCU=; b=FiXv23K3EzWq YpG9c5dusGWRWtbwzV+yhcmf97e+FZvkv9BE12nyVkr1NplqHQfmaJMguKoSEwMbsDDM8MW8iZxva VXybOhBK5SBBHFwohg7qmEV0SqmCfmPbYbSgndSmS9ih8CUgMx+7r08d9kpl5HNrbhjja+VlQ31tG mahKl7GTnxbaRnQl1WfBj5X42C4jzcf3i1zbiVb+WRLQyHgkhryHSEo1ljISn9o05ZOrO1auFA7cv Pn/ELCZ/GEbUWtBAHAqQ2ykfdcOkQbKBygsJps0HdfiXjH8BbFvCHno5kJy6M984hpkDemzDFinOO UipMvU03kkCOsEbaVGt8aA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooPFr-0002lJ-9R; Fri, 28 Oct 2022 09:18:36 -0400 Date: Fri, 28 Oct 2022 16:18:31 +0300 Message-Id: <83czacjdco.fsf@gnu.org> From: Eli Zaretskii To: Anders Munch In-Reply-To: (message from Anders Munch on Thu, 27 Oct 2022 08:35:51 +0000) Subject: Re: bug#58835: 28.1; try-complete-file-name-partially modifies text before point References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58835 Cc: 58835@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 (---) tags 58835 notabug wontfix thanks > From: Anders Munch > Date: Thu, 27 Oct 2022 08:35:51 +0000 > > When hippie-expand uses try-complete-file-name-partially on a partial > path which uses platform standard directory separators, then directory > separators are replaced with posix directory separators throughout the > entire path. > > Functions that "expand" or "complete" should not change text before > point. In general, yes. But I see no reason to expect that with 110% certainty in all cases, especially on MS-Windows. > For example, when expanding > c:\Documents > it becomes > c:/Documents and settings/ > > Expected behaviour: Nothing changed before point, expand to: > c:\Documents and settings/ This is a non-starter, sorry. Emacs converts backslashes in Windows file names to forward slashes at the first opportunity, and it does that for very good reasons: to allow comparison of file names as (almost) simple strings, and to avoid causing problems in code that may not expect backslashes in file names. This is why Emacs does this conversion in expand-file-name, which is generally called before a file name is passed to some C library function. It does that also when you call the completion commands -- again, to simplify textual comparison of completion candidates. > Desired behaviour is to respect platform conventions and produce > c:\Documents and settings\ > but I realise that would be too much to ask. Indeed. May I ask what is the real-life situation where this slash conversion caused you trouble? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 00:12:24 2022 Received: (at 58835) by debbugs.gnu.org; 29 Oct 2022 04:12:24 +0000 Received: from localhost ([127.0.0.1]:34718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oodCp-00054T-CK for submit@debbugs.gnu.org; Sat, 29 Oct 2022 00:12:24 -0400 Received: from mail-eopbgr20077.outbound.protection.outlook.com ([40.107.2.77]:15687 helo=EUR02-VE1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooQPm-0003AB-FH for 58835@debbugs.gnu.org; Fri, 28 Oct 2022 10:32:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dkPfcehLlAhFFaLRN6Hk2Z0QQuhHRtZUtEDwqHAHzbqrm1cO4F9THA46eBSQ3lFFrwm+CAFSgM3o0rs+YoduR5ulnEc+IYIxZNNDRsQclX7j2AftaY9B0jqM1txWi0rdV7wTsg2Xc9TdXrWQNkP8LFPukvUlinZElzHqmLKbNw3DZ+EFtifpoOVnWuV3rV0nwm/AhO0XXoaHmWrOngqXKuTJyPaKZ+1rigRwolSKBGVPIj3StyTtReLwJ8pzNF9IDwB1uaAP+xU3g2YckVKf7xpjj0aUlDYzYugyyjFvPtpFsfdTuvsGj7Jxe40mqQCQx4KG4E8Kif0FcF0CIyevhQ== 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=73e537n96WqhkL1hY0ler6vzZsrnPQpsXlQWZxhuc50=; b=SMnXyHJJ+DRWHed02n9poaiZgte1ptCz7GB0gmvh09L5k0G4ucAmh8Tp5NA+oPmXzW1t0jth1R6pQZD0xsfxePcZgFxmEZn+NaHkGQWyCOKAO7ovvgbDn+8P//N6vb1ZDPPlFcDIZNV/aFUCIEIzmBA+pZ5boG2bayw/laTp/E3y+9T8Gq27sWJObjTbQOoUuTzY6J3f3TRvQfd2Wb6Qiv9b4/Q9m+nUD02jYDzXZBQyfJbNDzU77RSHv63FDZHj7G2kErqvF6Skq/6b0He8CFZxxRMsYy/A7Nzy/ZFWMd6MHepqLpEp0MHU+ijaImZQrzjEOzqgDnrlbBB07IIluQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=flonidan.dk; dmarc=pass action=none header.from=flonidan.dk; dkim=pass header.d=flonidan.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=FlonidanAS.onmicrosoft.com; s=selector2-FlonidanAS-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=73e537n96WqhkL1hY0ler6vzZsrnPQpsXlQWZxhuc50=; b=zda2DgA44MNJ52p6T8rUa+ftRjOue21CA7y/JQdbnunACWVRT6BFrVTFdaDD2ehHGUZ2k4QTMprff+oLB1HlSiLj9MhXgi0lbNqnoRcWpNAtG8pDG1YScH8vdg+gwKuXJ41ze6apTxCQwxFYalfVpQeCoj3k5/dFbd7eycALKcs= Received: from HE1PR0502MB3004.eurprd05.prod.outlook.com (2603:10a6:3:d7::21) by AM9PR05MB8514.eurprd05.prod.outlook.com (2603:10a6:20b:3ae::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14; Fri, 28 Oct 2022 14:32:47 +0000 Received: from HE1PR0502MB3004.eurprd05.prod.outlook.com ([fe80::a5c5:c2fb:7963:bee9]) by HE1PR0502MB3004.eurprd05.prod.outlook.com ([fe80::a5c5:c2fb:7963:bee9%7]) with mapi id 15.20.5746.028; Fri, 28 Oct 2022 14:32:47 +0000 From: Anders Munch To: Eli Zaretskii Subject: Re: bug#58835: 28.1; try-complete-file-name-partially modifies text before point Thread-Topic: bug#58835: 28.1; try-complete-file-name-partially modifies text before point Thread-Index: Adjp3uA6nA6BSefQSMymqbwryj2g4gA8OudrAAKWZaA= Date: Fri, 28 Oct 2022 14:32:47 +0000 Message-ID: References: <83czacjdco.fsf@gnu.org> In-Reply-To: <83czacjdco.fsf@gnu.org> Accept-Language: en-US Content-Language: da-DK X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=flonidan.dk; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: HE1PR0502MB3004:EE_|AM9PR05MB8514:EE_ x-ms-office365-filtering-correlation-id: 05d42ad1-45ca-4187-0173-08dab8f148d1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8xypiqXRJ9eZ4dH0C9978ERE2WHfSnI+ICp6z3B9NARtelDt6jcpB0P31S+TfqYkm1vn5pP1/kcnvH9QIA2Utltnqn/jk6GCj6m2+Rif3XUHMwU5KJlqgatqqguMXuOCqGIc0Mc3Y6KmLXOi2nQ0UJBy8YyX71wsoRXK0oekFMNr02m1gxIMLrajnjP18cTQpLG4QwHxZeH9jMpHFmFppywXnKYTIvaiPdB3kJRdiy43VYqobYup0yfnpKOzc3HX8q9sH1o1SM2tekJjvmvWHh9+m2eGDCpL60AE53Ktia0Zjd7Rgq7vRMCnwXkzkl1Fh+3+qTWwcPlgSQHz2sXq7KgPK/PytcrbJW6J37biJThAGTsIFuVy7N6fU8/sd5ujRF96BvHAVAJYXuj/KPogz53uWlJtMo9jRauZpBDd9rxtm1P+XxPlu2OeoAMHlsizbT++QJc0rl3rPBl7WUcXayMXmr1eNB1OPL/a7JcilCRPP9Azc5hkCLwXLbERTulSR2UMU+t9RkirWp/BIqnPEXO4DV+fa2q4E4U8Yoc2bDCwIsbYsvSyD5mW9ZPF5lFiOYIBEfTzJ/180zko2O80gUWFotq+JdSo61uZwdltlhb96WdL8zVWevrIUhciCwrhkmJYXE/mVYdBMG03P2I/v3CbLixLYydpCiI8ohAWTAWdXfkMu8P5vYfjU1omo7JAYHCKXQp0JNJv9Gy8B70eCrKEbqRquzxHFdhaLHy5JvLnrr5QVEGY6/Zdkz1IqE4mIbY72NdwsVYGR5qls6GSQA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0502MB3004.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(39840400004)(396003)(366004)(346002)(376002)(136003)(451199015)(38100700002)(122000001)(55016003)(6916009)(71200400001)(86362001)(33656002)(316002)(66446008)(8676002)(66946007)(66556008)(76116006)(4326008)(66476007)(64756008)(41300700001)(2906002)(5660300002)(52536014)(8936002)(26005)(7696005)(478600001)(9686003)(6506007)(186003)(38070700005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Gmn1lcS9/z8aaulCfYVCYr1XftPC/7n4T8+/qqQom5KtB0TzqXWEcaUZm+5W?= =?us-ascii?Q?Pv2+tL430pPQ0AFQJOq9ZrTqZHj8XqmdpyfrYKtTkn1AJlC0EiQQky5uDBza?= =?us-ascii?Q?DjCvULTKuUGKqHithxBM+cN+daM2k8eiPOcliPBuPOA14tx7uIb8blBI3Jw3?= =?us-ascii?Q?eu9dcUw7jnELs3ZWALohHyaJ5KhVdmCZIjwKHPO4bzLncsl3ZYSsPbhfWH9c?= =?us-ascii?Q?4Na7jvFCp8cMqQswj5EeU8KTnETQdQqqfBSD2tF+/+4mOom0RYDNYIcgMR6c?= =?us-ascii?Q?T8b2jP6rtrwPPTIyw2eQlRRdpGogiTV404lxQlS2uk2RF9o/XuT/trtjwnqR?= =?us-ascii?Q?NYJlNHxBmPGSFtn/c+YG/2HkU8K00+gPPMlf8mf/YgAWfjOfmVKTnnC/qYUu?= =?us-ascii?Q?Wh4BGs/uV7QybSAK7YH26VQEvkN4eaQoNWfl/OH8sFMZUJDumyU1hERujgAg?= =?us-ascii?Q?evWU0kJ0tBF/RN56iCziaBoaix2OfEFZw3LJMZQeEQYGgH0KqHV7cN37doJ5?= =?us-ascii?Q?Ss2q5p0Ljrg6CHh1o3f72qy7PPojFQHFp5erllgzzQC/GEaSLY/zwY8yJLN+?= =?us-ascii?Q?EgZYnkJxY6Ap0nYvPYLDJB7uuc5L25VNxN7MXXUMPrXRkfyg7r/uQqI63Avv?= =?us-ascii?Q?XinEv24HJZBp1XVNK7NzosSwI7/zq2fZCQmFkq8d1vbVoA79cJDBFhbUTui/?= =?us-ascii?Q?B+y3ekTTVGKeGUK1F8wMzya9FZWCV9/DPAzaGfTbsP/+j4QGp8RkFMRLNwBA?= =?us-ascii?Q?yQkYJ/31de0PgHQmaALM2rqaCDd/Iy8Blwh6eOOb95kY0DqwdN3IEv1vqp7m?= =?us-ascii?Q?zrBORcfiK9j7fYiQapKUROFBmRitxWD2etUAkmTU8xae1PmOEcxfoc74g5Ya?= =?us-ascii?Q?9RHmDWkgYjG1+vQGyidcmEElCdl9P16G3p37TxMwVxl4duT82uas0B0PjVoc?= =?us-ascii?Q?nem3LrE+sUSJGaYZJt6ZkSerQPpAv1Ivnov9XbA6uxqJZD/lbpD5B/JDNZPT?= =?us-ascii?Q?5Ls8hlbO4Mc81nFhHjxMUUlzZGmggJT5mOzDLff7HTJOJ8yqKbhFXUnC9ssq?= =?us-ascii?Q?r6iLjaesR4DsTD8PcRqDlQe0uh0KmvKBzXLpJ0kwgpAlH5dYJ8huacYwm/7e?= =?us-ascii?Q?PLQPvabu8Yvjq1ZgPvE20eN/pAY1h6YvOeOfkmm3R9XItZ+nUqLfEp4Srrtg?= =?us-ascii?Q?2SFV8Dstg4aF1KKGWUzfNgXIaYWSTnzilqgtgQkBwivLCAY8jApqrND0+EYo?= =?us-ascii?Q?TDhb2+zw33m8hbMme9B1PEodP/QVKfiDENRMrgfYVhzLIMihHVMjI5lYI75/?= =?us-ascii?Q?mrkiHafo9uUxoQV+UDZeaVZ0iP1Bz477FTT/x7njl3foGM5sqtBAX2g74TxQ?= =?us-ascii?Q?RjRVOZDt/uRPPz24+kfjbkWdW9oqkXedo7SsGPYOoTikwAvJn80wGeaBs/27?= =?us-ascii?Q?q7fikpOr19Y2BT+j1fstgOjbuwdB4rftPwFPQyenvG9gXM2i6LBj3txbZHjM?= =?us-ascii?Q?XlZ1Ln3qOCmFJ0i6iV5tyZuea/fwvAkJNhMZx4PRX2RdxrmXId2Ne6u90c/1?= =?us-ascii?Q?DrmszRz5pEfKbpeqXgg=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: flonidan.dk X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: HE1PR0502MB3004.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05d42ad1-45ca-4187-0173-08dab8f148d1 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2022 14:32:47.4476 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 66f919b0-b207-4d78-ae72-d81c18f86ec5 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Pte4k2+FQpKd63innc6BJE/hb1g9ZviRfA7B64cQ6W02HJwe5+vBHcuuByoj6hdl X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR05MB8514 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58835 X-Mailman-Approved-At: Sat, 29 Oct 2022 00:12:21 -0400 Cc: "58835@debbugs.gnu.org" <58835@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: -1.0 (-) > May I ask what is the real-life situation where this slash conversion cau= sed you trouble? Any filename occurring in a text document may potentially be copy-pasted in= to some other program. In most other software that I use, filenames abide by = the platform convention, and a filename occurring in a text document may potent= ially be copy-pasted into one of these other programs. For example, into the add= ress bar of Windows Explorer, or into a file selection dialog. For those purpos= es, backslashes are the platform standard and frontslashes are not accepted. For that reason, MS Windows filenames that I keep in text files are written using backslashes. When I write part of a file/directory name and use hippie-expand to help write the rest, then the data that I have already ent= ered manually is changed, and must be hand-edited back. Which is frustrating an= d time-consuming, and has driven me to no longer use hippie-expand for this. I'm well aware that GNU Emacs's approach to portability is to make all plat= forms pretend they're POSIX, so I wasn't expecting much. I didn't expect the expansion to be corrected. I was just hoping the manually entered text to = the left of point could be left unmangled. regards, Anders From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 02 12:43:28 2023 Received: (at 58835-done) by debbugs.gnu.org; 2 Sep 2023 16:43:28 +0000 Received: from localhost ([127.0.0.1]:38461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcTiZ-0001oC-Kx for submit@debbugs.gnu.org; Sat, 02 Sep 2023 12:43:27 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:52454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcTiY-0001nZ-5H for 58835-done@debbugs.gnu.org; Sat, 02 Sep 2023 12:43:26 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4fe15bfb1adso242890e87.0 for <58835-done@debbugs.gnu.org>; Sat, 02 Sep 2023 09:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693672990; x=1694277790; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=HzWLUuv6ZXcUroeDXA+hPplymLt/xYWUyWZmaT/B6Mk=; b=e8uZqjWCSJ36puzzbH+9n06zYpsqa1pOMcyjWMZRt47Nb5rnt9co4YpBJhK7re8m/U r49JXzNcEQSAAYfwYzeaxnSma4VmlAS1vFFC4wPIconTpHIussrRXkYnGkiJrJl4TjF9 JpBaAdEOLbpzLaofFtUFaupiLZctk3PtO6uLeA/2TAa1seq8z5SF0HnH8tH4enmMhFwZ 6xirgRxS2AiAzEfOmspusKaasZ3aqw4ki3cr1rcnKjoT8SB05Bk1K+4lzZ1PaCo7ABoc PxBYCY+Rz07zZKdvRtqQ5zB5PgmMf9KDjU2PvyaFOnT4jq0gShdwOO0EoPqISB4Jx2SN PTYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693672990; x=1694277790; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HzWLUuv6ZXcUroeDXA+hPplymLt/xYWUyWZmaT/B6Mk=; b=RUhRHzm8jFaIwYOaF9k6r09yj/An+Ldqqtl5KAmkLDWML1e57kl5uEcdTN/TztoqFY g9qCaFGpxSxtVL8RdufGUfe/ZhFFHDG8j65lIUo+YBcgy4UK5kGzxhJFkLXSRnK0wrz4 SPsjPBxMD0V4VFHzo4Zs18Tz79aPb8WVuK4lvXPqj+bVtyfPldJybvPQU90Cl5/1tknK mhnrZx6pUeILFg7ShtSm1QIrdsCF+hWXwwsIL2B4fHrVQ//QcfKHUdgfcvhJCdseJIcg 8kOZEAzN++jJWMJ3jLZhZKvn0lwkbVBFvvRo81yR4CRSCiPQezWEutq3wDJWMSplfslJ ld9A== X-Gm-Message-State: AOJu0Ywmx6nhPpfEXpLlZFEZCQMtqQn6aLtagGyaQSKb9UJ/ikOh0jBY UvU6l03/kr2vvetZ1HOQ1P4x/8RQzC6w9VpwTeI= X-Google-Smtp-Source: AGHT+IGXGOEqvMkvjRF99XqoMXOPemugJ8Em00B8dLIjEgsuKHwqU/JESRlmHYAAXNijRwhBo+mJ2dPUZdSLneUwKZE= X-Received: by 2002:a05:6512:3ca8:b0:500:b5db:990b with SMTP id h40-20020a0565123ca800b00500b5db990bmr4567099lfv.47.1693672990340; Sat, 02 Sep 2023 09:43:10 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 2 Sep 2023 09:43:09 -0700 From: Stefan Kangas In-Reply-To: <83czacjdco.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 28 Oct 2022 16:18:31 +0300") References: <83czacjdco.fsf@gnu.org> MIME-Version: 1.0 Date: Sat, 2 Sep 2023 09:43:09 -0700 Message-ID: Subject: Re: bug#58835: 28.1; try-complete-file-name-partially modifies text before point To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58835-done Cc: Anders Munch , 58835-done@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: -1.0 (-) Eli Zaretskii writes: > tags 58835 notabug wontfix > thanks > >> When hippie-expand uses try-complete-file-name-partially on a partial >> path which uses platform standard directory separators, then directory >> separators are replaced with posix directory separators throughout the >> entire path. >> >> Functions that "expand" or "complete" should not change text before >> point. > > In general, yes. But I see no reason to expect that with 110% > certainty in all cases, especially on MS-Windows. > >> For example, when expanding >> c:\Documents >> it becomes >> c:/Documents and settings/ >> >> Expected behaviour: Nothing changed before point, expand to: >> c:\Documents and settings/ > > This is a non-starter, sorry. Emacs converts backslashes in Windows > file names to forward slashes at the first opportunity, and it does > that for very good reasons: to allow comparison of file names as > (almost) simple strings, and to avoid causing problems in code that > may not expect backslashes in file names. This is why Emacs does this > conversion in expand-file-name, which is generally called before a > file name is passed to some C library function. It does that also > when you call the completion commands -- again, to simplify textual > comparison of completion candidates. I'm therefore closing this bug report. From unknown Fri Jun 20 07:12:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 01 Oct 2023 11:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator