From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master adfb6f1: Continue to fix bug#25607 Date: Wed, 15 Feb 2017 16:50:58 -0500 Message-ID: References: <20170215184246.30452.62655@vcs0.savannah.gnu.org> <20170215184247.DC51023357@vcs0.savannah.gnu.org> <8e6b7990-3424-6780-ddc7-8ae36cff06d0@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1487195477 16000 195.159.176.226 (15 Feb 2017 21:51:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 15 Feb 2017 21:51:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Michael Albinus , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 15 22:51:13 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ce7Ti-0003fr-S8 for ged-emacs-devel@m.gmane.org; Wed, 15 Feb 2017 22:51:10 +0100 Original-Received: from localhost ([::1]:43179 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ce7To-0000Cc-J9 for ged-emacs-devel@m.gmane.org; Wed, 15 Feb 2017 16:51:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ce7Th-0000CU-TJ for emacs-devel@gnu.org; Wed, 15 Feb 2017 16:51:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ce7Te-0007Ff-QT for emacs-devel@gnu.org; Wed, 15 Feb 2017 16:51:09 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:47215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ce7Te-0007Ee-JK for emacs-devel@gnu.org; Wed, 15 Feb 2017 16:51:06 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v1FLowf5002446; Wed, 15 Feb 2017 16:50:58 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 85A1360198; Wed, 15 Feb 2017 16:50:58 -0500 (EST) In-Reply-To: <8e6b7990-3424-6780-ddc7-8ae36cff06d0@yandex.ru> (Dmitry Gutov's message of "Wed, 15 Feb 2017 22:41:01 +0200") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV5949=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5949> : inlines <5699> : streams <1733088> : uri <2377804> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212412 Archived-At: >>> * lisp/ido.el (ido-complete): Let-bind `non-essential' to nil. >> This looks wrong. This in an interactive command executing an explicit >> request from the user, so it's definitely not non-essential. > Hence "to nil"? Oh, right, sorry, duh! Indeed, it's perfectly safe then to bind it to nil there. Hmm... then I wonder why this binding would be needed at all: why wouldn't the variable already be nil? [...time passes...] Oh, I see: there is an incorrect binding in ido-read-internal which means that all commands within IDO are treated as non-essential. The way I see it, The Right Way would be to do the binding in ido-exhibit, since that's the code run from post-command-hook, i.e. the code that's not explicitly requested by the user. Stefan diff --git a/lisp/ido.el b/lisp/ido.el index e18464d1d6b..bb4c67c7c01 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1882,7 +1882,6 @@ ido-read-internal ido-selected ido-final-text (done nil) - (non-essential t) ;; prevent eager Tramp connection (icomplete-mode nil) ;; prevent icomplete starting up ;; Exported dynamic variables: ido-cur-list @@ -3556,7 +3555,6 @@ ido-file-name-all-completions-1 ;; Strip method:user@host: part of tramp completions. ;; Tramp completions do not include leading slash. (let* ((len (1- (length dir))) - (non-essential t) (compl (or ;; We do not want to be disturbed by "File does not ;; exist" errors. @@ -4413,6 +4411,7 @@ ido-exhibit (when (ido-active) (let ((contents (buffer-substring-no-properties (minibuffer-prompt-end) (point-max))) + (non-essential t) (buffer-undo-list t) try-single-dir-match refresh)