From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#28513: 25.1; ido insists on guessing the wrong directory Date: Sun, 13 Dec 2020 14:12:01 +0100 Message-ID: <87o8ix4zq6.fsf@gnus.org> References: <3526ABC6-2389-492A-83D7-A26195A6FC37@gmail.com> <875z575iog.fsf@gnus.org> <88f8e8d4-581b-85f8-92e6-8607d533cd77@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3716"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Guillaume Salagnac , 28513@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 13 14:14:53 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koRDB-0000pL-BX for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Dec 2020 14:14:53 +0100 Original-Received: from localhost ([::1]:60866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koRDA-0003CL-Bz for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Dec 2020 08:14:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koRBO-0002IB-7a for bug-gnu-emacs@gnu.org; Sun, 13 Dec 2020 08:13:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36158) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koRBN-00034Z-VB for bug-gnu-emacs@gnu.org; Sun, 13 Dec 2020 08:13:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1koRBN-0007rJ-Np for bug-gnu-emacs@gnu.org; Sun, 13 Dec 2020 08:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Dec 2020 13:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28513 X-GNU-PR-Package: emacs Original-Received: via spool by 28513-submit@debbugs.gnu.org id=B28513.160786513330059 (code B ref 28513); Sun, 13 Dec 2020 13:13:01 +0000 Original-Received: (at 28513) by debbugs.gnu.org; 13 Dec 2020 13:12:13 +0000 Original-Received: from localhost ([127.0.0.1]:47704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koRAb-0007ol-Hl for submit@debbugs.gnu.org; Sun, 13 Dec 2020 08:12:13 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:58374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koRAZ-0007oC-LA for 28513@debbugs.gnu.org; Sun, 13 Dec 2020 08:12:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=PU71YJ5MJ9dDkg3Vc/pWSg+p0JOdnA2At8n3NdR1mHc=; b=UwXEDQdcxsM6UZbu/gZEut/bTO GHjoExsrX3Qjc2MNZntGGk/sxCXgUbHoX+M6cRU9knNNHYwiP3q5wZ4QftyeD/Wg45JgWHpg1OLzN +OpSZdtA7dLe4S/HIouj4teL2Uz+udEPl2LquGyVuPFuCc7xOLCOk6yAghtNEwIdHbro=; Original-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 1koRAQ-0005HV-JI; Sun, 13 Dec 2020 14:12:05 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJ1BMVEUnKjFIWW55hYZX Ym+RmZyMd4beO1DQtL/MydHqHjSzucl8quv////g3T9KAAAAAWJLR0QMgbNRYwAAAAd0SU1FB+QM DQwbKg0MPcAAAAGjSURBVDjLbdFLbsIwEAZgrmDcCxBygcSpVHVpoqrqtmXBvg2EA5DQAxCLAwR5 XzXWdN37dfyIY1MGCYb5/DtOMpvN5nmSJEv9tSCJrxmC/5OR+U1YEkJuQoaQ3wAdIBSblPMyBB3Q kbTUZUA3nJs5obwc4c4uWVgg6QSm4ZmD+RWsCIkiHjIPRQRTgNAIpoDbywEP5vbyDhYZu4pY4Czc ihYeVixMUOaBZZSxac4KBytmyozZfVW95g7sPNMPPW27ppYfqQFul+MUoGla0aEYWOBilrzAGWBo jMj+Tb8PyvJSCSFAB7CEONbvCJRmz8LOh62R5tRXCAUr9Bw3+tlIU31V9QgPehsT+JVj1VsNnQvA xoNsDeyVHsPTNL8IDeKwv5rL1kInq/W6kmFA2IsfZVy7EU7xvBcW8Ke+DrhEHNGBEaLIdgIQhyDQ ejiD6qKzjoB3p6YTtxFAFwcMAOCzVZsoYEGps1LuxD1eUAilEB71Tkq5E++ww1OKEbC+bUAoUBEM Q20C5tVAmAC8yf4TZ/gBFQKeeDv2EAIcbeA/fF18C38TwJZnmmD7qQAAACV0RVh0ZGF0ZTpjcmVh dGUAMjAyMC0xMi0xM1QxMjoyNzo0MiswMDowMOcXzaIAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAt MTItMTNUMTI6Mjc6NDErMDA6MDCnom+DAAAAAElFTkSuQmCC X-Now-Playing: Colleen's _A Flame My Love, A Frequency_: "A Flame My Love, A Frequency" In-Reply-To: <88f8e8d4-581b-85f8-92e6-8607d533cd77@yandex.ru> (Dmitry Gutov's message of "Sun, 13 Dec 2020 03:11:41 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195953 Archived-At: Dmitry Gutov writes: > On 12.12.2020 14:10, Lars Ingebrigtsen wrote: >> I don't use ido-mode for files normally -- are there any ido users here >> that do? If so, does this seem like expected behaviour to you? > > Looks like a bug, yes. > > The scenario looks pretty specific, though, that's probably why it > hasn't come up before. I have a slightly simpler reproduction case: emacs -Q -f ido-mode lisp/abbrev.el C-x C-w RET C-f RET This should write the file to calc/abbrev.el, but prompts for overwriting. Here's the backtrace with debug-on-quit: Debugger entered--Lisp error: (quit) read-from-minibuffer("File =E2=80=98~/src/emacs/trunk/lisp/abbrev.el=E2= =80=99 exists; ov. y-or-n-p("File =E2=80=98~/src/emacs/trunk/lisp/abbrev.el=E2=80=99 exists;= ov...") write-file("~/src/emacs/trunk/lisp/abbrev.el" t) funcall-interactively(write-file "~/src/emacs/trunk/lisp/abbrev.el" t) call-interactively(write-file) ido-file-internal(write write-file nil "Write file: " nil nil ignore) ido-write-file() I was momentarily puzzled about why that call-interactively to write-file didn't re-prompt about the location, but: ((eq ido-exit 'fallback) ;; Need to guard setting of default-directory here, since ;; we don't want to change directory of current buffer. (let ((default-directory ido-current-directory) (read-file-name-function nil)) (setq this-command (or ido-fallback fallback 'find-file)) (run-hook-with-args 'ido-before-fallback-functions this-command) (call-interactively this-command))) So hitting `C-f' makes ido go into `fallback' mode? Yes! (define-key map "\C-f" 'ido-magic-forward-char) (defun ido-magic-forward-char (arg) "Move forward in user input or perform magic action. If no user input is present, or at end of input, perform magic actions: C-x C-b ... C-f switch to `ido-find-file'. C-x C-f ... C-f fallback to non-Ido `find-file'. C-x C-d ... C-f fallback to non-Ido brief `dired'. C-x d ... C-f fallback to non-Ido `dired'." (interactive "P") (cond ((or arg (not (eobp))) (forward-char (min (prefix-numeric-value arg) (- (point-max) (point))))) ((memq ido-cur-item '(file dir)) (ido-fallback-command)) So... this is apparently a feature? Hitting `C-f' disables ido and calls the fallback command, which is `write-region' in this case. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no