From unknown Mon Aug 18 11:12:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19412: 24.3; ido-write-file sometimes writes to a different directory than it says it will Resent-From: Don Morrison Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Dec 2014 20:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19412@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14190226059351 (code B ref -1); Fri, 19 Dec 2014 20:57:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Dec 2014 20:56:45 +0000 Received: from localhost ([127.0.0.1]:51891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y24bM-0002Qk-S0 for submit@debbugs.gnu.org; Fri, 19 Dec 2014 15:56:45 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56609) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y243r-0000Az-Cq for submit@debbugs.gnu.org; Fri, 19 Dec 2014 15:22:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y243q-0000Y8-1M for submit@debbugs.gnu.org; Fri, 19 Dec 2014 15:22:07 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=AC_HTML_NONSENSE_TAGS, BAYES_50, FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y243p-0000Y4-U6 for submit@debbugs.gnu.org; Fri, 19 Dec 2014 15:22:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y243o-00006y-B0 for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 15:22:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y243n-0000XP-1C for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 15:22:04 -0500 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:35612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y243m-0000XA-Mz for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 15:22:02 -0500 Received: by mail-wi0-f177.google.com with SMTP id l15so2945076wiw.10 for ; Fri, 19 Dec 2014 12:22:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=WsdigvNbLARLd2hnO9qYiZAZcWHW48GwjDzhKn/IeXo=; b=aLY5g193VvtTo/ZaXp01z0JOrCymT64Q+zfRpjrDls3kQ8EagE6WRLv3j6WgAxpCf+ jKE8ibipU8LW3mEzY4o10JOndDV90NZKeKSBEauRTnVbqJ7QqtIKIDx1YNzMjv3bt4wc 0l6TEocUcoce63d+sgLgoCUHFHWxZeG+5rhuUTdLY6HfMw8rqQ0C/k28ocgeNSbH+fvB 4NriNWKDCVuNjGY9DAGE/sqNFhnGhywBS0bsTzHRXIOeJRfvUqbKe6ZZZ9fc3oNglvuo JKOe9xX9Qmgqh8posLhmVNv/uXqmHIAllqPLXsAMU0zp1ga0Kx+l9UqDalY06cFZp5Zh zJgw== X-Received: by 10.181.12.17 with SMTP id em17mr9051691wid.45.1419020521243; Fri, 19 Dec 2014 12:22:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.27.179.215 with HTTP; Fri, 19 Dec 2014 12:21:20 -0800 (PST) From: Don Morrison Date: Fri, 19 Dec 2014 15:21:20 -0500 X-Google-Sender-Auth: rneSgx94GvRVGkTho0Rbs1Dkhw0 Message-ID: Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.0 (---) X-Mailman-Approved-At: Fri, 19 Dec 2014 15:56:44 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (---) This bug report will be sent to the Bug-GNU-Emacs mailing list and the GNU bug tracker at debbugs.gnu.org. Please check that the From: line contains a valid email address. After a delay of up to one day, you should receive an acknowledgment at that address. Please write in English if possible, as the Emacs maintainers usually do not have translators for other languages. Please describe exactly what actions triggered the bug, and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': Create a file, ~/mumble.frotz, containing some text. emacs -Q M-x ido-mode M-x ido-everywhere C-x C-f ~/mumble.frotz C-x C-w /tmp/ C-f You are now sitting at a prompt that appears to be saying if confirmed it will write the file into /tmp/, with the file name mumble.frotz implied. Hit the carriage return key to confirm it. Note that it is trying to write it into ~/mumble.frotz, not /tmp/mumble.frotz If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /usr/share/emacs/24.3/etc/DEBUG. In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of 2014-03-07 on lamiak, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Linux Mint 17 Qiana Configured using: `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: shell-dirtrack-mode: t ido-everywhere: t tooltip-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 transient-mark-mode: t Recent input: M-x i d o - e v e r y w h e r e m o d e M-x i d o - e v e r y w h e r e C-x C-f m u m C-x C-w / t m p / C-f C-g M-x r e p o r t - e m a c s - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Ido mode enabled Ido-Everywhere mode enabled mumble.frotz has auto save data; consider M-x recover-this-file Quit Type C-x 1 to delete the help window. Load-path shadows: None found. Features: (shadow sort mail-extr help-mode emacsbug message rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils tramp-cache tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv gnus-util mm-util mail-prsvr password-cache tramp-loaddefs shell pcomplete comint ansi-color ring format-spec advice help-fns cl-lib advice-preload cus-start cus-load ido time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 02 22:36:56 2015 Received: (at control) by debbugs.gnu.org; 3 Apr 2015 02:36:56 +0000 Received: from localhost ([127.0.0.1]:43554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YdrTc-0006YX-9w for submit@debbugs.gnu.org; Thu, 02 Apr 2015 22:36:56 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:65220) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YdrTa-0006YL-2J for control@debbugs.gnu.org; Thu, 02 Apr 2015 22:36:54 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsIGAGvvdVRBbthL/2dsb2JhbAA3gVOfQYFbU4EIgXYBBRk9Mws0EhQYDapIjGQHAQEBAQEBAgGBf4E+A1KDHgSoOw X-IPAS-Result: AsIGAGvvdVRBbthL/2dsb2JhbAA3gVOfQYFbU4EIgXYBBRk9Mws0EhQYDapIjGQHAQEBAQEBAgGBf4E+A1KDHgSoOw X-IronPort-AV: E=Sophos;i="5.01,1,1400040000"; d="scan'208";a="115311032" Received: from 65-110-216-75.cpe.pppoe.ca (HELO pastel.home) ([65.110.216.75]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Apr 2015 22:36:47 -0400 Received: by pastel.home (Postfix, from userid 20848) id 378802E4B; Thu, 2 Apr 2015 22:36:47 -0400 (EDT) From: Stefan Monnier To: control@debbugs.gnu.org Subject: Re: bug#20248: Apologies, this is a duplicate Message-ID: References: <874moyp5bm.fsf@skipton.i-did-not-set--mail-host-address--so-tickle-me> Date: Thu, 02 Apr 2015 22:36:47 -0400 In-Reply-To: (Don Morrison's message of "Thu, 2 Apr 2015 18:14:48 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) forcemerge 19412 20248 thanks From unknown Mon Aug 18 11:12:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19412: 24.3; ido-write-file sometimes writes to a different directory than, it says it will References: In-Reply-To: Resent-From: "Ryan C. Thompson" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Nov 2019 22:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19412@debbugs.gnu.org Received: via spool by 19412-submit@debbugs.gnu.org id=B19412.157282130830068 (code B ref 19412); Sun, 03 Nov 2019 22:49:02 +0000 Received: (at 19412) by debbugs.gnu.org; 3 Nov 2019 22:48:28 +0000 Received: from localhost ([127.0.0.1]:35640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iROfc-0007ou-8O for submit@debbugs.gnu.org; Sun, 03 Nov 2019 17:48:28 -0500 Received: from mail-pf1-f182.google.com ([209.85.210.182]:42168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iROfa-0007oh-9k for 19412@debbugs.gnu.org; Sun, 03 Nov 2019 17:48:26 -0500 Received: by mail-pf1-f182.google.com with SMTP id s5so2616394pfh.9 for <19412@debbugs.gnu.org>; Sun, 03 Nov 2019 14:48:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thompsonclan-org.20150623.gappssmtp.com; s=20150623; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=GiQ14+TiP285QolC7H+4lpByXuCRSIn9B3gWzMbchX4=; b=OK9OC2xZA3Ocg3MpErQD5wPF1/+WGXwGBPXnm9qoS43Hws22ikGoiDaHb8AhEsdFEa OMARrzeiGzsHRqjkX2sKMftNdpdaH5D7klMOcwGoFAwOhtO9a+yIH/3gt5FQ8QrzpK/S ESaO9BSvh5tTSYZ+0EhqnJtkbg8YxpGE3gui/ldlv5S41QARu8Wf4zKEqgcnrEF8Ihpx 3aE8xudW6fRQ7g0RI8TQhkbl0soONJ5iVHX0df0kNaTExjZAgVMlt6dMSIwyj//lrmBG P5fBIFVEP3blP36cHqaJnJJMmRIyY+F6m/UA1GW1RRhHniXEWtDn8aSX4GJhFvm1kpKB 6SFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=GiQ14+TiP285QolC7H+4lpByXuCRSIn9B3gWzMbchX4=; b=hu9eiuCQTNqvBajJ/Hah4S3sC2wCCEnGax3wXjwg21YWdh1rIoJsptlXo8nTDILWKT GS1JpOlV5Z278xja/JwTJ2WN9ObD+IexOpR+Z+DOS7d0/2SlXiTr2TPpOCAYQJs3p37C grjPfZI/2wCG52Ss5Xs8ZekMtPY7EmxT5vN5jSaqxaCUReB0P/NCIDSsxQ6eCJw89H0S p9FnOHlDPPGlp1w5YmtkYSFjd8ewPh3qWmgB/av0sH5jT6p/tuh3PqK6YAVEcuiWud90 V3IiM6Rws8kuFjkVvxYLoXWYqUk65kO2y2Hc0z/MfLKZMWKTL8HUCiMu96Rq58Gfxuac wcGw== X-Gm-Message-State: APjAAAWZVH09k4a5CBXPaxuMHleqU5rvd/lhmXW5fW1Yqq6On0uMYjtA VJIAM+4Mlxl5GYphKT+51BuAdrrIIyY= X-Google-Smtp-Source: APXvYqwVWBW+IAHtn8XdSDtM5OgYW4r6PG1+uBFAcNeNtY6Irn88BXwGYQdpxH8BTRtyI+MIFmN2sA== X-Received: by 2002:a63:7158:: with SMTP id b24mr26439200pgn.153.1572821299591; Sun, 03 Nov 2019 14:48:19 -0800 (PST) Received: from urania.lan ([209.134.95.37]) by smtp.gmail.com with ESMTPSA id y8sm5097404pfl.8.2019.11.03.14.48.17 for <19412@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Nov 2019 14:48:18 -0800 (PST) From: "Ryan C. Thompson" Message-ID: Date: Sun, 3 Nov 2019 14:48:15 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: 3.6 (+++) 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: I believe I have discovered the cause of this bug. It can be reproduced by evaluating the following code and then hitting RET: (read-file-name-default "Write file: " "/tmp/" "~/mumble.frotz" nil nil nil) Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.182 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.182 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 3.6 FAKE_REPLY_A1 No description available. 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.6 (++) 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: I believe I have discovered the cause of this bug. It can be reproduced by evaluating the following code and then hitting RET: (read-file-name-default "Write file: " "/tmp/" "~/mumble.frotz" nil nil nil) Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.182 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.182 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 3.6 FAKE_REPLY_A1 No description available. I believe I have discovered the cause of this bug. It can be reproduced by evaluating the following code and then hitting RET: (read-file-name-default "Write file: " "/tmp/" "~/mumble.frotz" nil nil nil) This will return "~/mumble.frotz" rather than "/tmp/". Ido triggers this issue by causing "read-file-name-default" to be called with arguments like the above when triggered to fall back to non-ido completion as described in the inital report. The crux of the issue is that the initial directory, "/tmp/", is treated as *not* user-entered, so pressing RET on it returns the default filename instead (which is populated from the buffer file name). This is not trivial to fix, because ido isn't calling "read-file-name-default" directly. In the example given, it's let-binding "default-directory" to "/tmp/" and then doing: (call-interactively 'write-file) And then the interactive form calls: (read-file-name "Write file: ") which then picks up DIR and DEFAULT-FILENAME from "default-directory" and "buffer-file-name" respectively. So this isn't a case of just fixing a function call somewhere. One possible solution would be to also let-bind "buffer-file-name" to nil, in which case DEFAULT-FILENAME gets set to DIR. That would work for the case of "write-file", but I don't know if it would work for other functions that read file names. Lastly, I'm guessing that the original reporter ran into this issue because they were using C-f RET to select "/tmp/" within ido completion, since RET would just select the first file or subdirectory on the list. They should be using C-j to do that. I might add a hack to my ido-completing-read-plus package to fix this edge case, if I can figure out a reasonably clean way to fix it. From unknown Mon Aug 18 11:12:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19412: 24.3; ido-write-file sometimes writes to a different directory than, it says it will Resent-From: "Ryan C. Thompson" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Nov 2019 14:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19412@debbugs.gnu.org Received: via spool by 19412-submit@debbugs.gnu.org id=B19412.157287915426985 (code B ref 19412); Mon, 04 Nov 2019 14:53:02 +0000 Received: (at 19412) by debbugs.gnu.org; 4 Nov 2019 14:52:34 +0000 Received: from localhost ([127.0.0.1]:36076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRdib-00071B-TS for submit@debbugs.gnu.org; Mon, 04 Nov 2019 09:52:34 -0500 Received: from mail-pl1-f169.google.com ([209.85.214.169]:45439) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRdiX-00070t-99 for 19412@debbugs.gnu.org; Mon, 04 Nov 2019 09:52:30 -0500 Received: by mail-pl1-f169.google.com with SMTP id y24so7665971plr.12 for <19412@debbugs.gnu.org>; Mon, 04 Nov 2019 06:52:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thompsonclan-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:references:message-id:date:user-agent:mime-version :in-reply-to; bh=zVQhoXnwXHGkxbtkDqbGUkeNpkrz8s6IunmA/ZizIbw=; b=GmQsIIoQwT0A6g/C+Aii2JhpZrJV+4Lllfcw1vN8KHJ4cj/CZDQwuKYhb5YLvGZ7kN JB94Vlte7wU52RWXh2TDhk61obLvsVdQ/qtAwAXbLQmjQCPO3EHjm/atsZEo51tDcbM0 mjkg55fOvmpwWTqGWjouHQg8Nw+spv/PNnkHtUl7onLgP7aHvp0O22ac5bzL6FmhEDo4 BpoZT7hj4lb2QhmDuzy7X9ULVPs8zBLQK6HfvC9Cb1/pRFjdcN4idff3zg19QUrQgwe6 W5hZ0zBZYQbelhPn3FkisrDtRkZRiVv4X59Snqkimg4Nk7xQU/HFtXRAGkQsBK+HmRC/ VB9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:message-id:date :user-agent:mime-version:in-reply-to; bh=zVQhoXnwXHGkxbtkDqbGUkeNpkrz8s6IunmA/ZizIbw=; b=Sm6o1iBpV1uayHrkA0dZabSSBY038CC9MmSuyY20auGlNxTZ4YT1ildVC48iaEs+yC TZNTlkNGatHrzOE5gbcIK9dvRYngTfFu9yu9g2xkIi6C+vJAuDIDGam1SDrEI7rIqJo9 4GZ1QIq97D4h2EJ8aBxBDMnWvNIK63pklc/KFgO2rT3yuHNEX3BI9bVD9sRSuoxV2eqO y0dyagITfGpc4VND/gVGKhJZJLB1Tor9j11UuNCEGnhCD12SSaATlWyBtNe2fc4bly+G oTjJAlTrEFGPwFZ6mA3MMujWQNRp+l6Uiq+1JcEEYAKdt1Sn1UXNo/qrbTVfNVpxCljL dRIA== X-Gm-Message-State: APjAAAXfQZc+qDXZ3gbHm9JF0XY2y9FLj4vd+QmoUb1UabsX9WeiXqir wGDsrQlDkdbJPfe9RlxE+okgtcGzrMU= X-Google-Smtp-Source: APXvYqxlADN3NvQwg1YN/31PtsYuf2dxtX4qBZrxKP7tg46N+ruj/OFphRZmOT9CkCkEhHMdGPsDTQ== X-Received: by 2002:a17:902:144:: with SMTP id 62mr28299418plb.197.1572879142656; Mon, 04 Nov 2019 06:52:22 -0800 (PST) Received: from urania.lan ([209.134.95.37]) by smtp.gmail.com with ESMTPSA id z7sm19285763pfr.165.2019.11.04.06.52.21 for <19412@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Nov 2019 06:52:21 -0800 (PST) From: "Ryan C. Thompson" References: Message-ID: <0a0e748b-e809-d1e9-e52a-a3d846635fe6@thompsonclan.org> Date: Mon, 4 Nov 2019 06:52:19 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------914C46385E7827BFC34F5A4E" X-Spam-Score: 0.7 (/) 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: -0.3 (/) This is a multi-part message in MIME format. --------------914C46385E7827BFC34F5A4E Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit I think I have found a fix for this issue. A patch for ido.el is attached. The solution is essentially to simulate re-typing the current ido input into the fallback command's prompt rather than modifying dynamic variables to trick the fallback command into starting in the right place. Note that this is NOT thoroughly tested yet. It seems to work for the specific case described in this bug (ido-write-file), but I need to test it for some time to make sure it isn't breaking other cases at the same time. I will use this fix in my Emacs for some time and report back. --------------914C46385E7827BFC34F5A4E Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="0001-Ensure-correct-behavior-in-ido-file-fallback-complet.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0001-Ensure-correct-behavior-in-ido-file-fallback-complet.pa"; filename*1="tch" RnJvbSAxMWY3Y2U2OTUyNTUwY2JjZWMzNTQ5MmY0MWJhYTE0MDI1OTExY2ZhIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiAiUnlhbiBDLiBUaG9tcHNvbiIgPHJjdEB0aG9tcHNv bmNsYW4ub3JnPgpEYXRlOiBTdW4sIDMgTm92IDIwMTkgMjM6NDA6MTMgLTA4MDAKU3ViamVj dDogW1BBVENIXSBFbnN1cmUgY29ycmVjdCBiZWhhdmlvciBpbiBpZG8gZmlsZSBmYWxsYmFj ayBjb21wbGV0aW9uCgpGaXhlcyBidWcgIzE5NDEyLiBQcmV2aW91c2x5LCB3aGVuIGZhbGxp bmcgYmFjaywgaWRvIHdvdWxkIGxldC1iaW5kCmRlZmF1bHQtZGlyZWN0b3J5IHRvIGlkby1j dXJyZW50LWRpcmVjdG9yeSBzbyB0aGF0IHJlYWQtZmlsZS1uYW1lCndvdWxkIHN0YXJ0IGlu IHRoZSByaWdodCBsb2NhdGlvbi4gSG93ZXZlciwgdGhpcyBoYXMgYW4gdW5leHBlY3RlZApz aWRlIGVmZmVjdCAoc2VlIHRoZSBidWcgcmVwb3J0KS4gSW5zdGVhZCwgaWRvIG5vdyBsZWF2 ZXMKZGVmYXVsdC1kaXJlY3RvcnkgYWxvbmUgYW5kIGluc3RlYWQgdXNlcyBtaW5pYnVmZmVy LXdpdGgtc2V0dXAtaG9vayB0bwpzaW11bGF0ZSB0aGUgdXNlciBkZWxldGluZyB0aGUgaW5p dGlhbCBpbnB1dCBhbmQgdHlwaW5nCmlkby1jdXJyZW50LWRpcmVjdG9yeSBpbnN0ZWFkLgot LS0KIGxpc3AvaWRvLmVsIHwgMTggKysrKysrKysrKysrKysrLS0tCiAxIGZpbGUgY2hhbmdl ZCwgMTUgaW5zZXJ0aW9ucygrKSwgMyBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQ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bGluZyBiYWNrIHdpdGggQy1m IHdpbGwgc2VsZWN0IHRoZQorICAgICAgICAgIDs7IGlucHV0IHJhdGhlciB0aGFuIHVzZSB0 aGUgZGVmYXVsdCAod2hpY2ggaXMKKyAgICAgICAgICA7OyBgZGVmYXVsdC1kaXJlY3Rvcnkn KS4KKyAgICAgICAgICAobWluaWJ1ZmZlci13aXRoLXNldHVwLWhvb2sKKyAgICAgICAgICAg ICAgKDphcHBlbmQKKyAgICAgICAgICAgICAgIChsYW1iZGEgKCkKKyAgICAgICAgICAgICAg ICAgOzsgQ2xlYXIgb3V0IHdoYXRldmVyIHN0YXJ0ZWQgaW4gdGhlIG1pbmlidWZmZXIgYW5k CisgICAgICAgICAgICAgICAgIDs7IHJlcGxhY2UgaXQgd2l0aCB3aGF0IHRoZSB1c2VyIGhh ZCBhbHJlYWR5IGVudGVyZWQKKyAgICAgICAgICAgICAgICAgOzsgaW50byBpZG8uCisgICAg ICAgICAgICAgICAgIChkZWxldGUtbWluaWJ1ZmZlci1jb250ZW50cykKKyAgICAgICAgICAg ICAgICAgKGluc2VydCBpZG8tY3VycmVudC1kaXJlY3RvcnkpKSkKKyAgICAgICAgICAgIChj YWxsLWludGVyYWN0aXZlbHkgdGhpcy1jb21tYW5kKSkpKQogCiAgICAgICAgKChlcSBpZG8t ZXhpdCAnc3dpdGNoLXRvLWJ1ZmZlcikKIAkoaWRvLWJ1ZmZlci1pbnRlcm5hbAotLSAKMi4y My4wCgo= --------------914C46385E7827BFC34F5A4E-- From unknown Mon Aug 18 11:12:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19412: 24.3; ido-write-file sometimes writes to a different directory than, it says it will Resent-From: "Ryan C. Thompson" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Nov 2019 15:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19412@debbugs.gnu.org Received: via spool by 19412-submit@debbugs.gnu.org id=B19412.15728829582242 (code B ref 19412); Mon, 04 Nov 2019 15:56:02 +0000 Received: (at 19412) by debbugs.gnu.org; 4 Nov 2019 15:55:58 +0000 Received: from localhost ([127.0.0.1]:37390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRehy-0000a6-2B for submit@debbugs.gnu.org; Mon, 04 Nov 2019 10:55:58 -0500 Received: from mail-pf1-f169.google.com ([209.85.210.169]:41525) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRehv-0000Zq-IP for 19412@debbugs.gnu.org; Mon, 04 Nov 2019 10:55:57 -0500 Received: by mail-pf1-f169.google.com with SMTP id p26so12443904pfq.8 for <19412@debbugs.gnu.org>; Mon, 04 Nov 2019 07:55:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thompsonclan-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=FJkTNUkOCsltJ/uE38ewVYqi1czVcKdVmtZGwS3vGy0=; b=lqVMp7pU8TLuMwr1HFKZTIt7vNON1hS8My1uWZWcQxy/1K7ouDIzeuk6dSgbbqzPNB +JglveGmcSLpbWvyjS2jwf9cEyOvomSJ6CRonijZeq47KVwRh32VIWkzm0qsGOEEnyW2 OxuzcCW1GceIEMJjeq8S0FeiY/+QONG5wiwIJVRJKRxJW5NsZOJYLfA4xfJhD9bUVg7p o4nrWJjJ/eWbznd20+Vh8FQgzb7mJ6pe7DpkiBOwxKxrirYWYGBnncH/AMmWaqd1ICjB 54KWehkDhFJxhywaXFQjNrlGj4ful+Vdwyn3qq/oxNBJQxK7syKPciCDw5vexAFUnEV+ O2kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=FJkTNUkOCsltJ/uE38ewVYqi1czVcKdVmtZGwS3vGy0=; b=jB22fFWZlWw7gLlYBZlWmDYIPJgCtwjcn9sWMbpTiLqa7qciF5FqKcqGYcl3Q+6s7Z aVF2JlJbacVEiL4CO5GIt/UoZ3TK6foWX8NcGPDX6M1VCCmhCQfq4qXQg8WJajRoPe3F FymBvsUIViBdzXhRrtv7w9NXNR6H6VRJLkzkif3W4U/yADN4nCGfp/pX8VLOMxYwgN8d +s28JgzBxFDGdwe7tTVOYAEu53Y0vRV93+PJA5Z8nGxEe2V4RSZtN4uws0oGz9QEwopW lKuuE6wT6+utkdMs94CcsbnPKjOd1n0rYAzt/0LsXl1dpVTCSDUMii/4P77Ps6f6gxYl 8Eag== X-Gm-Message-State: APjAAAVCDLNK8Q9ND9ZAr3HVSTW/Dv6D83lUA/UBimpZMmB12uZf6ymC nZ7lKK5TeWyEpN3Y1vgblVpBN3lwTGM= X-Google-Smtp-Source: APXvYqwbCsNNAQv3FR8J5sh+z73JPWHTCujs9/NrvcoEXGy2ysuvWcPi2KpLAUGTyDv5BkjU+sWLrw== X-Received: by 2002:a62:ee14:: with SMTP id e20mr32828041pfi.130.1572882948991; Mon, 04 Nov 2019 07:55:48 -0800 (PST) Received: from urania.lan ([209.134.95.37]) by smtp.gmail.com with ESMTPSA id y24sm20701137pfr.116.2019.11.04.07.55.47 for <19412@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Nov 2019 07:55:48 -0800 (PST) From: "Ryan C. Thompson" References: <0a0e748b-e809-d1e9-e52a-a3d846635fe6@thompsonclan.org> Message-ID: <2c4460c3-ad84-b706-189e-07429a3b2500@thompsonclan.org> Date: Mon, 4 Nov 2019 07:55:46 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <0a0e748b-e809-d1e9-e52a-a3d846635fe6@thompsonclan.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) 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 (-) On further testing, I've determined that this patch does not handle all the relevant code paths. At least ido-file-internal, ido-read-file-name, and ido-read-directory-name all need to be handled, each in a slightly different way. I'll work on it. In any case, please DO NOT install the current patch as is. From unknown Mon Aug 18 11:12:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19412: 24.3; ido-write-file sometimes writes to a different directory than, it says it will Resent-From: "Ryan C. Thompson" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Mar 2020 16:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19412@debbugs.gnu.org Received: via spool by 19412-submit@debbugs.gnu.org id=B19412.158394521615585 (code B ref 19412); Wed, 11 Mar 2020 16:47:01 +0000 Received: (at 19412) by debbugs.gnu.org; 11 Mar 2020 16:46:56 +0000 Received: from localhost ([127.0.0.1]:55431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jC4VT-00043J-KK for submit@debbugs.gnu.org; Wed, 11 Mar 2020 12:46:55 -0400 Received: from mail-qv1-f46.google.com ([209.85.219.46]:35361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jC4VS-000437-Dt for 19412@debbugs.gnu.org; Wed, 11 Mar 2020 12:46:54 -0400 Received: by mail-qv1-f46.google.com with SMTP id u10so1184632qvi.2 for <19412@debbugs.gnu.org>; Wed, 11 Mar 2020 09:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thompsonclan-org.20150623.gappssmtp.com; s=20150623; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=YulTOjh4TYZ2k+r3OW2maDvnAO+mNqQGkpPeN/jUcy8=; b=0Sl8tj/FR4rQEFuCF6wgP5kXhifl/M1hzK4qUemG20GwRM5bsECd3e5VSiJKQwgRT2 SpcQP/wgEwIrGOeT+dsyxiRZ1UIhxuc4MbHfyhZXVsK6dRwPRz6VqH6StIrf1VPeTNPm ULJYcBsXweS+pEqxpz31LiuWDknWPudAAdRxfFo03fYMkc/hycvZmyqWG43txAZQXVLq yTlB3zdk4gVNn0PTSVki2AWCnDC2z5s3I7PwU38iyht0YQIQDB6wR5vODBTItxRvWTuf nnbdQtEdSKiiuh06QX3LfdX2dvVRAtzWPuVOqYDqeNiLIS9eMnmMtDj46YKbtv+mrGgu 0GZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=YulTOjh4TYZ2k+r3OW2maDvnAO+mNqQGkpPeN/jUcy8=; b=BkwJLDkd+veg7+F7emfr95RUxU3MhFhnhDiahEZ6d5Btodqa8knKBfn+R9wP1kMnNl mnTs3xhLJPsEUiiAVeBpH4TRt5Jwcht+vHlfO3xNLJq3HqNBhc5J360tZKQxiUnN4asp eMGoum9LnZNLvUHKXPW3gq3xzlje56TX4Zj6SmaZgXAc3M4KyXILmIk1f5udDHR0zqtE wXJEq9k9fA0d1Uhmbz4lFWIj3jPGgDIjfCFMX2KUuJ386d4oPiiyXi4CO1LJYW/rkjVG L1YyR/vpqpFt3gOroBiFeI1yUukaXMmBAT0lINL0yWLL55kdnoLSayQ+aKiYv5m35oln AqxA== X-Gm-Message-State: ANhLgQ1SQO68dUFNc0OO6XG++BxSraAHWolHxaRyAu3SyDtFo1N374cN qhCOsf1PWCCGjZujz+6PZXmep9Q75Bc= X-Google-Smtp-Source: ADFU+vvK6OM06nJvZx+EAp41CYDtjlWu2rbkVcYnNRgRFtd9qGXtEdvopRP4No26y9mRm2W9wLYo1w== X-Received: by 2002:ad4:58d1:: with SMTP id dh17mr3679846qvb.121.1583945208216; Wed, 11 Mar 2020 09:46:48 -0700 (PDT) Received: from urania.lan (c-73-248-176-35.hsd1.nj.comcast.net. [73.248.176.35]) by smtp.gmail.com with ESMTPSA id i4sm26073827qkf.111.2020.03.11.09.46.45 for <19412@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Mar 2020 09:46:46 -0700 (PDT) From: "Ryan C. Thompson" References: <0a0e748b-e809-d1e9-e52a-a3d846635fe6@thompsonclan.org> <2c4460c3-ad84-b706-189e-07429a3b2500@thompsonclan.org> Message-ID: Date: Wed, 11 Mar 2020 12:46:44 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <2c4460c3-ad84-b706-189e-07429a3b2500@thompsonclan.org> Content-Type: multipart/mixed; boundary="------------67131F11B2E352A49B00A457" Content-Language: en-US X-Spam-Score: 0.0 (/) 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 (-) This is a multi-part message in MIME format. --------------67131F11B2E352A49B00A457 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Ok, I think I have a working patch for this issue. I patched ido-file-internal, ido-read-file-name, and ido-read-directory-name, and I think that's all the code paths that need to be fixed. Now the test case described in the original report produces the correct result for me: writing to /tmp/mumble.frotz. However, I should note that this is still relatively untested. I will test it out and try to make sure it doesn't cause any unexpected issues before I recommend merging it. --------------67131F11B2E352A49B00A457 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="0001-Fix-default-directory-handling-in-ido-file-fallback-.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0001-Fix-default-directory-handling-in-ido-file-fallback-.pa"; filename*1="tch" RnJvbSA0YTk0NDNkZGQ4YmU1N2IyYTc0Y2RhYmY1YWEwZDJjZmJiYTM1MDUzIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiAiUnlhbiBDLiBUaG9tcHNvbiIgPHJjdEB0aG9tcHNv bmNsYW4ub3JnPgpEYXRlOiBXZWQsIDExIE1hciAyMDIwIDEyOjI0OjI0IC0wNDAwClN1Ympl Y3Q6IFtQQVRDSF0gRml4IGRlZmF1bHQgZGlyZWN0b3J5IGhhbmRsaW5nIGluIGlkbyBmaWxl IGZhbGxiYWNrCiAoYnVnIzE5NDEyKQoKQnJpZWZseSwgd2hlbiBmYWxsaW5nIGJhY2sgZnJv bSBpZG8gZmlsZSBjb21wbGV0aW9uIHRvIG5vcm1hbCBmaWxlCmNvbXBsZXRpb24sIHByZXZp b3VzbHkgdGhlIGN1cnJlbnQgZGlyZWN0b3J5IGF0IHRoZSB0aW1lIG9mIGZhbGxpbmcKYmFj ayB3YXMgdHJlYXRlZCBhcyB0aGUgZGVmYXVsdCBkaXJlY3RvcnksIHdoaWNoIHdhcyB3cm9u ZyBhbmQgY2F1c2VkCnVuaW50dWl0aXZlIGVkZ2UgY2FzZXMuIE5vdywgd2hlbiBmYWxsaW5n IGJhY2sgZm9yIGZpbGUgY29tcGxldGlvbiwKaWRvIHVzZXMgdGhlIG9yaWdpbmFsIGRlZmF1 bHQgZGlyZWN0b3J5IHRoYXQgaWRvIHdhcyBjYWxsZWQgd2l0aCBhbmQKdGhlbiB1c2VzIGBt aW5pYnVmZmVyLXdpdGgtc2V0dXAtaG9vaycgdG8gInNpbXVsYXRlIiB0eXBpbm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BvcmlnaW5hbCBESVIgdG8gYHJlYWQtZmlsZS1uYW1lJworICAgICAgICAgIDs7IGJ1dCBz dGFydCB3aXRoIGN1cnJlbnQgdmFsdWUgb2YgRElSIGVudGVyZWQgaW4KKyAgICAgICAgICA7 OyBtaW5pYnVmZmVyLCBzbyB0aGF0IGl0IGNvcnJlY3RseSBoYW5kbGVzIGEgZGVmYXVsdCB0 aGF0CisgICAgICAgICAgOzsgaXMgbm90IGluIHRoZSBjdXJyZW50IGRpcmVjdG9yeS4gU2Vl IGFsc28gYnVnIzE1MTYuCisgICAgICAgICAgOzsgKGlkby10cmFjZSAicmVhZC1maWxlLW5h bWUgZmFsbGJhY2siIChsaXN0IHByb21wdCBvcmlnLWRpciBkZWZhdWx0LWZpbGVuYW1lIG11 c3RtYXRjaCBpbml0aWFsIHByZWRpY2F0ZSkpCisgICAgICAgICAgOzsgKGlkby10cmFjZSAi cmVhZC1maWxlLW5hbWUgZmFsbGJhY2sgaW5pdGlhbCIgZGlyKQorICAgICAgICAgIChtaW5p YnVmZmVyLXdpdGgtc2V0dXAtaG9vaworICAgICAgICAgICAgICAoOmFwcGVuZAorICAgICAg ICAgICAgICAgKGxhbWJkYSAoKQorICAgICAgICAgICAgICAgICA7OyBDbGVhciBvdXQgd2hh dGV2ZXIgc3RhcnRlZCBpbiB0aGUgbWluaWJ1ZmZlciBhbmQKKyAgICAgICAgICAgICAgICAg OzsgcmVwbGFjZSBpdCB3aXRoIHdoYXQgdGhlIHVzZXIgaGFkIGFscmVhZHkgZW50ZXJlZAor ICAgICAgICAgICAgICAgICA7OyBpbnRvIGlkby4KKyAgICAgICAgICAgICAgICAgKGRlbGV0 ZS1taW5pYnVmZmVyLWNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAoaW5zZXJ0IChhYmJy ZXZpYXRlLWZpbGUtbmFtZSBkaXIpKSkpCisgICAgICAgICAgICAocmVhZC1maWxlLW5hbWUg cHJvbXB0IG9yaWctZGlyIGRlZmF1bHQtZmlsZW5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ggaW5pdGlh bCkpKQogICAgICAoKGVxdWFsIGZpbGVuYW1lICIuIikgaWRvLWN1cnJlbnQtZGlyZWN0b3J5 KQogICAgICAodCAoY29uY2F0IGlkby1jdXJyZW50LWRpcmVjdG9yeSBmaWxlbmFtZSkpKSkp Ci0tIAoyLjI1LjAKCg== --------------67131F11B2E352A49B00A457-- From unknown Mon Aug 18 11:12:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19412: 24.3; ido-write-file sometimes writes to a different directory than, it says it will Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Aug 2020 16:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Ryan C. Thompson" Cc: 19412@debbugs.gnu.org Received: via spool by 19412-submit@debbugs.gnu.org id=B19412.159725068124645 (code B ref 19412); Wed, 12 Aug 2020 16:45:02 +0000 Received: (at 19412) by debbugs.gnu.org; 12 Aug 2020 16:44:41 +0000 Received: from localhost ([127.0.0.1]:45343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5trl-0006PL-0r for submit@debbugs.gnu.org; Wed, 12 Aug 2020 12:44:41 -0400 Received: from mail-yb1-f181.google.com ([209.85.219.181]:40433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5trY-0006OT-Am for 19412@debbugs.gnu.org; Wed, 12 Aug 2020 12:44:29 -0400 Received: by mail-yb1-f181.google.com with SMTP id q3so1706899ybp.7 for <19412@debbugs.gnu.org>; Wed, 12 Aug 2020 09:44:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=B51zzFgFDvovS3tP+3B3dwiIEX00EkyGiBdw8Sg5qyA=; b=aK0QbKjGpAWh+SADFFNiksavAMabz9GLhsBc/ponBG92v//6R227vdmMZWABRQyQZZ q9IGwZLD+PN3Yz2Bi1uOLvaM7XCeQatOW4R556NGLMRGNELuFrRZJIt1xajpFwndyCrd 93gcUV2rT7iSPicNDXwYqVejN226BCD2kBLYK3ZlafXDmAdBoTzbXx6GoIX7p2QWIp6I hPIOzIl6UIshFzy8nD3CJdAVhZSsPD0sXiCBrXMNSzsysceRhYOlf3OMAKmpKhgx6ryr HDNEexsEs7QmAm2JJQv+Ze3fw8XzNb0CXwYCit3HYB1qm+NpM73LbdLxuWcAiJo9fNR/ /IXw== X-Gm-Message-State: AOAM530+wmPwcLjTbP8wmO2fn9288thaAcQL6JYYh96N1Ek8lFs2lErE 4HpXwOhjW/Eu6Ub2FXluaU3STuFlCrPZsNj6bFIce6dbYEM= X-Google-Smtp-Source: ABdhPJyWE/AgnEOPf1MUwZy1a/XWf+SVRk6v2xNEjI9OhrL3v9S0NNgUK8/cLjXEy2vsJmDZsPU+WrbNxt5iflgJ4bc= X-Received: by 2002:a25:4609:: with SMTP id t9mr293506yba.231.1597250662790; Wed, 12 Aug 2020 09:44:22 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 12 Aug 2020 09:44:22 -0700 From: Stefan Kangas In-Reply-To: (Ryan C. Thompson's message of "Wed, 11 Mar 2020 12:46:44 -0400") References: <0a0e748b-e809-d1e9-e52a-a3d846635fe6@thompsonclan.org> <2c4460c3-ad84-b706-189e-07429a3b2500@thompsonclan.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Wed, 12 Aug 2020 09:44:22 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) 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 (-) "Ryan C. Thompson" writes: > Ok, I think I have a working patch for this issue. I patched ido-file-internal, > ido-read-file-name, and ido-read-directory-name, and I think that's all the code > paths that need to be fixed. Now the test case described in the original report > produces the correct result for me: writing to /tmp/mumble.frotz. > > However, I should note that this is still relatively untested. I will test it > out and try to make sure it doesn't cause any unexpected issues before I > recommend merging it. Any updates here? Did you give it more testing? Best regards, Stefan Kangas From unknown Mon Aug 18 11:12:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19412: bug#28513 Resent-From: "Ryan C. Thompson" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jan 2021 23:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 28513@debbugs.gnu.org Cc: 19412@debbugs.gnu.org Received: via spool by 19412-submit@debbugs.gnu.org id=B19412.161032005413930 (code B ref 19412); Sun, 10 Jan 2021 23:08:02 +0000 Received: (at 19412) by debbugs.gnu.org; 10 Jan 2021 23:07:34 +0000 Received: from localhost ([127.0.0.1]:55119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyjo6-0003cU-Gf for submit@debbugs.gnu.org; Sun, 10 Jan 2021 18:07:34 -0500 Received: from mail-io1-f43.google.com ([209.85.166.43]:43380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyjo4-0003bm-Ok for 19412@debbugs.gnu.org; Sun, 10 Jan 2021 18:07:33 -0500 Received: by mail-io1-f43.google.com with SMTP id o6so15919553iob.10 for <19412@debbugs.gnu.org>; Sun, 10 Jan 2021 15:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thompsonclan-org.20150623.gappssmtp.com; s=20150623; h=subject:from:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=J3VhXwAEVwPvpDnS9AFPX0zVzmqhQaIs1WGgQ08PdDY=; b=eUSJ3IHm+i3Vzmu47AJTbDfEtySkmHwM2zjc9qWRgD1nGwOvc4fGlsDMX3j+AYZ2d/ e4YNNsw0KNJZAZigCy28nZSvQjLn4021u5mSyynV4WAULis1S7fmY0FgFzc1w3myzbAt IpRQfaxkoU/UFfM5uGXkVTLTz3mwLjB95PL6QWFzxjf/GuWyvIO7C5vfipZoQ46PrQNV XIXaMeWtILHxD6IqvUgy8bZ+xvFq9nz1kh1gJ02fBT97R1Moa7tkaexIp6sJunbGXqdq Gb/RCaAkpjS9e/aFp0C9DbjlRWYM5ZncboQ2Rf8aWSrTS3AUYeLmO3EpkgUSI+yj7jjk uzOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=J3VhXwAEVwPvpDnS9AFPX0zVzmqhQaIs1WGgQ08PdDY=; b=D0EMaJ19T9DSZd+mTZPCb4N1Y5JNqYBEjA4vp7Cy8WRZWDLhjV15UqVogILV4IACvT DtNJT4FzFpWsagY5gRgxxiNRc7/BdWJAIRjAqF6Ew9M08ZQAreyDJudG2/GvrVWCXBOJ MI0uJre1LRN6Zk8UGbTyqUDaIQOfDteieOSUX+qsHkBU8Ye4E7aoCOmm2z2IT6PRuVVK ciUwoOUsKDZeuqQmf5SOYAcbsGjVrUmT+lJShzjtElrlIkDmk8tjN5pfO8Bf2EORK3mD 46rjZ92gdlA4VSSMdeMZv6ySaQpezW4lseSOUQ5t6epoVFHNL3a6XaGUszwusNMlB3QY d0Sw== X-Gm-Message-State: AOAM533wvHAq/T70yRXjWdSlSXyq6J8EhAETDKpZDeQH8gdzjFd97VzC s/VhO275yprCmYDtU1hBKu0qZwX+vJcsKslE X-Google-Smtp-Source: ABdhPJzo8evI1zcGQzuciHwjxxng/3smzlhI/4TvoL5Paa1yseSkbbG0B6pPNf82CpvFX3b6d+zpWg== X-Received: by 2002:a05:6638:3006:: with SMTP id r6mr12339746jak.72.1610320046893; Sun, 10 Jan 2021 15:07:26 -0800 (PST) Received: from urania.local (c-76-116-193-120.hsd1.nj.comcast.net. [76.116.193.120]) by smtp.gmail.com with ESMTPSA id r3sm13201184ilt.76.2021.01.10.15.07.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Jan 2021 15:07:26 -0800 (PST) From: "Ryan C. Thompson" References: <430c52f7-7962-4e65-874f-f4a572951314@thompsonclan.org> Message-ID: Date: Sun, 10 Jan 2021 18:07:23 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <430c52f7-7962-4e65-874f-f4a572951314@thompsonclan.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -0.0 (/) 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 (-) Hello again, I finally got around to testing this patch. I've been using it for over a week now and I haven't observed any unexpected behaviors or issues as a result. And of course, it does indeed resolve the bug as reported here. I believe my patch is ready to merge. Again, for more details on how my patch works, see my investigation in #19412. Regards, Ryan Thompson On 1/1/21 4:51 PM, Ryan C. Thompson wrote: > Hello, > > I believe this bug (#28513) is a duplicate of #19412. In the > discussion for #19412 I have investigated the problem and proposed a > fix that doesn't require special-casing anything. However, due to > being quite busy since then I have not had the time to properly test > my fix. Briefly, the fix is to pass all the original args to the > fallback function unchanged and then use "minibuffer-with-setup-hook" > to simulate deleting the initial input and then typing whatever the > user currently had typed into ido before they triggered the fallback. > > I have rebased the patch from that thread onto the current master and > attached it. To reiterate, this patch should be tested before merging. > > Regards, > > Ryan > From unknown Mon Aug 18 11:12:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19412: 24.3; ido-write-file sometimes writes to a different directory than, it says it will Resent-From: "Ryan C. Thompson" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jan 2021 23:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas Cc: 19412@debbugs.gnu.org Received: via spool by 19412-submit@debbugs.gnu.org id=B19412.161032035115226 (code B ref 19412); Sun, 10 Jan 2021 23:13:02 +0000 Received: (at 19412) by debbugs.gnu.org; 10 Jan 2021 23:12:31 +0000 Received: from localhost ([127.0.0.1]:55128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyjst-0003xW-Ct for submit@debbugs.gnu.org; Sun, 10 Jan 2021 18:12:31 -0500 Received: from mail-il1-f169.google.com ([209.85.166.169]:42896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyjsq-0003x1-Tv for 19412@debbugs.gnu.org; Sun, 10 Jan 2021 18:12:29 -0500 Received: by mail-il1-f169.google.com with SMTP id t3so12414639ilh.9 for <19412@debbugs.gnu.org>; Sun, 10 Jan 2021 15:12:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thompsonclan-org.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=xyOIIKfRkLDQ7NX2Vv5Z1nFbDGoswqRUmSKIjCfnq4Q=; b=l9N1EFq6PI3HObsBCrMTqa5qctIcBokz7pHll4je6euv/3DpfZDmcVEtmM+0w3UoIu 7u9lW03mvUDdH7aYUDd5TIa9qGoH2BKaLK4QxZCO9OqGman1Z26QhIO0LI+LnmXI1omU p245y86x9G7bEbRSDPP2ok4MgCtbu4rDy4MA/qkrv+2fa2VV1Y4X9QomrSk5X+rR9d9b z2LxRapnVU8bm/B42T8ivtYldAm26T3ORROaK5g+pisSMoCUM14m9MMCkyoGNDOfZozq oMU9uXRfiAxv7+Dj8zuB9wKRYUYPwXAv2VHPG6gfHSyYsEm3JxR8/tFVPWge6VKIG2XA TPaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=xyOIIKfRkLDQ7NX2Vv5Z1nFbDGoswqRUmSKIjCfnq4Q=; b=X3ZHcGshBRFQzl0gRng2UPo60DzUmc3bLUSgr05J/T+Sqt3q8vwq1W1utzYaz5yoTv 06q0ik7t/feSDZPVe9p6Y0bhoc/y5GxrRO7T4OlBCwPngioLkMv+1bvFdz20+bm9QA/0 9UODr65v6Cwus9qYmQYSOM8rGi7iEvAklXpjufnRWOR4DbGth30JdIh0k7bYki5a2vi4 20191z0xpIvo7wnK3cIxMkKuVpzq3OWNhhswOLfKYqVP9P6B7AaVpJUi4V/1tevJOvcb WX4UXDooyG/Mvluu9Qh35N75RCT3Tp07tKmZrsdQptrnnn/YnJw6GPoAOD4sMVQE2RBW rVcw== X-Gm-Message-State: AOAM530sRd4/gTynZCSAKbxi4lv+cTajoClUoZ0IH+YgJVKLnLg3LKn6 aA2P+of3O4171V7MSVijP1gwe7bGnCSGAqwO X-Google-Smtp-Source: ABdhPJx/pPUw4UOjHf2aatAvLvwbWu8Ea97zBwxBmhn4IM3Tl49I943yVRBxsMyxySZA211bXFCCxA== X-Received: by 2002:a92:603:: with SMTP id x3mr12843497ilg.107.1610320343148; Sun, 10 Jan 2021 15:12:23 -0800 (PST) Received: from urania.local (c-76-116-193-120.hsd1.nj.comcast.net. [76.116.193.120]) by smtp.gmail.com with ESMTPSA id y13sm10164993iop.14.2021.01.10.15.12.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Jan 2021 15:12:22 -0800 (PST) References: <0a0e748b-e809-d1e9-e52a-a3d846635fe6@thompsonclan.org> <2c4460c3-ad84-b706-189e-07429a3b2500@thompsonclan.org> From: "Ryan C. Thompson" Message-ID: <1f98bdf5-2da4-10b6-57f0-bdc0964a6df9@thompsonclan.org> Date: Sun, 10 Jan 2021 18:12:20 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: 0.7 (/) 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: -0.3 (/) Hi Stefan, It's been a while, but I've fixed up my patch and given it some testing, and it seems to work on for me. However, in the meantime, this issue has recently been "fixed" by special-casing write-file in ido.el, as seen in #28513. So if you want to install my patch now, you'll need to install the version attached to that thread. That version reverts the other fix, since of course they are not compatible, and would be redundant even if they were. Regards, Ryan Thompson On 8/12/20 12:44 PM, Stefan Kangas wrote: > "Ryan C. Thompson" writes: > >> Ok, I think I have a working patch for this issue. I patched ido-file-internal, >> ido-read-file-name, and ido-read-directory-name, and I think that's all the code >> paths that need to be fixed. Now the test case described in the original report >> produces the correct result for me: writing to /tmp/mumble.frotz. >> >> However, I should note that this is still relatively untested. I will test it >> out and try to make sure it doesn't cause any unexpected issues before I >> recommend merging it. > Any updates here? Did you give it more testing? > > Best regards, > Stefan Kangas From unknown Mon Aug 18 11:12:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19412: 24.3; ido-write-file sometimes writes to a different directory than, it says it will Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jan 2021 14:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Ryan C. Thompson" Cc: 19412@debbugs.gnu.org, Stefan Kangas Received: via spool by 19412-submit@debbugs.gnu.org id=B19412.16103745043604 (code B ref 19412); Mon, 11 Jan 2021 14:16:02 +0000 Received: (at 19412) by debbugs.gnu.org; 11 Jan 2021 14:15:04 +0000 Received: from localhost ([127.0.0.1]:56179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyxyJ-0000vj-Ko for submit@debbugs.gnu.org; Mon, 11 Jan 2021 09:15:03 -0500 Received: from quimby.gnus.org ([95.216.78.240]:53174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyxyI-0000tH-7N for 19412@debbugs.gnu.org; Mon, 11 Jan 2021 09:15:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xpsikXsGn2Fs/xt4+dboL41vXq9izqGU8+IB42PG9zM=; b=D2gDjHz5dC0l4sYPrPz3MWpint jx/klxjHg/hjGIuScOl80KeaOECZPGK3Wb113gXxNbBG8NzX7Z/oqPmgY3F9e2V/uuhDuuc5XBd5G Zi+tz+ght0s+jxrk7ozGzZFxW66fq861/8BVhF+/7PL2QQgyDbP5PYnxKlWUxjyUNdxc=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyxy7-0007U0-Mm; Mon, 11 Jan 2021 15:14:54 +0100 From: Lars Ingebrigtsen References: <0a0e748b-e809-d1e9-e52a-a3d846635fe6@thompsonclan.org> <2c4460c3-ad84-b706-189e-07429a3b2500@thompsonclan.org> <1f98bdf5-2da4-10b6-57f0-bdc0964a6df9@thompsonclan.org> X-Now-Playing: Aural Exciters's _Mutant Disco Volume 2_: "Spooks In Space (Discomix)" Date: Mon, 11 Jan 2021 15:14:50 +0100 In-Reply-To: <1f98bdf5-2da4-10b6-57f0-bdc0964a6df9@thompsonclan.org> (Ryan C. Thompson's message of "Sun, 10 Jan 2021 18:12:20 -0500") Message-ID: <877dojimqt.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: "Ryan C. Thompson" writes: > It's been a while, but I've fixed up my patch and given it some > testing, and it seems to work on for me. However, in the meantime, > this issue has recently been "fixed" by special-casing write-fi [...] Content analysis details: (-1.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 URIBL_SBL_A Contains URL's A record listed in the Spamhaus SBL blocklist [URIs: thompsonclan.org] 1.0 URIBL_SBL Contains an URL's NS IP listed in the Spamhaus SBL blocklist [URIs: thompsonclan.org] X-Spam-Score: 0.7 (/) 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: -0.3 (/) "Ryan C. Thompson" writes: > It's been a while, but I've fixed up my patch and given it some > testing, and it seems to work on for me. However, in the meantime, > this issue has recently been "fixed" by special-casing write-file in > ido.el, as seen in #28513. So if you want to install my patch now, > you'll need to install the version attached to that thread. That > version reverts the other fix, since of course they are not > compatible, and would be redundant even if they were. It looks like a more thorough fix. However: + (minibuffer-with-setup-hook + (:append + (lambda () + ;; Clear out whatever started in the minibuffer and + ;; replace it with what the user had already entered + ;; into ido. + (delete-minibuffer-contents) + (insert (abbreviate-file-name ido-current-directory)))) + (call-interactively this-command)))) I'd be worried that this would step on other modifications the user may be doing from the minibuffer setup. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Aug 18 11:12:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19412: 24.3; ido-write-file sometimes writes to a different directory than, it says it will Resent-From: "Ryan C. Thompson" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jan 2021 14:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 19412@debbugs.gnu.org, Stefan Kangas Received: via spool by 19412-submit@debbugs.gnu.org id=B19412.161037529912733 (code B ref 19412); Mon, 11 Jan 2021 14:29:01 +0000 Received: (at 19412) by debbugs.gnu.org; 11 Jan 2021 14:28:19 +0000 Received: from localhost ([127.0.0.1]:56202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyyB9-0003JI-CN for submit@debbugs.gnu.org; Mon, 11 Jan 2021 09:28:19 -0500 Received: from mail-io1-f46.google.com ([209.85.166.46]:33378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyyB5-0003J2-B0 for 19412@debbugs.gnu.org; Mon, 11 Jan 2021 09:28:18 -0500 Received: by mail-io1-f46.google.com with SMTP id w18so18028754iot.0 for <19412@debbugs.gnu.org>; Mon, 11 Jan 2021 06:28:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thompsonclan-org.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=IrdENmKvh3Ks6LRLsAH0wFEHfPSMiSQBV9aA0jwJYCU=; b=nuiH4w24DKrvEQd/JksqT4BZiCbAMZ0AwQKqobOR6ucWJBInHF08cqv0PWY/NlTOS8 vCoQhvZ6FYFWUjKBhfqHrXtSCeV/OSU9lF0VOPmmfaHhliYRQomDJZLzpOLaWYzTapED yhXYoLSP9jMP+0Do1yyUFlXRtWd0oIztGdsMJf8i3boFF+WR4YJeBdXtUd94EdAw0gsD VuZKoCYtMWUxztmKMPmgBkLATsMwxwfpKV/YGmyEbjjGoLyRZQq80w0C7AcznW09vwK0 nSjbv3xUWGxlnmuKMlR4lhl024e5dISlkxH/Xepgx3o7j5rowNcHfiaFQUhLCsQiqSMI 4yGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=IrdENmKvh3Ks6LRLsAH0wFEHfPSMiSQBV9aA0jwJYCU=; b=i8QKSVDg6U51nYaYMdNAcWw27/dYIHPts9hKZ38NjPQrjcO6PXizOl074WmwCAJr0N E6lcrftu9bvXfo96mwMU5IKi/i/7KWZFN3jYjrh2bhiDG4MXxK1p336ViQN5HYGEEBAV mcxHBhhmOi0PxCbCARvZ6oWDg9WXGovyA7M8l1cjsxCw1ixUaRqon97xFxACI//3lYV8 Bz4tV7nY1FPxeOBQzqz3USTx8yvfZhxAP6EaSEMhk7t7JTyjE7yYjAHbbo4Gas73pypP 1fML2wQUwkjSeiX8p3dPpohnrWAwxLO2edNhxar00ezQD3jiuwQ6fyvkOkVXQUbFw8/l CO5w== X-Gm-Message-State: AOAM533nyfphMrlWp5FLNd3RNJj9aqhAeYJzWiNXSQfPojkrIWDNLv3r YZezK7XCAqwScGFeBD3RdjbgJsXhDLs43B4v X-Google-Smtp-Source: ABdhPJyK7gHLaPIcVGqRXibxza1fc6mfrVMlGnfg3+DFfsILRRvckPMIcC9vpy9rM+4cM5lSUyL0Xw== X-Received: by 2002:a6b:c8cb:: with SMTP id y194mr14659889iof.69.1610375289266; Mon, 11 Jan 2021 06:28:09 -0800 (PST) Received: from urania.local (c-76-116-193-120.hsd1.nj.comcast.net. [76.116.193.120]) by smtp.gmail.com with ESMTPSA id t14sm11561495iof.23.2021.01.11.06.28.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jan 2021 06:28:08 -0800 (PST) References: <0a0e748b-e809-d1e9-e52a-a3d846635fe6@thompsonclan.org> <2c4460c3-ad84-b706-189e-07429a3b2500@thompsonclan.org> <1f98bdf5-2da4-10b6-57f0-bdc0964a6df9@thompsonclan.org> <877dojimqt.fsf@gnus.org> From: "Ryan C. Thompson" Message-ID: Date: Mon, 11 Jan 2021 09:28:06 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <877dojimqt.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: 0.7 (/) 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: -0.3 (/) On 1/11/21 9:14 AM, Lars Ingebrigtsen wrote: > "Ryan C. Thompson" writes: > >> It's been a while, but I've fixed up my patch and given it some >> testing, and it seems to work on for me. However, in the meantime, >> this issue has recently been "fixed" by special-casing write-file in >> ido.el, as seen in #28513. So if you want to install my patch now, >> you'll need to install the version attached to that thread. That >> version reverts the other fix, since of course they are not >> compatible, and would be redundant even if they were. > It looks like a more thorough fix. However: > > + (minibuffer-with-setup-hook > + (:append > + (lambda () > + ;; Clear out whatever started in the minibuffer and > + ;; replace it with what the user had already entered > + ;; into ido. > + (delete-minibuffer-contents) > + (insert (abbreviate-file-name ido-current-directory)))) > + (call-interactively this-command)))) > > I'd be worried that this would step on other modifications the user may > be doing from the minibuffer setup. The only case where this would step on other minibuffer setup code is when that code makes modifications to the initial input in the minibuffer, since those modifications would be deleted and replaced. However, in this case I'd argue that is the correct behavior. The point of this code is to fall back from ido completion to standard emacs completion while preserving the current input. That means that any setup hook that modifies the initial contents of the minibuffer has *already* run at the start of ido completion and should not run *again* here. Effectively, we want to pretend that we are continuing the same completion session with a different completion system, even though we are actually starting a new completion session. And to do that, we need to preserve the user's current input verbatim when falling back. From unknown Mon Aug 18 11:12:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19412: 24.3; ido-write-file sometimes writes to a different directory than, it says it will Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jan 2021 18:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Ryan C. Thompson" Cc: 19412@debbugs.gnu.org, Stefan Kangas Received: via spool by 19412-submit@debbugs.gnu.org id=B19412.16103906297756 (code B ref 19412); Mon, 11 Jan 2021 18:44:02 +0000 Received: (at 19412) by debbugs.gnu.org; 11 Jan 2021 18:43:49 +0000 Received: from localhost ([127.0.0.1]:58243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kz2AP-000212-AI for submit@debbugs.gnu.org; Mon, 11 Jan 2021 13:43:49 -0500 Received: from quimby.gnus.org ([95.216.78.240]:56166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kz2AO-00020q-10 for 19412@debbugs.gnu.org; Mon, 11 Jan 2021 13:43:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZvGDceIO19Yxh8Dy7Ynffx9JbyQT8tkFWWvbpUElsbc=; b=r/Jwx4/otzdt7I/+QiQCfGx5vl OFzUIpYerEgNqJxR/4+oi/38LKUWgQ+rY3quO9G/K30rDwK40bo3PTJ3xLqig0lzxv+2ccjE7cIUM 6n8HdR8/P9g3+Cu00tM2cSmkPaLaA7j7Xp/IHCT8Cdq12HM4H+zCke8BBliNBKOE6cA8=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kz2AE-0001eu-F1; Mon, 11 Jan 2021 19:43:40 +0100 From: Lars Ingebrigtsen References: <0a0e748b-e809-d1e9-e52a-a3d846635fe6@thompsonclan.org> <2c4460c3-ad84-b706-189e-07429a3b2500@thompsonclan.org> <1f98bdf5-2da4-10b6-57f0-bdc0964a6df9@thompsonclan.org> <877dojimqt.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEUrJSYkHh5NOkOQ T0b///+qhH9IAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UBCxIkMd+oGKIAAAHCSURBVDjLXVSLscQg CERtAHMNKDYQof/e3oLm97iLM2FxQRZDRIxfWCJO9TJ3MMU71cdSjWiRlkkaUR3TY/iwFECT1rID 2c4gZesXf1gdpitbpo9l8x0cdXz8Q0fr/0I1w48acvINmymLDPG1XZ5iQlGt24czgCw3kmXXYPYC nAo1ZbENyGMRFn75At4Zd2ujLyCmj/8NoCWmK9cnuVjLcvvfW+Bq7448wMd9k42oPvpfaeux/Usn iJjeZGhQ6OSaX5osLjtx9jUMvKjaat9Qantw0ktxpsOcfpXHq/C2Bm2oJG5xGkyhB/TFfOjojAoA eZKa8F+LmQO2hEGROIEfwlLZQOTUkRV+jM7oGE1u5plwHCsJwUWtjMnDAQmAix3qVPoDEFXJLt6W bLBJluoaJI7kbp49JSS/Os8qp/Xxg7/X5M++UMep45z2Q/pODngb2TurOrCjIBHuF9iocnSdJ+g7 iI4pwmjjtYMnKp0AsiqAfUf9cmpRPVFTswmAq1NtVUJmLEdn5YSqoPTnrmWBVIjxK/e+cckBxEOh VtI1R1up0xd06+S3G8EzdBRZyV9AaJxpDVatzzfn39fnftn7HP4DLF1Z0zFFb68AAAAldEVYdGRh dGU6Y3JlYXRlADIwMjEtMDEtMTFUMTg6MzY6NDgrMDA6MDABzbx4AAAAJXRFWHRkYXRlOm1vZGlm eQAyMDIxLTAxLTExVDE4OjM2OjQ4KzAwOjAwcJAExAAAAABJRU5ErkJggg== X-Now-Playing: Pulse Lovers's _Scarred For Life 2_: "Dobbs And Clogs" Date: Mon, 11 Jan 2021 19:43:37 +0100 In-Reply-To: (Ryan C. Thompson's message of "Mon, 11 Jan 2021 09:28:06 -0500") Message-ID: <87o8hvco12.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: "Ryan C. Thompson" writes: > And to do that, we need to preserve the user's current input > verbatim when falling back. Sounds reasonable, but who knows what people are doing in the setup hooks there? So I worry about making a change like this, perhaps overly much. Content analysis details: (-1.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 URIBL_SBL_A Contains URL's A record listed in the Spamhaus SBL blocklist [URIs: thompsonclan.org] 1.0 URIBL_SBL Contains an URL's NS IP listed in the Spamhaus SBL blocklist [URIs: thompsonclan.org] X-Spam-Score: 0.7 (/) 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: -0.3 (/) "Ryan C. Thompson" writes: > And to do that, we need to preserve the user's current input > verbatim when falling back. Sounds reasonable, but who knows what people are doing in the setup hooks there? So I worry about making a change like this, perhaps overly much. I guess the only way to find out whether it breaks a lot of stuff or not is to try it out and get feedback. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Aug 18 11:12:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19412: 24.3; ido-write-file sometimes writes to a different directory than, it says it will Resent-From: "Ryan C. Thompson" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jan 2021 18:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 19412@debbugs.gnu.org, Stefan Kangas Received: via spool by 19412-submit@debbugs.gnu.org id=B19412.16103910598437 (code B ref 19412); Mon, 11 Jan 2021 18:51:01 +0000 Received: (at 19412) by debbugs.gnu.org; 11 Jan 2021 18:50:59 +0000 Received: from localhost ([127.0.0.1]:58247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kz2HL-0002C0-5S for submit@debbugs.gnu.org; Mon, 11 Jan 2021 13:50:59 -0500 Received: from mail-il1-f176.google.com ([209.85.166.176]:39606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kz2HH-0002Bi-V5 for 19412@debbugs.gnu.org; Mon, 11 Jan 2021 13:50:58 -0500 Received: by mail-il1-f176.google.com with SMTP id q1so146922ilt.6 for <19412@debbugs.gnu.org>; Mon, 11 Jan 2021 10:50:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thompsonclan-org.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=FNf/7XKajH8DqwaP8KlhRIO+Omt800M+2kpIZ/B3zfs=; b=QE2cZCPjJSM0b4FvFvgEIDv/Sm12O1/7q8F7O2OuhQrqpa+SHHKtvsrzj0qy7Ek5Da XD4f0lZsRQRnblMTiBeyl2uLfjKpO6BHSwOOYv8Upc0ujfrQa9aG+e87aeJ4RRZh5Awy eB4uXKq7oVLz5o2Ru6tekqbKqw2F1ZqhwSIp2AnmNWTDEsevqGH9G9mYevY8W65tZuB0 AW7TI2D1oQjysYfo74EioV/eaQGB1UtJJInXaoNTuewqzbOoSgWBhuTiJqtqmBAAnEBI xKhD3RVy4fxs5r0woDwuVQqIEAX8pery1bZl4zqH2TOASxaEEIsCjiCfl2qaCUNLdFj+ +ExA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=FNf/7XKajH8DqwaP8KlhRIO+Omt800M+2kpIZ/B3zfs=; b=L4Y9q9jaI1mUHR0JkO84nDdsfaO8P1ZggdjvdvWFpiUcCeWak05YaRFxKqjcN33tr2 IVhvENt9ahW9UL2U+NMpejNyaQ+a2JIn8xIjdGR8l7aXdGpufBvIbpDfs3bX8ewhcZFh TLNgXgV+iPw8D9VbnLlrHtTpX4izs74ckcgdivnhkl1YjHTJef0uTZ57dRmRvwGZGDry Yc8ArHCscd7KBnqO8SFbSb6fGnlMK0OgqOd4BUpj+SKNx7/pYEFWSoXRztjpz14Y1Cp3 uxyZK+gBhx1u6J21hCzjJuO41knXMwu5i0mmpZL/Q8VzdICZDRIVfehoteneEA/8fK93 L5cQ== X-Gm-Message-State: AOAM530gF30Uw20o3hyIFwk3rVFoh4Vj4iC45aB0/kwUK72obF+WMRZk kpmo+lw6GfQ8oK/Ar+TAJey+COsZdJU8qkd8 X-Google-Smtp-Source: ABdhPJyJjl8spXeN2U/8Y4cSV5IUSrfeKhVOS9r9nztHqLwDpNBZ0PpMOGaaJxyHEWWGNf7oxe0RkQ== X-Received: by 2002:a92:5a4a:: with SMTP id o71mr528897ilb.150.1610391049944; Mon, 11 Jan 2021 10:50:49 -0800 (PST) Received: from urania.local (c-76-116-193-120.hsd1.nj.comcast.net. [76.116.193.120]) by smtp.gmail.com with ESMTPSA id r9sm261996ill.72.2021.01.11.10.50.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jan 2021 10:50:49 -0800 (PST) References: <0a0e748b-e809-d1e9-e52a-a3d846635fe6@thompsonclan.org> <2c4460c3-ad84-b706-189e-07429a3b2500@thompsonclan.org> <1f98bdf5-2da4-10b6-57f0-bdc0964a6df9@thompsonclan.org> <877dojimqt.fsf@gnus.org> <87o8hvco12.fsf@gnus.org> From: "Ryan C. Thompson" Message-ID: <1fc3637a-ef93-0f68-0dfb-a37a575ecbe3@thompsonclan.org> Date: Mon, 11 Jan 2021 13:50:46 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <87o8hvco12.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: 0.7 (/) 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: -0.3 (/) On 1/11/21 1:43 PM, Lars Ingebrigtsen wrote: > "Ryan C. Thompson" writes: > >> And to do that, we need to preserve the user's current input >> verbatim when falling back. > Sounds reasonable, but who knows what people are doing in the setup > hooks there? So I worry about making a change like this, perhaps overly > much. > > I guess the only way to find out whether it breaks a lot of stuff or > not is to try it out and get feedback. > Yes, it's definitely an invasive change, and more properly characterized as a work-around than a true fix, so the worry isn't unwarranted. I'm pretty sure the code is correct (or as close to correct as possible given the "API" limitations we're working with), but it's always possible there's some edge case I haven't anticipated.