emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r108646: * minibuffer.el (read-fi


From: Michael Albinus
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r108646: * minibuffer.el (read-file-name-default): Bind `non-essential' to `t'.
Date: Mon, 18 Jun 2012 11:00:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>   * minibuffer.el (read-file-name-default): Bind `non-essential' to `t'.
>
> This is wrong.  At the time it happens, it is the main focus of the
> user's interaction, so it is very much essential.

`non-essential' is meant to protect user interaction from undesired
events like connection establishing, including password request
etc. Usually, it is the task of the several file name completion
packages to care. Ido and icomplete, for example, behave like this.

However, without the patch in minibuffer, it still happens. This is due
to a `file-exists-p' call somewhere in the completion.

Maybe there is a better place to bind `non-essential'. But I still don't
understand all the completion code :-(

Here's a recipe to reproduce the problem (revert the patch in
minibuffer.el first):

emacs -Q -l icomplete -f icomplete-mode
C-x C-f /ssh:localhost:/ <TAB>

When quitting the password request, there's the backtrace

Debugger entered--Lisp error: (quit)
  signal(quit nil)
  byte-code("\302^H!\210\303    @       A\"\207" [vec err tramp-cleanup signal] 
3)
  byte-code("\306^H!\307^H\310\311#\312 
!r\313^H!q\210`)^Z^Y^[\211^\\203)address@hidden)address@hidden>address@hidden"address@hidden@\321\322
 ^MA\"\32$
  tramp-maybe-open-connection(["ssh" nil "localhost" "/" nil])
  tramp-send-command(["ssh" nil "localhost" "/" nil] "echo \\\"`getconf PATH 
2>/dev/null`\\\" 2>/dev/null; echo tramp_exit_status $?")
  tramp-send-command-and-check(["ssh" nil "localhost" "/" nil] "echo 
\\\"`getconf PATH 2>/dev/null`\\\"")
  tramp-send-command-and-read(["ssh" nil "localhost" "/" nil] "echo 
\\\"`getconf PATH 2>/dev/null`\\\"" noerror)
  tramp-get-remote-path(["ssh" nil "localhost" "/" nil])
  tramp-get-remote-perl(["ssh" nil "localhost" "/" nil])
  tramp-sh-handle-file-name-all-completions("" "/ssh:localhost:/")
  apply(tramp-sh-handle-file-name-all-completions ("" "/ssh:localhost:/"))
  tramp-sh-file-name-handler(file-name-all-completions "" "/ssh:localhost:/")
  apply(tramp-sh-file-name-handler file-name-all-completions ("" 
"/ssh:localhost:/"))
  byte-code("\300\301\215\207" [suppress (apply foreign operation args)] 2)
  #[nil 
"^HK\306^Y\211^Z<address@hidden@address@hidden"address@hidden@address@hidden@address@hidden@\315$
  funcall(#[nil 
"^HK\306^Y\211^Z<address@hidden@address@hidden"address@hidden@address@hidden@address@hidden
  tramp-file-name-handler(file-name-all-completions "" "/ssh:localhost:/")
  file-name-all-completions("" "/ssh:localhost:/")
  tramp-handle-file-name-completion("" "/ssh:localhost:/" file-exists-p)
  apply(tramp-handle-file-name-completion ("" "/ssh:localhost:/" file-exists-p))
  tramp-sh-file-name-handler(file-name-completion "" "/ssh:localhost:/" 
file-exists-p)
  apply(tramp-sh-file-name-handler file-name-completion ("" "/ssh:localhost:/" 
file-exists-p))
  byte-code("\300\301\215\207" [suppress (apply foreign operation args)] 2)
  #[nil 
"^HK\306^Y\211^Z<address@hidden@address@hidden"address@hidden@address@hidden@address@hidden@\315$
  funcall(#[nil 
"^HK\306^Y\211^Z<address@hidden@address@hidden"address@hidden@address@hidden@address@hidden
  tramp-file-name-handler(file-name-completion "" "/ssh:localhost:/" 
file-exists-p)
  file-name-completion("" "/ssh:localhost:/" file-exists-p)
  #[0 "address@hidden,\203)address@hidden \"address@hidden
  funcall(#[0 "address@hidden,\203)address@hidden \"address@hidden
  completion-file-name-table("/ssh:localhost:/" file-exists-p nil)
  try-completion("/ssh:localhost:/" completion-file-name-table file-exists-p)
  completion-basic-try-completion("/ssh:localhost:/" completion-file-name-table 
file-exists-p 16)
  #[257 "address@hidden@address@hidden" [1 ("/ssh:localhost:/") 
(completion-file-name-table) file-exists-p (16) completion-styles-alist] 6 
"\n\n(fn $
  #[0 "address@hidden@address@hidden" [#[257 "address@hidden@address@hidden" [1 
("/ssh:localhost:/") (completion-file-name-table) file-e$
  funcall(#[0 "address@hidden@address@hidden" [#[257 
"address@hidden@address@hidden" [1 ("/ssh:localhost:/") 
(completion-file-name-table$
  completion--some(#[257 "address@hidden@address@hidden" [1 
("/ssh:localhost:/") (completion-file-name-table) file-exists-p (16) 
completion-styles-a$
  completion--nth-completion(1 "/ssh:localhost:/" read-file-name-internal 
file-exists-p 16 (metadata (category . file) (completion--unquote-requote . t)))
  completion-try-completion("/ssh:localhost:/" read-file-name-internal 
file-exists-p 16 (metadata (category . file) (completion--unquote-requote . t)))
  completion--do-completion()
  minibuffer-complete()
  call-interactively(minibuffer-complete nil nil)
  read-from-minibuffer("Find file: " "~/src/emacs/" (keymap (keymap (32)) 
keymap (10 . minibuffer-complete-and-exit) (13 . minibuffer-complete-and-exit) 
key$
  completing-read-default("Find file: " read-file-name-internal file-exists-p 
confirm-after-completion "~/src/emacs/" file-name-history "~/src/emacs/" nil)
  completing-read("Find file: " read-file-name-internal file-exists-p 
confirm-after-completion "~/src/emacs/" file-name-history "~/src/emacs/")
  read-file-name-default("Find file: " nil "~/src/emacs/" 
confirm-after-completion nil nil)
  read-file-name("Find file: " nil "~/src/emacs/" confirm-after-completion)
  find-file-read-args("Find file: " confirm-after-completion)
  byte-code("\300\301\302 \"\207" [find-file-read-args "Find file: " 
confirm-nonexistent-file-or-buffer] 3)
  call-interactively(find-file nil nil)

>         Stefan

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]