From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#23006: 25.0.92; Loading Tramp breaks pcomplete in eshell-mode Date: Tue, 22 Mar 2016 13:20:27 +0100 Message-ID: <87fuviln5g.fsf@gmx.de> References: <871t7d4ion.fsf@gmx.de> <871t752nme.fsf@gmx.de> <87bn69uouo.fsf@gmx.de> <764322aa-50ea-96b4-7c2a-36fbd60b2b54@yandex.ru> <8760wgvql0.fsf@gmx.de> <87r3f4ub0o.fsf@gmx.de> <87k2kvomui.fsf@gmx.de> <877fgvom2b.fsf@gmx.de> <57b602fa-a6b7-48c7-22f0-3751cd956228@yandex.ru> <8737rjol0t.fsf@gmx.de> <67874c87-ff4b-c1d9-8567-4aab31252d0b@yandex.ru> <87y49bn53t.fsf@gmx.de> <87twjzn0ep.fsf@gmx.de> <00533907-878e-7f62-7b65-a4ba3318a8e9@yandex.ru> <87egb2n8sp.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1458649286 1891 80.91.229.3 (22 Mar 2016 12:21:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Mar 2016 12:21:26 +0000 (UTC) Cc: 23006@debbugs.gnu.org, Dmitry Gutov To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 22 13:21:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aiLJC-0001Uk-9e for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Mar 2016 13:21:14 +0100 Original-Received: from localhost ([::1]:35865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiLJB-0001XV-II for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Mar 2016 08:21:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiLJ7-0001XD-2R for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 08:21:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiLJ0-0006A0-96 for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 08:21:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiLJ0-00069w-5I for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 08:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aiLJ0-0000fg-19 for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 08:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Mar 2016 12:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23006 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23006-submit@debbugs.gnu.org id=B23006.14586492412545 (code B ref 23006); Tue, 22 Mar 2016 12:21:01 +0000 Original-Received: (at 23006) by debbugs.gnu.org; 22 Mar 2016 12:20:41 +0000 Original-Received: from localhost ([127.0.0.1]:57847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiLIf-0000ey-93 for submit@debbugs.gnu.org; Tue, 22 Mar 2016 08:20:41 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:63255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiLId-0000el-8q for 23006@debbugs.gnu.org; Tue, 22 Mar 2016 08:20:40 -0400 Original-Received: from detlef.gmx.de ([87.146.58.73]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MTjqS-1aHyl41nAu-00QWLm; Tue, 22 Mar 2016 13:20:30 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 22 Mar 2016 08:05:44 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-Provags-ID: V03:K0:1WBo4or4lkZ1URCRT1jvYxxQTm/nTTW2MBmc/PetPJV6DfcYshw ll+JeCqN4ri9pmba1LE4eJkNJDMDhDuOZXCmRxNGM7FIUhufMz3eI2Nt+GjJHK0GJtmRM/I BqpBi0tCdKiXC9APj16+0Y083TxDBEPzKO/MSiwZJZOXsB/K9qWDHlwW5N7Xkm/W0nFyBV6 tOo2AlkljmolZYwTCsItA== X-UI-Out-Filterresults: notjunk:1;V01:K0:62vl7rfIlhs=:DIU5K3HAC3bbIXB++jzyGI qnLIm04//O6cUAzPP/zB/OtK2bYvYfupRrCJHw6uJQyesadVw1rZEyi10lC+/SuCl6HgJxmbY tWS9e2HIWlXF2Vn8HboE/g/M9G4jMkt5m4NZjTithdGxipKGzg0A3gSzu9qi7O56xRNg5inYg E+9CjwMPYHbQ//PrHUPAei9cscOvagqlGOVVigBs8yH2uJCoHXL9ZiAfAb47EhxBCg0Ul2x4n EvXXq8RX0wsL7yFcH0HEHdUS+5ZZlk9Vz/uMpt/mnciiMm9K14PpMQ6fLGXvqEK/+7d3iNPS3 oxkl+IOmGQWvD2WyjClsSTAdB/lKQ5/HkuW9QIeVvU0gMPUMnySzOAT4iN9f+2I+GBpb7dD4t jtVcXFhQGsgrTU06YX2nWTHMlEnRMrfKBF0aPUUy/DzaQ8k6LeMWVQVcCfcCJjuLGWUbRqngv 0SY0eiZgPTWIL6PDalASuGdLxc5a/dxD2fs9Ly52xcp6mjBVPxuMoy4wLk1O1xU4Eazb2ikJG CzCan4pXkjSn/bvqwO4/bd7NYBFYsGjgCsQcDcRhlCdvtyct7OIBdr1fYuCS+xNlbVIaECtMa a38GW39yFfRrYjuo5PQs6KmZAqgu7AL9dTdd6NCdv+BbQwdGi3f2BJHlJUyNzT7P4LN//LgPZ XSPL1g80VORF7PKqaRbtkczv/Ly+kcMtt+LqhCOjP4fKvFGsSyNIfKYdEVQ/oWip4lggYLHKR IJ3gDjD0wZz94rPVptOf7LyP7yMT/RM09drGldJ3EnglsKH+CWsBKEcyJiEMx26elXVGZfeB X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115314 Archived-At: Stefan Monnier 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-t= able: ... expand-file-name("adb:" "/") apply(expand-file-name ("adb:" "/")) (let* ((inhibit-file-name-handlers (cons (quote tramp-completion-file-nam= e-handler) (cons (quote cygwin-mount-name-hook-function) (cons (quote cygwi= n-mount-map-drive-hook-function) (and (eq inhibit-file-name-operation opera= tion) inhibit-file-name-handlers))))) (inhibit-file-name-operation operatio= n)) (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 evap= orate)))) (tramp-completion-run-real-handler operation args)) (let ((fn (assoc operation tramp-completion-file-name-handler-alist))) (i= f (and fn tramp-mode (or (eq tramp-syntax (quote sep)) (featurep (quote tra= mp)) (and (boundp (quote partial-completion-mode)) (symbol-value (quote par= tial-completion-mode))) (featurep (quote ido)) (featurep (quote icicles))))= (let ((save-match-data-internal (match-data))) (unwind-protect (progn (app= ly (cdr fn) args)) (set-match-data save-match-data-internal (quote evaporat= e)))) (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=00\301\203=00\301!\205=00\300?\206=00\300!\207= " [file-directory-p #[257 "\211GSH\302=3D\203=00\301\205=00\303\301\"\202= =00\300\205=00\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 stri= ng-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"]("adb:") completion-file-name-table("/" #[257 "\302\203\n\302!\205=00\301\203=00\3= 01!\205=00\300?\206=00\300!\207" [file-directory-p #[257 "\211GSH\302=3D\20= 3=00\301\205=00\303\301\"\202=00\300\205=00\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=00\301\2= 03=00\301!\205=00\300?\206=00\300!\207" [file-directory-p #[257 "\211GSH\30= 2=3D\203=00\301\205=00\303\301\"\202=00\300\205=00\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=00\301\203=00\301!\205=00\300?\206=00\300!\207" [file-direct= ory-p #[257 "\211GSH\302=3D\203=00\301\205=00\303\301\"\202=00\300\205=00\3= 03\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=00\301\203=00\301!\205=00\300?\206=00\300!\207" [file-d= irectory-p #[257 "\211GSH\302=3D\203=00\301\205=00\303\301\"\202=00\300\205= =00\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4= "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] strict "/" nil t) #[771 "\211\305=3D\203=00 \203=00\305\306\307B\310=05#ABB\207\311\n=1C\31= 2\313\300\314=06=06=06&*\207" [#[257 "\302\203\n\302!\205=00\301\203=00\301= !\205=00\300?\206=00\300!\207" [file-directory-p #[257 "\211GSH\302=3D\203= =00\301\205=00\303\301\"\202=00\300\205=00\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 "\30= 1\"\207" [pcomplete-compare-entry-function sort] 4 "\n\n(fn COMPS)"] compl= etion-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=3D\203=00 \203=00\305\306\307B\310= =05#ABB\207\311\n=1C\312\313\300\314=06=06=06&*\207" [#[257 "\302\203\n\302= !\205=00\301\203=00\301!\205=00\300?\206=00\300!\207" [file-directory-p #[2= 57 "\211GSH\302=3D\203=00\301\205=00\303\301\"\202=00\300\205=00\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-so= rt-function #[257 "\301\"\207" [pcomplete-compare-entry-function sort] 4 "= \n\n(fn COMPS)"] completion-file-name-table nil completion-table-with-predi= cate comint-completion-file-name-table strict] 10 "\n\n(fn S P A)"] "/" nil) #[771 "\302G\303 =06\"\203)=04\304\305\224OB\262\306\307\310=07\"!B\262= =04\305\225\302O\262\202=00\203:=02\311=3D\204O=02\242\312=3D\204O\313\314= =06B\237\315#\316\300=06$\262\202\307\317\320\321\322\"\"\313\314=07B\237\= 315#\323\300\243\206k\315$\211@Y\203\223=05\311=3D\203\204\316=06\300=06\= n$\202\305\312@=04GZ\\ABB\202\305=05\311=3D\203\272\316=06\300=06\n$=02@Z\3= 21\324\325\326\327\330=06!\331\"\332\333%\"\266\202\202\305\312=05GZ\\ABB\2= 66\203\207" [#[771 "\211\305=3D\203=00 \203=00\305\306\307B\310=05#ABB\207\= 311\n=1C\312\313\300\314=06=06=06&*\207" [#[257 "\302\203\n\302!\205=00\301= \203=00\301!\205=00\300?\206=00\300!\207" [file-directory-p #[257 "\211GSH\= 302=3D\203=00\301\205=00\303\301\"\202=00\300\205=00\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 complet= ion-ignore-case completion-ignored-extensions metadata cycle-sort-function = #[257 "\301\"\207" [pcomplete-compare-entry-function sort] 4 "\n\n(fn COMP= S)"] completion-file-name-table nil completion-table-with-predicate comint-= completion-file-name-table strict] 10 "\n\n(fn S P A)"] pcomplete--env-rege= xp nil string-match 0 1 getenv match-string 2 t boundaries mapconcat identi= ty "" 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 =06\"\203)=04\304\305\224OB\262\306\= 307\310=07\"!B\262=04\305\225\302O\262\202=00\203:=02\311=3D\204O=02\242\31= 2=3D\204O\313\314=06B\237\315#\316\300=06$\262\202\307\317\320\321\322\"\"= \313\314=07B\237\315#\323\300\243\206k\315$\211@Y\203\223=05\311=3D\203\2= 04\316=06\300=06\n$\202\305\312@=04GZ\\ABB\202\305=05\311=3D\203\272\316=06= \300=06\n$=02@Z\321\324\325\326\327\330=06!\331\"\332\333%\"\266\202\202\30= 5\312=05GZ\\ABB\266\203\207" [#[771 "\211\305=3D\203=00 \203=00\305\306\307= B\310=05#ABB\207\311\n=1C\312\313\300\314=06=06=06&*\207" [#[257 "\302\203\= n\302!\205=00\301\203=00\301!\205=00\300?\206=00\300!\207" [file-directory-= p #[257 "\211GSH\302=3D\203=00\301\205=00\303\301\"\202=00\300\205=00\303\3= 00\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn= FILE)"] nil] 3 "\n\n(fn F)"] pcomplete-compare-entry-function pcomplete-ig= nore-case completion-ignore-case completion-ignored-extensions metadata cyc= le-sort-function #[257 "\301\"\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)"] pc= omplete--env-regexp nil string-match 0 1 getenv match-string 2 t boundaries= mapconcat identity "" complete-with-action apply + mapcar length completio= n-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 =06\"\203)=04\304\305\224OB\262\306\3= 07\310=07\"!B\262=04\305\225\302O\262\202=00\203:=02\311=3D\204O=02\242\312= =3D\204O\313\314=06B\237\315#\316\300=06$\262\202\307\317\320\321\322\"\"\= 313\314=07B\237\315#\323\300\243\206k\315$\211@Y\203\223=05\311=3D\203\20= 4\316=06\300=06\n$\202\305\312@=04GZ\\ABB\202\305=05\311=3D\203\272\316=06\= 300=06\n$=02@Z\321\324\325\326\327\330=06!\331\"\332\333%\"\266\202\202\305= \312=05GZ\\ABB\266\203\207" [#[771 "\211\305=3D\203=00 \203=00\305\306\307B= \310=05#ABB\207\311\n=1C\312\313\300\314=06=06=06&*\207" [#[257 "\302\203\n= \302!\205=00\301\203=00\301!\205=00\300?\206=00\300!\207" [file-directory-p= #[257 "\211GSH\302=3D\203=00\301\205=00\303\301\"\202=00\300\205=00\303\30= 0\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn = FILE)"] nil] 3 "\n\n(fn F)"] pcomplete-compare-entry-function pcomplete-ign= ore-case completion-ignore-case completion-ignored-extensions metadata cycl= e-sort-function #[257 "\301\"\207" [pcomplete-compare-entry-function sort]= 4 "\n\n(fn COMPS)"] completion-file-name-table nil completion-table-with-p= redicate comint-completion-file-name-table strict] 10 "\n\n(fn S P A)"] pco= mplete--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 =06\"\203)=04\304\305\224OB\26= 2\306\307\310=07\"!B\262=04\305\225\302O\262\202=00\203:=02\311=3D\204O=02\= 242\312=3D\204O\313\314=06B\237\315#\316\300=06$\262\202\307\317\320\321\3= 22\"\"\313\314=07B\237\315#\323\300\243\206k\315$\211@Y\203\223=05\311=3D= \203\204\316=06\300=06\n$\202\305\312@=04GZ\\ABB\202\305=05\311=3D\203\272\= 316=06\300=06\n$=02@Z\321\324\325\326\327\330=06!\331\"\332\333%\"\266\202\= 202\305\312=05GZ\\ABB\266\203\207" [#[771 "\211\305=3D\203=00 \203=00\305\3= 06\307B\310=05#ABB\207\311\n=1C\312\313\300\314=06=06=06&*\207" [#[257 "\30= 2\203\n\302!\205=00\301\203=00\301!\205=00\300?\206=00\300!\207" [file-dire= ctory-p #[257 "\211GSH\302=3D\203=00\301\205=00\303\301\"\202=00\300\205=00= \303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\= n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] pcomplete-compare-entry-function pcompl= ete-ignore-case completion-ignore-case completion-ignored-extensions metada= ta cycle-sort-function #[257 "\301\"\207" [pcomplete-compare-entry-functio= n 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 boun= daries mapconcat identity "" complete-with-action apply + mapcar length com= pletion-boundaries make-byte-code 257 "\211\300\301O\207" vconcat vector [n= il] 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.