[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master adfb6f1: Continue to fix bug#25607
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] master adfb6f1: Continue to fix bug#25607 |
Date: |
Wed, 15 Feb 2017 16:50:58 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
>>> * 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:address@hidden: 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)