unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 49229@debbugs.gnu.org
Subject: bug#49229: 27.2; `M-x shell' fails over TRAMP from local MS Windows
Date: Thu, 1 Jul 2021 10:07:53 -0700	[thread overview]
Message-ID: <CANh=_JERewyqbKv2kzk1O1PPU0KeJupaaVvv-5a+HBJ+8wASBA@mail.gmail.com> (raw)
In-Reply-To: <878s2upl5b.fsf@gmx.de>

(Hopefully I don't need to do anything special to comment on a closed bug...)

On Sun, Jun 27, 2021 at 11:18 PM Michael Albinus <michael.albinus@gmx.de> wrote:
>
> I've pushed the patch to master, closing the bug. The Tramp part of the
> patch will appear with Tramp 2.5.1 on GNU ELPA.

I discovered a minor issue with the Tramp part of the patch. On MS
Windows, if I'm editing a remote file and then open a local file, the
newly-opened local file's default directory doesn't have a volume
letter. This still works overall, but it does break the "~" file
alias.

Here are steps to reproduce:

  C-x C-f /sshx:server:/path/to/file.txt
  ;; "/sshx:server:/path/to/" is pre-filled here:
  C-x C-f /sshx:server:/path/to//~/local.txt
  ;; local.txt opens/saves correctly, but...
  C-x C-f
  ;; Initial value in minibuffer is "/Users/Jim/Documents/".
  ;; Before Tramp 2.5.1, it was "~/".

This might cause some problems in other places, but so far the only
issue I've found is the file alias for "~" no longer working. However,
the fact that `default-directory' for local.txt isn't an absolute path
could cause issues if we use that `default-directory' elsewhere. Since
"/Users/Jim/Documents/" is relative to the current drive, it can mean
different things depending on what Emacs thinks the current drive is
at the time.

Maybe it would be best to revert the Tramp part of this patch and do
something similar to the patch in my original message. That would
ensure that nothing unexpected happens as a result of
`default-directory' being relative to the current drive. If that makes
sense, I can put together a proper patch for the `M-x shell' part.





  reply	other threads:[~2021-07-01 17:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 23:05 bug#49229: 27.2; `M-x shell' fails over TRAMP from local MS Windows Jim Porter
2021-06-26 14:33 ` Michael Albinus
2021-06-26 18:01   ` Jim Porter
2021-06-27  8:41     ` Michael Albinus
2021-06-28  0:47       ` Jim Porter
2021-06-28  6:18         ` Michael Albinus
2021-07-01 17:07           ` Jim Porter [this message]
2021-07-02 12:58             ` Michael Albinus
2021-07-02 21:30               ` Jim Porter
2021-07-03  6:42                 ` Michael Albinus

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CANh=_JERewyqbKv2kzk1O1PPU0KeJupaaVvv-5a+HBJ+8wASBA@mail.gmail.com' \
    --to=jporterbugs@gmail.com \
    --cc=49229@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).