From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#49229: 27.2; `M-x shell' fails over TRAMP from local MS Windows Date: Sat, 26 Jun 2021 11:01:41 -0700 Message-ID: References: <87h7hkpufg.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30410"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49229@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 26 20:02:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxCdD-0007jg-KP for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Jun 2021 20:02:15 +0200 Original-Received: from localhost ([::1]:52616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxCdB-0006Kh-UN for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Jun 2021 14:02:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxCd0-0006KZ-H6 for bug-gnu-emacs@gnu.org; Sat, 26 Jun 2021 14:02:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37059) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lxCd0-0000j2-4V for bug-gnu-emacs@gnu.org; Sat, 26 Jun 2021 14:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lxCcz-0008B0-VF for bug-gnu-emacs@gnu.org; Sat, 26 Jun 2021 14:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Jun 2021 18:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49229 X-GNU-PR-Package: emacs Original-Received: via spool by 49229-submit@debbugs.gnu.org id=B49229.162473051831413 (code B ref 49229); Sat, 26 Jun 2021 18:02:01 +0000 Original-Received: (at 49229) by debbugs.gnu.org; 26 Jun 2021 18:01:58 +0000 Original-Received: from localhost ([127.0.0.1]:48604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxCcv-0008Ab-UA for submit@debbugs.gnu.org; Sat, 26 Jun 2021 14:01:58 -0400 Original-Received: from mail-pj1-f47.google.com ([209.85.216.47]:54243) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxCct-0008AL-Po for 49229@debbugs.gnu.org; Sat, 26 Jun 2021 14:01:56 -0400 Original-Received: by mail-pj1-f47.google.com with SMTP id bb20so7314668pjb.3 for <49229@debbugs.gnu.org>; Sat, 26 Jun 2021 11:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vU0WiMbyooYCzRbZUXaXy2Sei5iy2LLRlpsWPt3UDDY=; b=iMUvGBQJtecqowHcd3/vhTQQZgTjmQLN2oMzJ5saehcndJvTnXyRglJBcYy5jhxac+ KyLK7XaGPjYajpVWg+xdgc6ryc4h6eixZFMFFQn0hChIw3LLY4Q3WT/2IBadcEwfui9l 15qtvByk/cJGb6mMOkgC9kYwlFNCAcNokh3zAKBaAdDWn0FTtiuIW/c3E/mGMtUyQZJ5 5zufUvuaq6ttIpbdTN44oQAgNJtIEuitnAi68KpwmV2dnuHcTPdqmyf19K6It8WU0PNT EhPXvRnCTQo1JS7z5afCRijPylbayjGBSsaqPECC5OOILavO8P7AbqhdWAfBNmlvmYgA UGhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vU0WiMbyooYCzRbZUXaXy2Sei5iy2LLRlpsWPt3UDDY=; b=V+zwzpjif/pwjBaF5fZZYf3c6c5/KyXCnGhyMPykeODUaGCR80dXxW0CAj0BvrR6tA 24YLeEDP8QeWk4V97I3llEqVuf4MjT60XxFsdg0NbJ4efZW62Bb4MIkB4SyFzVAkZXmf UMCJEouB2Tl9yhsLXCL87OMa6T59AeIrsRZlk2kwliVlS5176euKeFrUDtClJ0N15oqa AWjf1bD4mS5smK09LkreUuZOWuR0Go3mNn6I6PkpXxwpAGZ59vy9tAJV/c9E1fg1gQY1 93V12J+irw4Y38PAOkHWJnOENLT8MhfByO1BJ2NbyhKgknW4Xj9OeQAR0e3b/PVgykh1 wncQ== X-Gm-Message-State: AOAM532AfFu2A//zAtiqyua5posSdmzRm84bgt47BUPDPEORTnzjWYc5 y48GHP3v21irA/l/2BrcgiZuqS6vynTB9sVxpY8= X-Google-Smtp-Source: ABdhPJye73UGmRUxPAKZShGoy1kMXEjjrPFKlgmTFg+0rl6HuD1OttYAwi18ypqVQJ/GVAn4CzwRv0yeu+y9qdao7Zs= X-Received: by 2002:a17:90a:708:: with SMTP id l8mr27878721pjl.103.1624730509945; Sat, 26 Jun 2021 11:01:49 -0700 (PDT) In-Reply-To: <87h7hkpufg.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209025 Archived-At: On Sat, Jun 26, 2021 at 7:33 AM Michael Albinus wrote: > > Occasionally, I've seen this problem on MS Windows already. Since I > don't run anything on MS Windows unless for bug hunting, I couldn't > locate it yet. With your recipe, it's reproducible now. It's not related > to "M-x shell" only, but more general. Looking at your patch, it makes sense to me. It's not where I originally expected the fix to go, but I remember some previous corner cases that were fixed with `tramp-drop-volume-letter', so this should be good. > I've pushed a fix to the master branches of Emacs and Tramp. Could you, > pls, check? I tested on MS Windows and it works correctly for me. (Note that I just copied and eval'ed the new version of `tramp-file-name-handler', since I don't have a proper build environment on MS Windows.) While testing it, I discovered one other oddity though. This doesn't necessarily need a fix, but it's a bit surprising, and I'll mention it here in case someone thinks it's a problem worth fixing. If I erase the default text and instead enter "C:/Windows/System32/cmd.exe" into the `M-x shell' prompt, it treats *that* as a remote path too. Now, the prompt does say to enter a *remote* shell path, so if I enter a local path, I made a mistake. However, the default shell path for `M-x shell' from a remote directory is a TRAMP path ("/sshx:server:/path/to/some//bin/sh"), so it's surprising that when I delete the TRAMP host prefix, I still end up running a shell on the remote server. Perhaps it would be nicer if, when `M-x shell' prompted for the remote shell path, it didn't include the TRAMP prefix by default (e.g. the default value would just be "/bin/sh"). That might not interact well with `read-file-name' completion though; is it possible to use file-name completion on a remote path without the TRAMP prefix?