From unknown Fri Jun 20 05:29:27 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#10085 <10085@debbugs.gnu.org> To: bug#10085 <10085@debbugs.gnu.org> Subject: Status: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Reply-To: bug#10085 <10085@debbugs.gnu.org> Date: Fri, 20 Jun 2025 12:29:27 +0000 retitle 10085 24.0.91; completion-pcm--find-all-completions returns wrong r= emote file names reassign 10085 emacs submitter 10085 Michael Albinus severity 10085 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 20 10:59:49 2011 Received: (at submit) by debbugs.gnu.org; 20 Nov 2011 15:59:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RS9o5-0005Oa-I2 for submit@debbugs.gnu.org; Sun, 20 Nov 2011 10:59:49 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RS9o3-0005OT-7L for submit@debbugs.gnu.org; Sun, 20 Nov 2011 10:59:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RS9mv-0008KX-8e for submit@debbugs.gnu.org; Sun, 20 Nov 2011 10:58:38 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:52206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RS9mv-0008KM-7J for submit@debbugs.gnu.org; Sun, 20 Nov 2011 10:58:37 -0500 Received: from eggs.gnu.org ([140.186.70.92]:56969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RS9mt-00054W-Jd for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2011 10:58:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RS9ms-0008Jv-7T for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2011 10:58:35 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]:50361) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RS9mr-0008Jd-Ss for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2011 10:58:34 -0500 Received: (qmail invoked by alias); 20 Nov 2011 15:58:30 -0000 Received: from p57BB81AE.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.129.174] by mail.gmx.net (mp049) with SMTP; 20 Nov 2011 16:58:30 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX192ZUtOPUR2eVclM6dPyrbvGX1eGlyzx7SAoBWCnD n/DYcJ89vuwd8q From: Michael Albinus To: bug-gnu-emacs@gnu.org Subject: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Date: Sun, 20 Nov 2011 16:58:28 +0100 Message-ID: <87ty5yu6or.fsf@gmx.de> MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) Start "emacs -Q". Apply "C-x C-f /sudo:: TAB". This results in "/sudo:sudo:root@". A correct expansion would be "/sudo:root@". As far as I can see, Tramp's completion functions work properly. The problem seems to be `completion-pcm--find-all-completions'. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /home/albinus/src/emacs/etc/DEBUG. In GNU Emacs 24.0.91.8 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.6) of 2011-11-19 on detlef Windowing system distributor `The X.Org Foundation', version 11.0.11004000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC q C-x C-f / s u d o : : c x r e p o r t C-x u x r e p o r t Recent messages: Result: ("sudo:sudo:root@") Result: ("sudo:sudo:root@") Result: nil Back to top level. Continue... Tramp: Opening connection for root@sudo using sudo...done let*: Command attempted to use minibuffer while in minibuffer Undo! Load-path shadows: None found. Features: (shadow sort mail-extr message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader emacsbug derived easy-mmode cl-specs cl edebug debug vc-bzr find-func help-mode easymenu view tramp-cache warnings trace tramp-sh tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc gnus-util mm-util mail-prsvr password-cache shell pcomplete comint ring format-spec advice help-fns advice-preload tramp-loaddefs regexp-opt time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 12:05:48 2011 Received: (at 10085) by debbugs.gnu.org; 22 Nov 2011 17:05:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RStn1-0006k0-GK for submit@debbugs.gnu.org; Tue, 22 Nov 2011 12:05:48 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RStmy-0006jr-Oc for 10085@debbugs.gnu.org; Tue, 22 Nov 2011 12:05:45 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id pAMH4NI9029511; Tue, 22 Nov 2011 12:04:23 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 66A57B4043; Tue, 22 Nov 2011 12:04:23 -0500 (EST) From: Stefan Monnier To: Michael Albinus Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Message-ID: References: <87ty5yu6or.fsf@gmx.de> Date: Tue, 22 Nov 2011 12:04:23 -0500 In-Reply-To: <87ty5yu6or.fsf@gmx.de> (Michael Albinus's message of "Sun, 20 Nov 2011 16:58:28 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4049=0 X-NAI-Spam-Version: 2.2.0.9286 : core <4049> : streams <703834> : uri <1013273> X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) > Start "emacs -Q". Apply "C-x C-f /sudo:: TAB". This results in > "/sudo:sudo:root@". A correct expansion would be "/sudo:root@". I haven't tracked this down yet, but while trying to I bumped into the following problem: emacs -Q (completion-try-completion "/sudo::" 'completion-file-name-table nil t) C-g at the prompt C-x C-f /sudo:: TAB and at that point Emacs is frozen solid. The backtrace (shown after my sig) shows that rfn-eshadow (run with inhibit-quit) ends up waiting for a process that never replies. Can you look into it, while I try to solve the other problem? Stefan Lisp Backtrace: "accept-process-output" (0xbfff6874) "byte-code" (0xbfff6b28) "tramp-accept-process-output" (0xbfff7094) "tramp-wait-for-regexp" (0xbfff7444) "tramp-wait-for-output" (0xbfff77f4) "tramp-send-command" (0xbfff7b94) "tramp-sh-handle-expand-file-name" (0xbfff7f44) "apply" (0xbfff8094) "tramp-sh-file-name-handler" (0xbfff8424) "apply" (0xbfff8574) "byte-code" (0xbfff8828) "tramp-file-name-handler" (0xbfff8dc8) "expand-file-name" (0xbfff8f64) "apply" (0xbfff90b4) "tramp-completion-run-real-handler" (0xbfff9454) "tramp-completion-file-name-handler" (0xbfff97e8) "expand-file-name" (0xbfff99a8) "tramp-handle-file-remote-p" (0xbfff9d44) "apply" (0xbfff9e94) "tramp-sh-file-name-handler" (0xbfffa224) "apply" (0xbfffa384) "byte-code" (0xbfffa638) "tramp-file-name-handler" (0xbfffabd4) "file-remote-p" (0xbfffaf74) "apply" (0xbfffb0c4) "tramp-completion-run-real-handler" (0xbfffb464) "tramp-completion-file-name-handler" (0xbfffb7f4) "file-remote-p" (0xbfffbb94) "byte-code" (0xbfffbe38) "tramp-rfn-eshadow-update-overlay" (0xbfffc47c) "run-hooks" (0xbfffc564) "byte-code" (0xbfffc818) "rfn-eshadow-update-overlay" (0xbfffcdc8) "read-from-minibuffer" (0xbfffd66c) "completing-read-default" (0xbfffda2c) "completing-read" (0xbfffdb98) "read-file-name-default" (0xbfffdf5c) "read-file-name" (0xbfffe304) "find-file-read-args" (0xbfffe6a4) "byte-code" (0xbfffe948) "call-interactively" (0xbfffed18) From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 14:07:10 2011 Received: (at 10085) by debbugs.gnu.org; 22 Nov 2011 19:07:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RSvgT-0001Ja-N5 for submit@debbugs.gnu.org; Tue, 22 Nov 2011 14:07:09 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RSvgP-0001JR-Kj for 10085@debbugs.gnu.org; Tue, 22 Nov 2011 14:07:08 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id pAMJ5gjP008526; Tue, 22 Nov 2011 14:05:42 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 908EDB4043; Tue, 22 Nov 2011 14:05:42 -0500 (EST) From: Stefan Monnier To: Michael Albinus Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Message-ID: References: <87ty5yu6or.fsf@gmx.de> Date: Tue, 22 Nov 2011 14:05:42 -0500 In-Reply-To: <87ty5yu6or.fsf@gmx.de> (Michael Albinus's message of "Sun, 20 Nov 2011 16:58:28 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4049=0 X-NAI-Spam-Version: 2.2.0.9286 : core <4049> : streams <703860> : uri <1013339> X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) > Start "emacs -Q". Apply "C-x C-f /sudo:: TAB". This results in > "/sudo:sudo:root@". A correct expansion would be "/sudo:root@". > As far as I can see, Tramp's completion functions work properly. > The problem seems to be `completion-pcm--find-all-completions'. I think the patch below fixes it. The problem is that PCM assumes that a field separator cannot appear within a field. In "/sudo::" the first / is a field separator, and the last ":" is also a field separator, but the first ":" isn't. Sadly the fix could have some detrimental impact on performance, and I think that the overall problem is linked to an oddity of Tramp's completion: If you do "C-x C-f /sudo ?" you get "/sudo:" but if you do "C-x C-f /sudo: ?" you get "sudo:root@". So fundamentally, the : of "/sudo:" acts a field separator, so (completion-boundaries "/sudo:") should probably return (6 . 0) rather than (1 . 0), and then "C-x C-f /sudo: ?" should list '("root@" ":") rather than '("sudo:root@"). Related inconsistency from a trace of C-x C-f /sud: TAB: 1 -> completion-file-name-table: string="/sud:" pred=file-exists-p action=(boundaries . "") 1 <- completion-file-name-table: (boundaries 5) [...] ====================================================================== 1 -> completion-file-name-table: string="/sudo:" pred=file-exists-p action=(boundaries . "") 1 <- completion-file-name-table: (boundaries 1) Stefan === modified file 'lisp/minibuffer.el' *** lisp/minibuffer.el 2011-11-19 09:18:31 +0000 --- lisp/minibuffer.el 2011-11-22 18:45:38 +0000 *************** *** 2458,2464 **** (between nil)) ;; Eliminate submatches that don't end with the separator. (dolist (submatch (prog1 suball (setq suball ()))) ! (when (eq sep (aref submatch (1- (length submatch)))) (push submatch suball))) (when suball ;; Update the boundaries and corresponding pattern. --- 2458,2474 ---- (between nil)) ;; Eliminate submatches that don't end with the separator. (dolist (submatch (prog1 suball (setq suball ()))) ! (when (and (eq sep (aref submatch (1- (length submatch)))) ! ;; The `sep' check is an optimization, but we need ! ;; to check that submatch really introduces ! ;; a new field. E.g. When completing "/sudo::", ! ;; prefix="/sudo:" and submatch is "sudo:" which ! ;; matches `sep' but is not sufficient (we'd need ! ;; "sudo::" or "sudo:foo@bar:" to get back to the ! ;; field that we're trying to complete). ! (let ((match (concat subprefix submatch))) ! (eq (length match) ! (completion-boundaries match table pred "")))) (push submatch suball))) (when suball ;; Update the boundaries and corresponding pattern. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 16:56:55 2011 Received: (at 10085) by debbugs.gnu.org; 22 Nov 2011 21:56:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RSyKj-00068b-HM for submit@debbugs.gnu.org; Tue, 22 Nov 2011 16:56:55 -0500 Received: from mailout-de.gmx.net ([213.165.64.22]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1RSyKh-00068Q-8L for 10085@debbugs.gnu.org; Tue, 22 Nov 2011 16:56:52 -0500 Received: (qmail invoked by alias); 22 Nov 2011 21:55:27 -0000 Received: from p57BB96F0.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.150.240] by mail.gmx.net (mp072) with SMTP; 22 Nov 2011 22:55:27 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX183kVVQusU3mexwFii7+Lk0cMjnaxdSKhSafOTwtD AtvFhdtVGeW+dH From: Michael Albinus To: Stefan Monnier Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names References: <87ty5yu6or.fsf@gmx.de> Date: Tue, 22 Nov 2011 22:55:25 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 22 Nov 2011 14:05:42 -0500") Message-ID: <877h2r3jqq.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Stefan Monnier writes: >> Start "emacs -Q". Apply "C-x C-f /sudo:: TAB". This results in >> "/sudo:sudo:root@". A correct expansion would be "/sudo:root@". > >> As far as I can see, Tramp's completion functions work properly. >> The problem seems to be `completion-pcm--find-all-completions'. > I think the patch below fixes it. Yes, it does. > The problem is that PCM assumes that > a field separator cannot appear within a field. In "/sudo::" the first > / is a field separator, and the last ":" is also a field separator, but > the first ":" isn't. Unfortunately, I don't know anything about the completion machinery in minibuffer.el. Maybe I should learn about. Is there documentation which explains the concept of completion-table? And is there something Tramp could do? It shall know the boundaries, and it could provide such information more precisely. > If you do "C-x C-f /sudo ?" you get "/sudo:" but if you > do "C-x C-f /sudo: ?" you get "sudo:root@". So fundamentally, the : of > "/sudo:" acts a field separator, so (completion-boundaries "/sudo:") should > probably return (6 . 0) rather than (1 . 0), and then "C-x C-f /sudo: ?" > should list '("root@" ":") rather than '("sudo:root@"). > > Related inconsistency from a trace of C-x C-f /sud: TAB: > 1 -> completion-file-name-table: string="/sud:" pred=file-exists-p action=(boundaries . "") > 1 <- completion-file-name-table: (boundaries 5) > [...] > ====================================================================== > 1 -> completion-file-name-table: string="/sudo:" pred=file-exists-p action=(boundaries . "") > 1 <- completion-file-name-table: (boundaries 1) I'ld like to check it if I could understand what's behind. > Stefan Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 17:14:39 2011 Received: (at 10085) by debbugs.gnu.org; 22 Nov 2011 22:14:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RSybv-0006fF-8q for submit@debbugs.gnu.org; Tue, 22 Nov 2011 17:14:39 -0500 Received: from mailout-de.gmx.net ([213.165.64.22]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1RSybt-0006f8-5m for 10085@debbugs.gnu.org; Tue, 22 Nov 2011 17:14:38 -0500 Received: (qmail invoked by alias); 22 Nov 2011 22:13:13 -0000 Received: from p57BB96F0.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.150.240] by mail.gmx.net (mp002) with SMTP; 22 Nov 2011 23:13:13 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/L7IkMbI/LpKP6gu/Qhp/UbGdrUiDdUiLiszz40w eqLK6DLlscZ1Dc From: Michael Albinus To: Stefan Monnier Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names References: <87ty5yu6or.fsf@gmx.de> Date: Tue, 22 Nov 2011 23:13:11 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 22 Nov 2011 12:04:23 -0500") Message-ID: <8739df3ix4.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Stefan Monnier writes: >> Start "emacs -Q". Apply "C-x C-f /sudo:: TAB". This results in >> "/sudo:sudo:root@". A correct expansion would be "/sudo:root@". > > I haven't tracked this down yet, but while trying to I bumped into the > following problem: > > emacs -Q > (completion-try-completion "/sudo::" 'completion-file-name-table nil t) I get Debugger entered--Lisp error: (wrong-type-argument integerp t) completion-try-completion("/sudo::" completion-file-name-table nil t) eval((completion-try-completion "/sudo::" (quote completion-file-name-table) nil t) nil) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp nil nil) > C-g at the prompt > C-x C-f /sudo:: TAB > > and at that point Emacs is frozen solid. The backtrace (shown after my > sig) shows that rfn-eshadow (run with inhibit-quit) ends up waiting for > a process that never replies. > > Can you look into it, while I try to solve the other problem? `expand-file-name' seems to access the remote host. This can be suppressed by let-binding of `non-essential' to t. Could you, please, try this patch: --8<---------------cut here---------------start------------->8--- === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2011-11-17 09:09:20 +0000 +++ lisp/net/tramp.el 2011-11-22 22:04:16 +0000 @@ -1609,7 +1609,9 @@ (ignore-errors (let ((end (or (tramp-compat-funcall 'overlay-end (symbol-value 'rfn-eshadow-overlay)) - (tramp-compat-funcall 'minibuffer-prompt-end)))) + (tramp-compat-funcall 'minibuffer-prompt-end))) + ;; We do not want to send any remote command. + (non-essential t)) (when (file-remote-p (tramp-compat-funcall --8<---------------cut here---------------end--------------->8--- > Stefan Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 18:07:18 2011 Received: (at 10085) by debbugs.gnu.org; 22 Nov 2011 23:07:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RSzQs-0007wP-Fa for submit@debbugs.gnu.org; Tue, 22 Nov 2011 18:07:18 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RSzQp-0007wF-Mc for 10085@debbugs.gnu.org; Tue, 22 Nov 2011 18:07:16 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id pAMN5qRd016379; Tue, 22 Nov 2011 18:05:52 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id A1E70B4043; Tue, 22 Nov 2011 18:05:52 -0500 (EST) From: Stefan Monnier To: Michael Albinus Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Message-ID: References: <87ty5yu6or.fsf@gmx.de> <8739df3ix4.fsf@gmx.de> Date: Tue, 22 Nov 2011 18:05:52 -0500 In-Reply-To: <8739df3ix4.fsf@gmx.de> (Michael Albinus's message of "Tue, 22 Nov 2011 23:13:11 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4049=0 X-NAI-Spam-Version: 2.2.0.9286 : core <4049> : streams <703904> : uri <1013471> X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) >>> Start "emacs -Q". Apply "C-x C-f /sudo:: TAB". This results in >>> "/sudo:sudo:root@". A correct expansion would be "/sudo:root@". >> >> I haven't tracked this down yet, but while trying to I bumped into the >> following problem: >> >> emacs -Q >> (completion-try-completion "/sudo::" 'completion-file-name-table nil t) ^^^ 7 Sorry! > `expand-file-name' seems to access the remote host. This can be > suppressed by let-binding of `non-essential' to t. I think adding non-essential to rfn-eshadow.el would be even more correct (but it doesn't fix the underlying problem). Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 01:44:48 2011 Received: (at 10085) by debbugs.gnu.org; 23 Nov 2011 06:44:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RT6Zc-0001lo-1y for submit@debbugs.gnu.org; Wed, 23 Nov 2011 01:44:48 -0500 Received: from mailout-de.gmx.net ([213.165.64.22]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1RT6ZY-0001lf-CC for 10085@debbugs.gnu.org; Wed, 23 Nov 2011 01:44:46 -0500 Received: (qmail invoked by alias); 23 Nov 2011 06:43:19 -0000 Received: from p57BB978F.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.151.143] by mail.gmx.net (mp062) with SMTP; 23 Nov 2011 07:43:19 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX19Czckz0l5CXVel0DFTG6zAlfLwu1qM4S1xUlcrMn EyAz0jbn6R+vq3 From: Michael Albinus To: Stefan Monnier Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names References: <87ty5yu6or.fsf@gmx.de> <8739df3ix4.fsf@gmx.de> Date: Wed, 23 Nov 2011 07:43:16 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 22 Nov 2011 18:05:52 -0500") Message-ID: <87r50z1gqj.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Stefan Monnier writes: >> `expand-file-name' seems to access the remote host. This can be >> suppressed by let-binding of `non-essential' to t. > > I think adding non-essential to rfn-eshadow.el would be even more > correct (but it doesn't fix the underlying problem). Shall I submit such a patch towards rfn-eshadow.el, for the sake of the upcoming release? Honestly, I do not understand in detail the "underlying problem". I guess we need to find out, what are separators in Tramp wrt completion tables, and how to handle them. Note, that I'm re-introducing multi-hops in Tramp these days (outside the Emacs trunk), which introduces another separator "|". Likely, the "underlying problem" will be more evident then. > Stefan Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 09:05:49 2011 Received: (at 10085) by debbugs.gnu.org; 23 Nov 2011 14:05:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RTDSP-0005A6-J6 for submit@debbugs.gnu.org; Wed, 23 Nov 2011 09:05:49 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RTDSM-00059x-Dm for 10085@debbugs.gnu.org; Wed, 23 Nov 2011 09:05:47 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhEFAJP8zE5FxIbt/2dsb2JhbABEqECCKoEGgXIBAQQBViMFCws0EhQYDSSIGLQximIEiCCaAoRO X-IronPort-AV: E=Sophos;i="4.69,559,1315195200"; d="scan'208";a="149150212" Received: from 69-196-134-237.dsl.teksavvy.com (HELO pastel.home) ([69.196.134.237]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Nov 2011 09:04:19 -0500 Received: by pastel.home (Postfix, from userid 20848) id 906D458E47; Wed, 23 Nov 2011 09:04:19 -0500 (EST) From: Stefan Monnier To: Michael Albinus Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Message-ID: References: <87ty5yu6or.fsf@gmx.de> <8739df3ix4.fsf@gmx.de> <87r50z1gqj.fsf@gmx.de> Date: Wed, 23 Nov 2011 09:04:19 -0500 In-Reply-To: <87r50z1gqj.fsf@gmx.de> (Michael Albinus's message of "Wed, 23 Nov 2011 07:43:16 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) >>> `expand-file-name' seems to access the remote host. This can be >>> suppressed by let-binding of `non-essential' to t. >> I think adding non-essential to rfn-eshadow.el would be even more >> correct (but it doesn't fix the underlying problem). > Shall I submit such a patch towards rfn-eshadow.el, for the sake of the > upcoming release? You can even install it now. > Honestly, I do not understand in detail the "underlying problem". Simple completion tables have (all-completions STRING TABLE) return a list whose elements all have STRING as a prefix. More complex completion tables such as file-name completion instead return a list whose elements have only a suffix of STRING as a prefix. Until Emacs-23, completion tables could do this without telling anyone, which restricted the kind of completion styles that could be implemented (e.g. partial-completion-mode provided partial-completion for files in an ad-hoc way, whereas Emacs-23 provides partial-completion for files without using file-specific knowledge). Emacs-23 solved this issue by adding a new method to completion tables, called completion-boundaries which lets the completion table announce which part of STRING will be the prefix of the all-completions result. So, completion of "/foo/bar" is divided into fields "foo" and "bar" with "/" as separators, and (completion-boundaries "/foo/bar") returns 5 to indicate that "/foo/" will be stripped from all-completions's output, leaving only "bar" as a prefix of all returned elements. As I have shown with the trace, Tramp treats "/sud:" and "/sudo:" differently, making the ":" a boundary separator in the first case but not in the second. It's not strictly incorrect, but it is inconsistent and makes it harder for the minibuffer.el code to behave well. > I guess we need to find out, what are separators in Tramp wrt > completion tables, and how to handle them. The user finds out, the implementer decides. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 15:30:15 2011 Received: (at 10085) by debbugs.gnu.org; 23 Nov 2011 20:30:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RTJSQ-0006YA-UY for submit@debbugs.gnu.org; Wed, 23 Nov 2011 15:30:15 -0500 Received: from mailout-de.gmx.net ([213.165.64.22]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1RTJSO-0006Y2-M7 for 10085@debbugs.gnu.org; Wed, 23 Nov 2011 15:30:13 -0500 Received: (qmail invoked by alias); 23 Nov 2011 20:28:43 -0000 Received: from p57BB978F.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.151.143] by mail.gmx.net (mp016) with SMTP; 23 Nov 2011 21:28:43 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+AKXoj1lWAYa/ZqSEX/1OdvdAwm1FC+if7/8SED0 clRGCs0psEzC4h From: Michael Albinus To: Stefan Monnier Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names References: <87ty5yu6or.fsf@gmx.de> <8739df3ix4.fsf@gmx.de> <87r50z1gqj.fsf@gmx.de> Date: Wed, 23 Nov 2011 21:28:41 +0100 In-Reply-To: (Stefan Monnier's message of "Wed, 23 Nov 2011 09:04:19 -0500") Message-ID: <87k46qwpl2.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Stefan Monnier writes: >> Shall I submit such a patch towards rfn-eshadow.el, for the sake of the >> upcoming release? > > You can even install it now. Done. > As I have shown with the trace, Tramp treats "/sud:" and "/sudo:" > differently, making the ":" a boundary separator in the first case but > not in the second. It's not strictly incorrect, but it is inconsistent > and makes it harder for the minibuffer.el code to behave well. Tramp does not know of programmed completion and pcm style completion; all what it knows is file-name-all-completions. What else could Tramp do? >> I guess we need to find out, what are separators in Tramp wrt >> completion tables, and how to handle them. > > The user finds out, the implementer decides. Oh. You haven't seen Tramp's heuristic to determine, whether completion of "/sudo" means the method or the user or the host (in fact, it is all). > Stefan Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 21:12:22 2011 Received: (at 10085) by debbugs.gnu.org; 24 Nov 2011 02:12:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RTOnW-0006D6-0x for submit@debbugs.gnu.org; Wed, 23 Nov 2011 21:12:22 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RTOnT-0006Cy-9m for 10085@debbugs.gnu.org; Wed, 23 Nov 2011 21:12:20 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EAHymzU5FxIbt/2dsb2JhbABEqEiCLIEGgXIBAQQBViMQCzQSFBgNJIgYtESKYgSIIJoChE4 X-IronPort-AV: E=Sophos;i="4.69,562,1315195200"; d="scan'208";a="149224639" Received: from 69-196-134-237.dsl.teksavvy.com (HELO pastel.home) ([69.196.134.237]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Nov 2011 21:10:50 -0500 Received: by pastel.home (Postfix, from userid 20848) id C0A4E58F81; Wed, 23 Nov 2011 21:10:46 -0500 (EST) From: Stefan Monnier To: Michael Albinus Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Message-ID: References: <87ty5yu6or.fsf@gmx.de> <8739df3ix4.fsf@gmx.de> <87r50z1gqj.fsf@gmx.de> <87k46qwpl2.fsf@gmx.de> Date: Wed, 23 Nov 2011 21:10:46 -0500 In-Reply-To: <87k46qwpl2.fsf@gmx.de> (Michael Albinus's message of "Wed, 23 Nov 2011 21:28:41 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) >>> Shall I submit such a patch towards rfn-eshadow.el, for the sake of the >>> upcoming release? >> You can even install it now. > Done. Thanks. >> As I have shown with the trace, Tramp treats "/sud:" and "/sudo:" >> differently, making the ":" a boundary separator in the first case but >> not in the second. It's not strictly incorrect, but it is inconsistent >> and makes it harder for the minibuffer.el code to behave well. > Tramp does not know of programmed completion and pcm style completion; > all what it knows is file-name-all-completions. What else could Tramp do? Ah, right, Tramp doesn't control it directly but only indirectly. So maybe the bug is in completion-file-name-table, or in the interaction between it and Tramp. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 30 14:28:54 2012 Received: (at 10085) by debbugs.gnu.org; 30 Mar 2012 18:28:54 +0000 Received: from localhost ([127.0.0.1]:59626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDgZB-0000eO-NX for submit@debbugs.gnu.org; Fri, 30 Mar 2012 14:28:54 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:41528) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDgZ8-0000e5-T0 for 10085@debbugs.gnu.org; Fri, 30 Mar 2012 14:28:51 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicFAKU/KE9MCqRV/2dsb2JhbACBX5x7eYhwnhmGGQSbGYQJ X-IronPort-AV: E=Sophos;i="4.73,1,1325480400"; d="scan'208";a="170714592" Received: from 76-10-164-85.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.85]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Mar 2012 14:28:44 -0400 Received: by pastel.home (Postfix, from userid 20848) id 4EFB659276; Fri, 30 Mar 2012 14:28:44 -0400 (EDT) From: Stefan Monnier To: Michael Albinus Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Message-ID: References: <87ty5yu6or.fsf@gmx.de> Date: Fri, 30 Mar 2012 14:28:44 -0400 In-Reply-To: <87ty5yu6or.fsf@gmx.de> (Michael Albinus's message of "Sun, 20 Nov 2011 16:58:28 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Start "emacs -Q". Apply "C-x C-f /sudo:: TAB". This results in > "/sudo:sudo:root@". A correct expansion would be "/sudo:root@". Still trying to figure out what's really going on inside Tramp. Something I bumped into along the way (still doesn't quite explain it) is: (let ((non-essential t)) (file-name-nondirectory "/sudo:")) -> "sudo:" (let ((non-essential nil)) (file-name-nondirectory "/sudo:")) -> "" I think it's wrong for those two to return different values. `non-essential' should prevent connecting to the remote host, but here neither operation needs to contact the remote host. And of course, things are made worse because it's not only `non-essential' that controls the behavior but also `last-input-event' which makes debugging that much more .... interesting. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 31 08:36:26 2012 Received: (at 10085) by debbugs.gnu.org; 31 Mar 2012 12:36:26 +0000 Received: from localhost ([127.0.0.1]:60250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDxXe-0002TO-2b for submit@debbugs.gnu.org; Sat, 31 Mar 2012 08:36:26 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:43952) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SDxXb-0002TF-KN for 10085@debbugs.gnu.org; Sat, 31 Mar 2012 08:36:24 -0400 Received: (qmail invoked by alias); 31 Mar 2012 12:36:17 -0000 Received: from p57BB94EB.dip0.t-ipconnect.de (EHLO arthur.gmx.de) [87.187.148.235] by mail.gmx.net (mp030) with SMTP; 31 Mar 2012 14:36:17 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+nV+VS1NOn52lV5KADBPGrmDDLkGxl/nopLU/lt+ zLD+MpKzspjnFO From: Michael Albinus To: Stefan Monnier Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names References: <87ty5yu6or.fsf@gmx.de> Date: Sat, 31 Mar 2012 14:36:15 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 30 Mar 2012 14:28:44 -0400") Message-ID: <87y5qhne0w.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Stefan Monnier writes: > Still trying to figure out what's really going on inside Tramp. > Something I bumped into along the way (still doesn't quite explain it) is: > > (let ((non-essential t)) (file-name-nondirectory "/sudo:")) -> "sudo:" > (let ((non-essential nil)) (file-name-nondirectory "/sudo:")) -> "" > > I think it's wrong for those two to return different values. That's an error, and must be fixed, for sure. The correct result must be "". I could apply a simple fix in `tramp-find-foreign-file-name-handler', but this breaks other functionality. Grrrr. I fear it will take some days, until I have puzzled it out. > `non-essential' should prevent connecting to the remote host, but here > neither operation needs to contact the remote host. And of course, > things are made worse because it's not only `non-essential' that > controls the behavior but also `last-input-event' which makes debugging > that much more .... interesting. Hmm, yes. This is a heuristic for older Emacsen, which don't give Tramp a `non-essential' value. Maybe I shall change it, that in case `non-essential' does exist, no other check is needed. But I don't know, whether all completion packages outside core Emacs care about `non-essential' already. We shall postpone this change to 24.2, at least. > Stefan Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 31 11:29:28 2012 Received: (at 10085) by debbugs.gnu.org; 31 Mar 2012 15:29:28 +0000 Received: from localhost ([127.0.0.1]:32995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SE0F6-0006m6-Gq for submit@debbugs.gnu.org; Sat, 31 Mar 2012 11:29:28 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183]:42694) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SE0F5-0006m0-Be for 10085@debbugs.gnu.org; Sat, 31 Mar 2012 11:29:27 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicFAKU/KE9MCqRV/2dsb2JhbACBX5x7eYhwnhmGGQSbGYQJ X-IronPort-AV: E=Sophos;i="4.73,1,1325480400"; d="scan'208";a="170837488" Received: from 76-10-164-85.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.85]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 31 Mar 2012 11:29:21 -0400 Received: by pastel.home (Postfix, from userid 20848) id 28F5759445; Sat, 31 Mar 2012 11:29:21 -0400 (EDT) From: Stefan Monnier To: Michael Albinus Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Message-ID: References: <87ty5yu6or.fsf@gmx.de> <87y5qhne0w.fsf@gmx.de> Date: Sat, 31 Mar 2012 11:29:21 -0400 In-Reply-To: <87y5qhne0w.fsf@gmx.de> (Michael Albinus's message of "Sat, 31 Mar 2012 14:36:15 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> Still trying to figure out what's really going on inside Tramp. >> Something I bumped into along the way (still doesn't quite explain it) is: >> (let ((non-essential t)) (file-name-nondirectory "/sudo:")) -> "sudo:" >> (let ((non-essential nil)) (file-name-nondirectory "/sudo:")) -> "" >> I think it's wrong for those two to return different values. > That's an error, and must be fixed, for sure. The correct result must be "". Actually, I like "/sudo:" better, because the completion code gets caught off-guard when all-completions of "/sudo:" includes "sudo:root@" but all-completions of "/s" only include "/sudo:"; whereas it is accustomed to situations where all-completions of "/s" includes "/sudo:" and all-completions of "sudo:" includes "root@". Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 23 16:08:41 2016 Received: (at 10085) by debbugs.gnu.org; 23 Apr 2016 20:08:41 +0000 Received: from localhost ([127.0.0.1]:44312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1au3r7-000510-4B for submit@debbugs.gnu.org; Sat, 23 Apr 2016 16:08:41 -0400 Received: from omr-m008e.mx.aol.com ([204.29.186.7]:43386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1au3r5-00050l-KC for 10085@debbugs.gnu.org; Sat, 23 Apr 2016 16:08:39 -0400 Received: from mtaout-mbe02.mx.aol.com (mtaout-mbe02.mx.aol.com [172.26.254.174]) by omr-m008e.mx.aol.com (Outbound Mail Relay) with ESMTP id 2020738000E9; Sat, 23 Apr 2016 16:08:34 -0400 (EDT) Received: from localhost.localdomain (c-50-163-96-131.hsd1.ma.comcast.net [50.163.96.131]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mtaout-mbe02.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id CB81138000091; Sat, 23 Apr 2016 16:08:33 -0400 (EDT) From: Live System User To: 10085@debbugs.gnu.org Subject: Tramp method completions User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) Date: Sat, 23 Apr 2016 16:08:32 -0400 Message-ID: <8760v8xf3z.fsf@aol.com> MIME-Version: 1.0 Content-Type: text/plain x-aol-global-disposition: G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com; s=20150623; t=1461442114; bh=YbPkHAz/XnTp8qq/OqU3bijUXuB5A5xN0Zrk4DfuMiw=; h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type; b=R2I4SBb5rHjEDg8qT07HsENhusGKvAD8PcgrZ8P5g92RBIwHwaXeG4iGJtAXG3Tv6 7IM09aZWRD35reytZljOREq6mRi2ALhGpGLvytCc1Ldnsl9e9mZ8vGePMVEWgv2NTU InOZs+ESM1tdEXeTfGuPBzWlp+7oJ0GbOUjpBzgA= x-aol-sid: 3039ac1afeae571bd64157d7 X-AOL-IP: 50.163.96.131 X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 10085 Cc: Michael Albinus , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, I reported this bug to the tramp-devel mailing list and was told that this bug was already reported as Bug#10085. This bug is still present in GNU Emacs 25.0.92.1 Should I open up a new bug report and have Bug#10085 merged with it so that this old bug (initially reported in November, 2011). may receive renewed attention? Or should I just add my bug report to Bug#10085 as I am now doing? Here is my bug report below. Thanks. I'm having a problem with Tramp and completion. 1. I type C-x C-f (find-file) I see "Find file: ~/ in the echo area 2. I type /ssh: and TAB I see as completion candidates Click on a completion to select it. In this buffer, type RET to select the completion near point. Possible completions are: ssh:127.0.0.1: ssh:localhost.localdomain: ssh:localhost: 3. I type : so the prompt now displays: Find file: ~//ssh:: 4. I press TAB and see the error: Tramp: Opening connection for ssh using ssh...failed Now the prompt says: Find file: ~//ssh:ssh: and, of course, if I were to press another TAB it would yields a "[No match]" message 5. If I then remove the ~/ and second ssh from prompt so that it now displays: Find file: /ssh:: and press TAB, the completion candidates now yield: Click on a completion to select it. In this buffer, type RET to select the completion near point. Possible completions are: ssh:127.0.0.1: ssh:localhost.localdomain: ssh:localhost: ssh:ssh: Why was ssh:ssh added as a completion canidate? This probably why the prompt now shows: Find file: /ssh:ssh 6. If I then remove the second ssh: so that prompt shows: Find file: /ssh:: and press TAB, I get the error: Tramp: Opening connection for ssh using ssh...failed and the prompt returns back to: Find file: /ssh:ssh: It appears that once Tramp gets ahold of ~// it doesn't let go. This is into contrast to not invoking Tramp. Consider: C-x C-f and the prompt Find file: ~/ and typing /etc so that the prompt is now: Find file: ~//etc Pressing TAB yields Find file: ~//etc/ and another TAB shows the files in /etc as completion canndidates. The ~/ here (and in Tramp after step 2 above) is greyed out. Also, it appears that ~//ssh:: TAB ~//ssh:localhost: TAB behave diffently as it appears that ~//ssh:localhost: TAB works as I expect whereas ~//ssh:: TAB does not. Perhaps :: doesn't imply localhost? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 24 04:22:26 2016 Received: (at 10085) by debbugs.gnu.org; 24 Apr 2016 08:22:26 +0000 Received: from localhost ([127.0.0.1]:44461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auFJC-000680-8Q for submit@debbugs.gnu.org; Sun, 24 Apr 2016 04:22:26 -0400 Received: from mout.gmx.net ([212.227.17.20]:62382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auFJA-00067l-Es for 10085@debbugs.gnu.org; Sun, 24 Apr 2016 04:22:24 -0400 Received: from detlef.gmx.de ([79.195.30.210]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0Lt1yI-1bsAHP0gHa-012c1I; Sun, 24 Apr 2016 10:22:13 +0200 From: Michael Albinus To: Live System User Subject: Re: bug#10085: Tramp method completions References: <87ty5yu6or.fsf@gmx.de> <8760v8xf3z.fsf@aol.com> Date: Sun, 24 Apr 2016 10:22:08 +0200 In-Reply-To: <8760v8xf3z.fsf@aol.com> (Live System User's message of "Sat, 23 Apr 2016 16:08:32 -0400") Message-ID: <87potfju1b.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:QIfqP1y8v5mIGTvmt7eprQCHXN8dCcUrERMugPbJfNSSL/DS4dj pNgpFP2EmsOh0MHb7KpMRkQeqKYw3StkqlidzTul2iARI6mrYU5TjM+38q+ZOyWWV5zSjM3 UPH/ejXvllGwe3IeEWnmMAZE3lbXDhMDBDPI5RfKRuTlV8FoC3qazP/kyPOMi3eE325rQXB Ny1WoTbsSc9JO0UVlSKUw== X-UI-Out-Filterresults: notjunk:1;V01:K0:XqOjj+v6lyI=:HQMPwEaJQGKFanTwGeQzWr ZdYa9jcnsL9eLLA7TCNcjh/wPZCFeVNMEGb3uneGmnZR7nqQfdLd/QzgBNLDo7iHIWrlOW1Sj pcmPfUazgReeuLMo7QQ/72Tp2vLlbMwHJ2OXRBYeAyl8iXq+aaER7AiMp5q/MncdAePBnXhNu 0zeWXn0Ye6OEEKkzdXiyjocsoSvOrHeJ2q+YrSwyUfq8ktAbOqYZO0ZhVC1YrDMpZh47NBN6m EFY7l0k2KkHj3ZheKb4CN0KC9x0L1BSJAufUJlb4zvQEjYzEeezK3tXa9lYbq0G+ZaSSvk143 0Im/LBH3SIHvVnHHdHKqRMzVrMHMbCvEGsUfmzCfC7gjmpeCEXIeEp4ue0tsraGxqqzjzkkbe VCBn480bPBC82fU0rwlWVFsc3gOsEB4Mu3f8twnGPgHNv+s5ThTBeEGsLfu/Yt0sSIfm2nGi6 TYql55sqwscMnUzWlfEXw05Hrm9AglCpcp3fGO4tOeFkc/pVU9k7sK/dzPqc1N5zxfkKk0QQo 0GQC97TXfECFHlGT6iDxQQFq68qOlSIldcWk+EiXWwfW46Ux6h1QhnLBge6KrhciFHUF+Ija7 9ki6RqUWJw1QeeR5AeQRF2Dx6lrtHyNRK252OMlVdov5Y8uZSzkeu/sICbeEUzcQH9yWhv6R1 +1+kTK2W6uprJ05wa2ltR+9+pdcE2BB9Q6vbCuuUM7Tb14VkJw9IOQirMiWjACna7QW09OKYs nhaQUNBJ6Ius1ze31uzOcrKVF/+e0Vlo8qKblhoSk0FsYJuRbkIzpk/WaXcIBFI4J6Ml0LD3t z7Rj1BJ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Live System User writes: > Hi, Hi, > Should I open up a new bug report and have Bug#10085 merged > with it so that this old bug (initially reported in November, 2011). > may receive renewed attention? Or should I just add my bug report > to Bug#10085 as I am now doing? I doubt that opening a new bug report will add more drive to this problem. Stefan, your last statement was that "maybe the bug is in completion-file-name-table, or in the interaction between it and Tramp". Do you have more information now? Could Tramp change something in order to get this fixed? > Thanks. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 27 10:16:06 2016 Received: (at 10085) by debbugs.gnu.org; 27 Apr 2016 14:16:06 +0000 Received: from localhost ([127.0.0.1]:50159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avQG6-0003Ot-5F for submit@debbugs.gnu.org; Wed, 27 Apr 2016 10:16:06 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:58071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avQG4-0003Ol-Pu for 10085@debbugs.gnu.org; Wed, 27 Apr 2016 10:16:05 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u3REG31a023848; Wed, 27 Apr 2016 10:16:03 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 03A77661ED; Wed, 27 Apr 2016 10:16:30 -0400 (EDT) From: Stefan Monnier To: Michael Albinus Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Message-ID: References: <87ty5yu6or.fsf@gmx.de> <8739df3ix4.fsf@gmx.de> <87r50z1gqj.fsf@gmx.de> <87k46qwpl2.fsf@gmx.de> Date: Wed, 27 Apr 2016 10:16:30 -0400 In-Reply-To: <87k46qwpl2.fsf@gmx.de> (Michael Albinus's message of "Wed, 23 Nov 2011 21:28:41 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5655=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5655> : inlines <4726> : streams <1626165> : uri <2197832> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > Tramp does not know of programmed completion and pcm style completion; > all what it knows is file-name-all-completions. > What else could Tramp do? Tramp has control via file-name-directory. >>> I guess we need to find out, what are separators in Tramp wrt >>> completion tables, and how to handle them. >> The user finds out, the implementer decides. > Oh. You haven't seen Tramp's heuristic to determine, whether completion > of "/sudo" means the method or the user or the host (in fact, it is all). ;-) OK, here are some inconsistencies I found just now in emacs-25: ELISP> (completion-boundaries "/sudo:" #'completion-file-name-table nil "") (6 . 0) ELISP> (let ((non-essential t)) (completion-boundaries "/sudo:" #'completion-file-name-table nil "")) (1 . 0) In the above the first answer looks good to me. The second looks wrong: it should be the same as the first. This is controlled by Tramp via (file-name-directory "/sudo:"). ELISP> (all-completions "/sudo:" #'completion-file-name-table) *** Eval error *** Host name must not match method "sudo" ELISP> (let ((non-essential t)) (all-completions "/sudo:" #'completion-file-name-table)) ("sudo:root@") The first answer above looks wrong (there's no reason for Tramp to assume that "/sudo:" uses "sudo" as a host name, and indeed in the second case it correctly interprets "sudo" as a method rather than a host name). Assuming we fix the completion-boundaries to be (6 . 0) the second answer (which comes from `file-name-all-completions "" "/sudo:") should be ("root@"). Fixing those inconsistencies should fix bug#10085. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 27 14:38:07 2016 Received: (at 10085) by debbugs.gnu.org; 27 Apr 2016 18:38:07 +0000 Received: from localhost ([127.0.0.1]:50514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avULe-0001Op-Rq for submit@debbugs.gnu.org; Wed, 27 Apr 2016 14:38:07 -0400 Received: from mout.gmx.net ([212.227.15.15]:61163) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avULd-0001OL-5A for 10085@debbugs.gnu.org; Wed, 27 Apr 2016 14:38:05 -0400 Received: from detlef.gmx.de ([87.146.48.99]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0LbM2k-1bOod42gnq-00kvRy; Wed, 27 Apr 2016 20:37:56 +0200 From: Michael Albinus To: Stefan Monnier Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names References: <87ty5yu6or.fsf@gmx.de> <8739df3ix4.fsf@gmx.de> <87r50z1gqj.fsf@gmx.de> <87k46qwpl2.fsf@gmx.de> Date: Wed, 27 Apr 2016 20:37:54 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 27 Apr 2016 10:16:30 -0400") Message-ID: <87k2jiaoe5.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:wyR9FNgMnREv4hzqwllIWXxJcBMBne/ep1Vjn6I4V7ZTncp3UoL fbxtOkzpmAeiDPyY8MtZloREupuIz25TcJu3TO2MHp3Nx7TQdPjOKw+tDYLqlobhx1c8kvr KI/Pu+V4+3YuO8o1kgCs36sFBWE50GfV4uxKqePrkoBHf/zz6JGR5Fp36ES1gIVkJTaq60m pWujZ2qgGxD4Ac6H+Cccg== X-UI-Out-Filterresults: notjunk:1;V01:K0:15UmilSBCcg=:VFknj8lcrGTL+0Af/aAVqt nl7u2snMCKbQf2YIdlHuGhbSlwTlS5IRjUauVD+badxdcVqKoCAZdgF+xOpNMxVEExVyvAbA/ zo+gXuUwbpYJguN6zJ5cUo1U2QcTG8oDbtAQ2aJveER9IbwGmI5RdQjAKVI13ETZPakmP43Wq I77V13QACNzNwErjNl1qegxuVlrNtENAObS4S33QRtoCTAXc1JUiAd31owbVD95tDs/8ChIke wBBeCx4tvo4z0c7zqo3+j1rCjFyNqdeqCvJ3RniAxg0A4ibdXbvClbh0f9XUziNGiYrrc74n5 DpF317VrIzWLhNxxMy0qXQq1QYYFc7KpIJdr46YygmqLEbf4q/2SDeG6amBXDfnhjqLSIenIy kp9Q1dUzVAeFExLAhIaNrGZkn3m22qWQ1U8bGJaQxSvo0+2ef53rdsN00+5IDucFP/2kVIjUG 6BXEM0VsUwJ1d4uJR4W6X4HUNOLh/ZLNCyozZ4mV7m8/wNwSXZU3MSsrgCSEPyvaOgvYEXUF3 orKRpDriUu7jrmhglriqHJWet6jrL55RZ0aRwYNNB8Q4ZH30fYF+PIPQS5TOr4IPz9EcnaPR3 zwuAE6vsi8Q/w3/xqasGe+XOOYSeKwvCGxR++sOdVLt4WTJCqBf4HP5wcAuX3U0bhN6eJ+dnC xCcYg9Mndjp9IUSu1LzGXxFGZwDPrnirGnfOuYg6XxZv087g1BoYF4470jhXuRR6alU5IgW4f A4VgP6uy5FzgPC2sIX7lsm7Kx7YQM4kMzMtII6LMWATZNb59pTKjlIxDTDjE2fMVI0jAcKjHf +nw7cdQ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Stefan Monnier writes: Hi Stefan, >> Tramp does not know of programmed completion and pcm style completion; >> all what it knows is file-name-all-completions. >> What else could Tramp do? > > Tramp has control via file-name-directory. > > OK, here are some inconsistencies I found just now in emacs-25: > > ELISP> (completion-boundaries "/sudo:" #'completion-file-name-table nil "") > (6 . 0) > > ELISP> (let ((non-essential t)) (completion-boundaries "/sudo:" > ELISP> #'completion-file-name-table nil "")) > (1 . 0) > > In the above the first answer looks good to me. > The second looks wrong: it should be the same as the first. > This is controlled by Tramp via (file-name-directory "/sudo:"). That's true, there is a bug: (file-name-directory "/sudo:") => "/sudo:" (let ((non-essential t)) (file-name-directory "/sudo:")) => "/" The second answer is wrong, indeed. I will check what's up. > ELISP> (all-completions "/sudo:" #'completion-file-name-table) > *** Eval error *** Host name must not match method "sudo" > ELISP> (let ((non-essential t)) (all-completions "/sudo:" > ELISP> #'completion-file-name-table)) > ("sudo:root@") > > The first answer above looks wrong (there's no reason for Tramp to > assume that "/sudo:" uses "sudo" as a host name, and indeed in the > second case it correctly interprets "sudo" as a method rather than > a host name). Hmm, "/sudo:" is a valid remote file name. It uses as method the value of `tramp-default-host', and as host the string between "/" and ":". That's how it is specified. How shall Tramp know from the syntactical point of view, that "sudo" is meant as method? It cannot, unless somebody tells it to Tramp, for example by let-binding `non-essential'. > Assuming we fix the completion-boundaries to be (6 . 0) the second > answer (which comes from `file-name-all-completions "" "/sudo:") should > be ("root@"). > > Fixing those inconsistencies should fix bug#10085. I see. I will check what could be done on Tramp side. Whatever I'll do, it will go into master. (Being busy just now, it might take the weekend to work on this. Sorry.) > Stefan Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 27 15:16:37 2016 Received: (at 10085) by debbugs.gnu.org; 27 Apr 2016 19:16:37 +0000 Received: from localhost ([127.0.0.1]:50596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avUwv-0006tu-0f for submit@debbugs.gnu.org; Wed, 27 Apr 2016 15:16:37 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:44577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avUws-0006nX-J7 for 10085@debbugs.gnu.org; Wed, 27 Apr 2016 15:16:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CfDQA731xV/0uLxEVcgxCEAsYTgk0EAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQSFBgNJIg3CM8jAQEBAQEBBAEBAQEeizqFBQeELQWLRIRwowuBRSOCO4FZIoJ4AQEB X-IPAS-Result: A0CfDQA731xV/0uLxEVcgxCEAsYTgk0EAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQSFBgNJIg3CM8jAQEBAQEBBAEBAQEeizqFBQeELQWLRIRwowuBRSOCO4FZIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="218479801" Received: from 69-196-139-75.dsl.teksavvy.com (HELO pastel.home) ([69.196.139.75]) by ironport2-out.teksavvy.com with ESMTP; 27 Apr 2016 15:16:29 -0400 Received: by pastel.home (Postfix, from userid 20848) id 119E6644CC; Wed, 27 Apr 2016 15:16:29 -0400 (EDT) From: Stefan Monnier To: Michael Albinus Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Message-ID: References: <87ty5yu6or.fsf@gmx.de> <8739df3ix4.fsf@gmx.de> <87r50z1gqj.fsf@gmx.de> <87k46qwpl2.fsf@gmx.de> <87k2jiaoe5.fsf@gmx.de> Date: Wed, 27 Apr 2016 15:16:29 -0400 In-Reply-To: <87k2jiaoe5.fsf@gmx.de> (Michael Albinus's message of "Wed, 27 Apr 2016 20:37:54 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 10085 Cc: 10085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Hmm, "/sudo:" is a valid remote file name. It uses as method the value > of `tramp-default-host', and as host the string between "/" and > ":". That's how it is specified. Where/who specifies it? AFAIK *you* specify it, so you can change it. More specifically, I think it's OK to say: /sudo: is matched as /: /sudo:foo is matched as /:foo /sudo:foo/ is matched as /:foo/ As you know, I'd even be happy to do /sudo:foo/ is matched as /:foo/ and force the user to write /ssh:sudo: or /sudo.domain: when she wants to access a host whose name is the same as an existing method. But IIUC you want to preserve the old /: syntax a bit more closely, so I think /sudo: is matched as /: /sudo:foo is matched as /:foo /sudo:foo/ is matched as /:foo/ might be an acceptable middle ground. > How shall Tramp know from the syntactical point of view, that "sudo" > is meant as method? By fiat ;-) > It cannot, unless somebody tells it to Tramp, for example by > let-binding `non-essential'. IIUC you'd rather skip this part of the discussion, so I won't get into it ;-) > Whatever I'll do, it will go into master. Sounds good to me. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon May 02 03:19:24 2016 Received: (at 10085-done) by debbugs.gnu.org; 2 May 2016 07:19:24 +0000 Received: from localhost ([127.0.0.1]:32960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ax88a-00033c-17 for submit@debbugs.gnu.org; Mon, 02 May 2016 03:19:24 -0400 Received: from mout.gmx.net ([212.227.15.15]:52957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ax88X-00033K-Uq for 10085-done@debbugs.gnu.org; Mon, 02 May 2016 03:19:22 -0400 Received: from detlef.gmx.de ([87.146.63.160]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MEnjW-1auJly3AsM-00Fzd4; Mon, 02 May 2016 09:19:12 +0200 From: Michael Albinus To: Stefan Monnier Subject: Re: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names References: <87ty5yu6or.fsf@gmx.de> <8739df3ix4.fsf@gmx.de> <87r50z1gqj.fsf@gmx.de> <87k46qwpl2.fsf@gmx.de> <87k2jiaoe5.fsf@gmx.de> Date: Mon, 02 May 2016 09:19:11 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 27 Apr 2016 15:16:29 -0400") Message-ID: <87shy1apw0.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:K78nRZiy4kh7X1EZu+3bmVO2gHS916/g7C/bu9dk+GlFpoj8jOx PNTYx8sCNQpgJcYkxOD5GnBt2M1sZZjTe7DXlLR+b2fCpoyR68x33n3eoAFXdU17B4bik9U xanRljG2Q8V24eOvKUdjOj71uzGPGwUx2pM8+lNYbRFFx80xK/7QuL1UMa6aM0OhJmNFCFe 16d/B61hsR1c4BIBLg7Dg== X-UI-Out-Filterresults: notjunk:1;V01:K0:lrVc53+qMUc=:2XcBSUk4TcYFsu8Fd20HPW yvUyKwS5O6HjofvRz0TPnx8JUwaAXSbla9ckyR0RPSWttijYkLylfZ1uWRQmtVzvIv1LLaYSv An4MuwwQYqtkC5Pt4kzlm/cK/gdrAi2A3LymweL6OF70Wuble2iL7u2cF3T+FAMxsvo2FLklf BP0UXKdek9uKyLjm+egkJY23ktm8w8FUxoIobMjWYL4K+OCMJPozZ/aGUIHP2cn28tiBupkjd rdhU7UofoqQEFM57wprZE7AOppPC4xqXVzFfEhR3bRuT/cvsYIbYTpIvAyhqf4QbpFAgUt467 7GFSrFEHPXu4L4WeciWW3P1KoXPZUSHNx5GcXXNsPsIfwA3dg1ooZhJ4encJcRI+3NPpTDIVa PFf95OlJghH11zzG7wWQi0FtQkjzl+xKpdXo+oeVQ5kWvvOplDdv1ajtCskmRPylKmp7vQ1+B SxNr/DMfuNWnnyAFxfSNCKaJ/zx5xv7i7w70mpaNtPjk81JL46iVFbd0cP9qIINImQRB4NL7q djZvpOdQeS/bV3bX5rF9X7tBsljq0tjdrazDMYRcZkrWCYJkQ/EusD82H76PTEa72e5xRqwzq bTlEpv+nPNnaG54bg/19UpaMrY7x5J/aUPyTrob+quwILjYPXgcmeET1/BZBjnmgVxoOjJdzc pCcmB3q0kMo8X4QbZjOcq+iNuFaaazpqdePMF3y0GVx1UlDycfOIEvmJVXo/NFUGmNaNODKlR 7sD9OTakVtNUeKcduc6gc2eHlk/zoEJDt/9EcG0HudEl7Qe/HJlB2tFW3LRXZRtSH59IKgjyk gSdHetk X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 10085-done Cc: 10085-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Stefan Monnier writes: >> Hmm, "/sudo:" is a valid remote file name. It uses as method the value >> of `tramp-default-host', and as host the string between "/" and >> ":". That's how it is specified. > > Where/who specifies it? AFAIK *you* specify it, so you can change it. This was specified even before I've entered the Tramp camp, back in 2002. And I'm very conservative in changing the interface. Anyway, I've fixed in Tramp the implementation for `file-name-as-directory', `file-name-directory' and `file-name-nondirectory' in completion mode. This solves this bug, I'm closing it. Thanks for pointing me into the right direction with `file-name-directory'! > Stefan Best regards, Michael. From unknown Fri Jun 20 05:29:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 30 May 2016 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator