all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 23006@debbugs.gnu.org, Dmitry Gutov <dgutov@yandex.ru>
Subject: bug#23006: 25.0.92; Loading Tramp breaks pcomplete in eshell-mode
Date: Tue, 22 Mar 2016 13:20:27 +0100	[thread overview]
Message-ID: <87fuviln5g.fsf@gmx.de> (raw)
In-Reply-To: <jwvtwjyu3de.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Tue, 22 Mar 2016 08:05:44 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Tramp needs an indication that file name completion is in progress.
>
> That's where we disagree.
>
>> Otherwise, it would regard remote file names like "/adb:" safe
>> to be handled, and it would report an error then.
>
> This bug report is not about "cd /adb: TAB signals an error" but about
> "cd / TAB signals an error".  The "/adb:" part comes from Tramp because
> of a problem in Tramp's implementation of file-name-directory, AFAICT.
> It has nothing to do with file name completion.

cd / TAB calls file-name-all-completions. This returns several
candidates, like "/adb:". That's OK.

Afterwards, (file-directory-p "adb:") is called from completion-file-name-table:

  ...
  expand-file-name("adb:" "/")
  apply(expand-file-name ("adb:" "/"))
  (let* ((inhibit-file-name-handlers (cons (quote tramp-completion-file-name-handler) (cons (quote cygwin-mount-name-hook-function) (cons (quote cygwin-mount-map-drive-hook-function) (and (eq inhibit-file-name-operation operation) inhibit-file-name-handlers))))) (inhibit-file-name-operation operation)) (apply operation args))
  tramp-completion-run-real-handler(expand-file-name ("adb:" "/"))
  (if (and fn tramp-mode (or (eq tramp-syntax (quote sep)) (featurep (quote tramp)) (and (boundp (quote partial-completion-mode)) (symbol-value (quote partial-completion-mode))) (featurep (quote ido)) (featurep (quote icicles)))) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (apply (cdr fn) args)) (set-match-data save-match-data-internal (quote evaporate)))) (tramp-completion-run-real-handler operation args))
  (let ((fn (assoc operation tramp-completion-file-name-handler-alist))) (if (and fn tramp-mode (or (eq tramp-syntax (quote sep)) (featurep (quote tramp)) (and (boundp (quote partial-completion-mode)) (symbol-value (quote partial-completion-mode))) (featurep (quote ido)) (featurep (quote icicles)))) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (apply (cdr fn) args)) (set-match-data save-match-data-internal (quote evaporate)))) (tramp-completion-run-real-handler operation args)))
  tramp-completion-file-name-handler(expand-file-name "adb:" "/")
  file-directory-p("adb:")
  #[257 "\302\203\n\302!\205\0\301\203\0\301!\205\0\300?\206\0\300!\207" [file-directory-p #[257 "\211GSH\302=\203\0\301\205\0\303\301\"\202\0\300\205\0\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"]("adb:")
  completion-file-name-table("/" #[257 "\302\203\n\302!\205\0\301\203\0\301!\205\0\300?\206\0\300!\207" [file-directory-p #[257 "\211GSH\302=\203\0\301\205\0\303\301\"\202\0\300\205\0\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] t)
  comint-completion-file-name-table("/" #[257 "\302\203\n\302!\205\0\301\203\0\301!\205\0\300?\206\0\300!\207" [file-directory-p #[257 "\211GSH\302=\203\0\301\205\0\303\301\"\202\0\300\205\0\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] t)
  complete-with-action(t comint-completion-file-name-table "/" #[257 "\302\203\n\302!\205\0\301\203\0\301!\205\0\300?\206\0\300!\207" [file-directory-p #[257 "\211GSH\302=\203\0\301\205\0\303\301\"\202\0\300\205\0\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"])
  completion-table-with-predicate(comint-completion-file-name-table #[257 "\302\203\n\302!\205\0\301\203\0\301!\205\0\300?\206\0\300!\207" [file-directory-p #[257 "\211GSH\302=\203\0\301\205\0\303\301\"\202\0\300\205\0\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] strict "/" nil t)
  #[771 "\211\305=\203\0	\203\0\305\306\307B\310\x05#ABB\207\311\n\x1c\312\313\300\314\x06\x06\x06&*\207" [#[257 "\302\203\n\302!\205\0\301\203\0\301!\205\0\300?\206\0\300!\207" [file-directory-p #[257 "\211GSH\302=\203\0\301\205\0\303\301\"\202\0\300\205\0\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] pcomplete-compare-entry-function pcomplete-ignore-case completion-ignore-case completion-ignored-extensions metadata cycle-sort-function #[257 "\301\b\"\207" [pcomplete-compare-entry-function sort] 4 "\n\n(fn COMPS)"] completion-file-name-table nil completion-table-with-predicate comint-completion-file-name-table strict] 10 "\n\n(fn S P A)"]("/" nil t)
  complete-with-action(t #[771 "\211\305=\203\0	\203\0\305\306\307B\310\x05#ABB\207\311\n\x1c\312\313\300\314\x06\x06\x06&*\207" [#[257 "\302\203\n\302!\205\0\301\203\0\301!\205\0\300?\206\0\300!\207" [file-directory-p #[257 "\211GSH\302=\203\0\301\205\0\303\301\"\202\0\300\205\0\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] pcomplete-compare-entry-function pcomplete-ignore-case completion-ignore-case completion-ignored-extensions metadata cycle-sort-function #[257 "\301\b\"\207" [pcomplete-compare-entry-function sort] 4 "\n\n(fn COMPS)"] completion-file-name-table nil completion-table-with-predicate comint-completion-file-name-table strict] 10 "\n\n(fn S P A)"] "/" nil)
  #[771 "\302G\303	\x06\"\203)\x04\304\305\224OB\262\306\307\310\a\"!B\262\x04\305\225\302O\262\202\0\203:\x02\311=\204O\x02\242\312=\204O\313\314\x06B\237\315#\316\300\x06\b$\262\202\307\317\320\321\322\"\"\313\314\aB\237\315#\323\300\b\b\243\206k\315$\211@Y\203\223\x05\311=\203\204\316\x06\300\x06\n$\202\305\312@\x04GZ\\ABB\202\305\x05\311=\203\272\316\x06\300\x06\n$\x02@Z\321\324\325\326\327\330\x06!\331\"\332\333%\"\266\202\202\305\312\x05GZ\\ABB\266\203\207" [#[771 "\211\305=\203\0	\203\0\305\306\307B\310\x05#ABB\207\311\n\x1c\312\313\300\314\x06\x06\x06&*\207" [#[257 "\302\203\n\302!\205\0\301\203\0\301!\205\0\300?\206\0\300!\207" [file-directory-p #[257 "\211GSH\302=\203\0\301\205\0\303\301\"\202\0\300\205\0\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] pcomplete-compare-entry-function pcomplete-ignore-case completion-ignore-case completion-ignored-extensions metadata cycle-sort-function #[257 "\301\b\"\207" [pcomplete-compare-entry-function sort] 4 "\n\n(fn COMPS)"] completion-file-name-table nil completion-table-with-predicate comint-completion-file-name-table strict] 10 "\n\n(fn S P A)"] pcomplete--env-regexp nil string-match 0 1 getenv match-string 2 t boundaries mapconcat identity "" complete-with-action apply + mapcar length completion-boundaries make-byte-code 257 "\211\300\301O\207" vconcat vector [nil] 4 "\n\n(fn S)"] 17 "\n\n(fn STRING PRED ACTION)"]("/" nil t)
  all-completions("/" #[771 "\302G\303	\x06\"\203)\x04\304\305\224OB\262\306\307\310\a\"!B\262\x04\305\225\302O\262\202\0\203:\x02\311=\204O\x02\242\312=\204O\313\314\x06B\237\315#\316\300\x06\b$\262\202\307\317\320\321\322\"\"\313\314\aB\237\315#\323\300\b\b\243\206k\315$\211@Y\203\223\x05\311=\203\204\316\x06\300\x06\n$\202\305\312@\x04GZ\\ABB\202\305\x05\311=\203\272\316\x06\300\x06\n$\x02@Z\321\324\325\326\327\330\x06!\331\"\332\333%\"\266\202\202\305\312\x05GZ\\ABB\266\203\207" [#[771 "\211\305=\203\0	\203\0\305\306\307B\310\x05#ABB\207\311\n\x1c\312\313\300\314\x06\x06\x06&*\207" [#[257 "\302\203\n\302!\205\0\301\203\0\301!\205\0\300?\206\0\300!\207" [file-directory-p #[257 "\211GSH\302=\203\0\301\205\0\303\301\"\202\0\300\205\0\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] pcomplete-compare-entry-function pcomplete-ignore-case completion-ignore-case completion-ignored-extensions metadata cycle-sort-function #[257 "\301\b\"\207" [pcomplete-compare-entry-function sort] 4 "\n\n(fn COMPS)"] completion-file-name-table nil completion-table-with-predicate comint-completion-file-name-table strict] 10 "\n\n(fn S P A)"] pcomplete--env-regexp nil string-match 0 1 getenv match-string 2 t boundaries mapconcat identity "" complete-with-action apply + mapcar length completion-boundaries make-byte-code 257 "\211\300\301O\207" vconcat vector [nil] 4 "\n\n(fn S)"] 17 "\n\n(fn STRING PRED ACTION)"])
  pcomplete-stub("/" #[771 "\302G\303	\x06\"\203)\x04\304\305\224OB\262\306\307\310\a\"!B\262\x04\305\225\302O\262\202\0\203:\x02\311=\204O\x02\242\312=\204O\313\314\x06B\237\315#\316\300\x06\b$\262\202\307\317\320\321\322\"\"\313\314\aB\237\315#\323\300\b\b\243\206k\315$\211@Y\203\223\x05\311=\203\204\316\x06\300\x06\n$\202\305\312@\x04GZ\\ABB\202\305\x05\311=\203\272\316\x06\300\x06\n$\x02@Z\321\324\325\326\327\330\x06!\331\"\332\333%\"\266\202\202\305\312\x05GZ\\ABB\266\203\207" [#[771 "\211\305=\203\0	\203\0\305\306\307B\310\x05#ABB\207\311\n\x1c\312\313\300\314\x06\x06\x06&*\207" [#[257 "\302\203\n\302!\205\0\301\203\0\301!\205\0\300?\206\0\300!\207" [file-directory-p #[257 "\211GSH\302=\203\0\301\205\0\303\301\"\202\0\300\205\0\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] pcomplete-compare-entry-function pcomplete-ignore-case completion-ignore-case completion-ignored-extensions metadata cycle-sort-function #[257 "\301\b\"\207" [pcomplete-compare-entry-function sort] 4 "\n\n(fn COMPS)"] completion-file-name-table nil completion-table-with-predicate comint-completion-file-name-table strict] 10 "\n\n(fn S P A)"] pcomplete--env-regexp nil string-match 0 1 getenv match-string 2 t boundaries mapconcat identity "" complete-with-action apply + mapcar length completion-boundaries make-byte-code 257 "\211\300\301O\207" vconcat vector [nil] 4 "\n\n(fn S)"] 17 "\n\n(fn STRING PRED ACTION)"])
  pcomplete-do-complete("/" #[771 "\302G\303	\x06\"\203)\x04\304\305\224OB\262\306\307\310\a\"!B\262\x04\305\225\302O\262\202\0\203:\x02\311=\204O\x02\242\312=\204O\313\314\x06B\237\315#\316\300\x06\b$\262\202\307\317\320\321\322\"\"\313\314\aB\237\315#\323\300\b\b\243\206k\315$\211@Y\203\223\x05\311=\203\204\316\x06\300\x06\n$\202\305\312@\x04GZ\\ABB\202\305\x05\311=\203\272\316\x06\300\x06\n$\x02@Z\321\324\325\326\327\330\x06!\331\"\332\333%\"\266\202\202\305\312\x05GZ\\ABB\266\203\207" [#[771 "\211\305=\203\0	\203\0\305\306\307B\310\x05#ABB\207\311\n\x1c\312\313\300\314\x06\x06\x06&*\207" [#[257 "\302\203\n\302!\205\0\301\203\0\301!\205\0\300?\206\0\300!\207" [file-directory-p #[257 "\211GSH\302=\203\0\301\205\0\303\301\"\202\0\300\205\0\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] pcomplete-compare-entry-function pcomplete-ignore-case completion-ignore-case completion-ignored-extensions metadata cycle-sort-function #[257 "\301\b\"\207" [pcomplete-compare-entry-function sort] 4 "\n\n(fn COMPS)"] completion-file-name-table nil completion-table-with-predicate comint-completion-file-name-table strict] 10 "\n\n(fn S P A)"] pcomplete--env-regexp nil string-match 0 1 getenv match-string 2 t boundaries mapconcat identity "" complete-with-action apply + mapcar length completion-boundaries make-byte-code 257 "\211\300\301O\207" vconcat vector [nil] 4 "\n\n(fn S)"] 17 "\n\n(fn STRING PRED ACTION)"])
  pcomplete(1)
  funcall-interactively(pcomplete 1)
  call-interactively(pcomplete record nil)
  command-execute(pcomplete record)
  execute-extended-command(nil "pcomplete" "pcomplete")
  funcall-interactively(execute-extended-command nil "pcomplete" "pcomplete")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

Tramp has no information, that file-name-completion is still in
progress, and does its job. It tries to connect to the remote host
"/adb:" in order to check.

If Tramp would have been said, that file name completion is still in
progress, it would behave correctly.

And it isn't only about file-directory-p, that's just an example. *Any*
file name operation could be called while file name completion is in
progress. That's why Tramp needs this information.

And yes, this is our basic disagreement. I'm not able to implement
proper Tramp operation without this information. Why do you refuse to
tell this to Tramp?

>         Stefan

Best regards, Michael.





  reply	other threads:[~2016-03-22 12:20 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14  2:01 bug#23006: 25.0.92; Loading Tramp breaks pcomplete in eshell-mode Dmitry Gutov
2016-03-14  2:22 ` Stefan Monnier
2016-03-14  7:34 ` Michael Albinus
2016-03-15  3:31   ` Stefan Monnier
2016-03-15  8:43     ` Michael Albinus
2016-03-15 11:09       ` Dmitry Gutov
2016-03-17  0:42       ` Stefan Monnier
2016-03-17 19:43         ` Michael Albinus
2016-03-17 19:44           ` Dmitry Gutov
2016-03-17 19:54             ` Michael Albinus
2016-03-17 22:55               ` Dmitry Gutov
2016-03-18  8:27                 ` Michael Albinus
2016-03-18 16:13                   ` Stefan Monnier
2016-03-18 17:01                     ` Michael Albinus
2016-03-18 17:53                       ` Stefan Monnier
2016-03-18 20:21                         ` Michael Albinus
2016-03-18 22:41                           ` Stefan Monnier
2016-03-19  8:28                             ` Michael Albinus
2016-03-19 12:35                               ` Stefan Monnier
2016-03-19 15:28                                 ` Michael Albinus
2016-03-19 20:04                                   ` Stefan Monnier
2016-03-20 15:08                                     ` Michael Albinus
2016-03-20 15:23                                       ` Stefan Monnier
2016-03-20 15:46                                         ` Michael Albinus
2016-03-20 16:10                                           ` Stefan Monnier
2016-03-20 20:40                                             ` Michael Albinus
2016-03-20 22:17                                               ` Stefan Monnier
2016-03-20 22:28                                                 ` Dmitry Gutov
2016-03-21 15:57                                                 ` Michael Albinus
2016-03-20 15:38                                       ` Drew Adams
2016-03-20 15:54                                         ` Michael Albinus
2016-03-20 15:59                                           ` Dmitry Gutov
2016-03-20 20:31                                             ` Michael Albinus
2016-03-20 20:44                                               ` Dmitry Gutov
2016-03-20 20:53                                                 ` Michael Albinus
2016-03-20 21:05                                                   ` Dmitry Gutov
2016-03-20 22:19                                                     ` Stefan Monnier
2016-03-21 15:49                                                       ` Michael Albinus
2016-03-21 19:26                                                         ` Stefan Monnier
2016-03-22  9:27                                                           ` Michael Albinus
2016-03-22 12:02                                                             ` Stefan Monnier
2016-03-22 12:05                                                               ` Michael Albinus
2016-03-22 13:19                                                                 ` Stefan Monnier
2016-03-21 15:46                                                     ` Michael Albinus
2016-03-21 15:49                                                       ` Dmitry Gutov
2016-03-21 16:03                                                         ` Michael Albinus
2016-03-21 16:13                                                           ` Dmitry Gutov
2016-03-21 16:25                                                             ` Michael Albinus
2016-03-21 16:45                                                               ` Dmitry Gutov
2016-03-21 16:55                                                                 ` Michael Albinus
2016-03-21 18:10                                                                   ` Dmitry Gutov
2016-03-21 18:36                                                                     ` Michael Albinus
2016-03-21 21:26                                                                       ` Dmitry Gutov
2016-03-22  9:47                                                                         ` Michael Albinus
2016-03-22 12:05                                                                           ` Stefan Monnier
2016-03-22 12:20                                                                             ` Michael Albinus [this message]
2016-03-22 13:37                                                                               ` Stefan Monnier
2016-03-22 13:50                                                                                 ` Michael Albinus
2016-03-22 14:01                                                                                   ` Stefan Monnier
2016-03-24  1:00                                                                           ` Dmitry Gutov
2016-03-21 19:23                                                                   ` Stefan Monnier
2016-03-22  9:25                                                                     ` Michael Albinus
2016-03-22 12:02                                                                       ` Stefan Monnier
2016-03-22 12:08                                                                         ` Michael Albinus
2016-03-22 13:18                                                                           ` Stefan Monnier
2016-03-22 13:35                                                                             ` Michael Albinus
2016-03-22 13:38                                                                               ` Stefan Monnier
2016-03-22 13:50                                                                                 ` Michael Albinus
2016-03-24  0:54                                                                               ` Dmitry Gutov
2016-03-24 13:15                                                                                 ` Stefan Monnier
2016-03-24 13:54                                                                                   ` Dmitry Gutov
2016-03-24 15:56                                                                                     ` Stefan Monnier
2016-03-20 16:38                                           ` Drew Adams
2016-03-20 19:48                                             ` Drew Adams
2016-03-20 20:42                                               ` Michael Albinus
2016-03-18 22:51                         ` Dmitry Gutov
2016-03-17  0:50   ` Stefan Monnier
2016-03-17 19:49     ` Michael Albinus
2016-03-18 16:06       ` Stefan Monnier
2017-03-09 18:52 ` Michael Albinus
2017-03-15 12:42 ` Michael Albinus
2017-03-17 11:30   ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fuviln5g.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=23006@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.