GNU bug report logs - #29149
Tramp shell uses local shell setting in windows

Previous Next

Package: emacs;

Reported by: Shuguang Sun <shuguang <at> gmail.com>

Date: Sun, 5 Nov 2017 04:11:01 UTC

Severity: normal

Merged with 29442

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29149 in the body.
You can then email your comments to 29149 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sun, 05 Nov 2017 04:11:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Shuguang Sun <shuguang <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 05 Nov 2017 04:11:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Tramp shell uses local shell setting in windows
Date: Sun, 5 Nov 2017 12:10:08 +0800
[Message part 1 (text/plain, inline)]
Hi,

The tramp shell uses local shell setting (explicit-shell-file-name and
shell-file-name) in Windows. However, according to the documents, for
example, in tramp-handle-shell-command:
;; We cannot use `shell-file-name' and `shell-command-switch',
;; they are variables of the local host.
Instead, it uses the arguments tramp-remote-shell and
tramp-remote-shell-args from the variable tramp-methods.

Windows7,
GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2017-10-21
explicit-shell-file-name = nil
shell-file-name =
"C:/Users/username/emacs/libexec/emacs/27.0.50/x86_64-w64-mingw32/cmdproxy.exe"

- Problem 1: tramp and dired-do-shell-command:  start: Unknown job: /b
Why "start /b" is called remote side?

When I run tramp (plink) and go to a remote buffer (dired mode), run
dired-do-shell-command (!) on marked file (for example, /opt/bin/R CMD
BATCH * &). It popup the buffer of * Async Shell Command *, and the command
is not run but a message "start: Unknown job: /b" which looks it runs the
windows-like command "start /b ..." on the remote shell.

A test without "&" (non-ascync):
11:07:06.340383 tramp-handle-insert-directory (0) # Opening directory
/plink:user <at> host:/opt/user/test/...done
11:07:35.748442 tramp-send-command (6) # ( cd /opt/user/test/ && /bin/sh -c
start\ /b\ /opt/bin/R\ CMD\ BATCH\ --no-restore\ --no-save\ \"coxph.r\"
</dev/null; echo tramp_exit_status $? )
11:07:36.033413 tramp-wait-for-regexp (6) #
start: invalid option: --no-restore
Try `start --help' for more information.
tramp_exit_status 1

It doen't help if (setq explicit-shell-file-name "/bin/sh"). It looks like
due to the construction of the command which concats shell-file-name and
args even if it is for tramp and remote host.

- Problem 2: tramp and shell: env: c:/bin/sh : No such file or directory
where "c:/" comes? Does it comes from some feature of completion of
read-file-name?

In a tramp dried buffer, call shell which suppose to raise the shell buffer
on remote server. However, I got error messge in the * shell * buffer that
"env: c:/bin/sh : No such file or directory". I don't know where the "c:/"
comes from. When shell is called, it reads the remote path in the minibufer
with promotes (for remote shell path) "/plink:user <at> host:/path/to/
dired/C:/Users/username/emacs/libexec/emacs/27.0.50/x86_64-w64-mingw32/cmdproxy.exe",
and I change it to "/plink:user <at> host:/bin/", and then I got error message
above. Below is the tracking:

12:00:20.871919 tramp-send-command (6) # cd /opt/user/test/ &&  exec  env
PS1\=/plink\:user\@host\:/opt/user/test/\ \#\$\  TERM\=emacs
TERMCAP\=emacs\:co\#135\:tc\=unknown\: INSIDE_EMACS\=27.0.50\,comint
c\:/bin/sh -i

"c\"/bin/sh" is because I change the remote path to /plink:user <at> host:/bin/
when it asked in the minibuffer.

It opens the shell remotely if (setq explicit-shell-file-name "/bin/sh").
11:50:36.476919 tramp-send-command (6) # cd /opt/user/test/ &&  exec  env
PS1\=/plink\:user\@host\:/opt/user/test/\ \#\$\  TERM\=emacs
TERMCAP\=emacs\:co\#135\:tc\=unknown\: INSIDE_EMACS\=27.0.50\,comint
/bin/sh -i
The remote shell path is not asked in this case.
Shoud it get tramp-remote-shell from tramp-methods or remote-shell from
tramp-connection-properties directly?

- Problem 3: as in problem 2, shell-file-name is used in the complete of
promote for remote path. It should not do in this way because
shell-file-name is for local.
It triggered lots of try in hos side for completion:
11:16:47.779920 tramp-send-command (6) # test -d
/opt/bee/user/test/C\:/Users/username/emacs/libexec/emacs/27.0.50/x86_64-w64-mingw32
2>/dev/null; echo tramp_exit_status $?
I have set ido-mode or icomplete-mode to nil.

The only tramp setting I used:
  (push '("plink"
           (tramp-login-program        "plink")
           (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh")
("%h")))
           (tramp-remote-shell         "/bin/sh")
           (tramp-remote-shell-args    ("-c"))
           (tramp-copy-program         "pscp")
           (tramp-copy-args            (("-l" "%u") ("-P" "%p") ("-scp")
("-p" "%k") ("-q") ("-r")))
           (tramp-copy-keep-date t)
           (tramp-copy-recursive t)
           (tramp-default-port         22))
        tramp-methods)




Best Regards,
Shuguang Sun
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Thu, 09 Nov 2017 09:28:02 GMT) Full text and rfc822 format available.

Message #8 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: 29149 <at> debbugs.gnu.org
Subject: Tramp shell uses local shell setting in windows
Date: Thu, 9 Nov 2017 17:27:51 +0800
[Message part 1 (text/plain, inline)]
Hi,

Local: Emacs on Windows 7.
Host:  Linux
Tramp from Windows 7 to linux

A further information: it is about backup. When I setup
tramp-backup-directory-alist which will make it backup serverside. However,
It concat !driver_c to the backup file name.

I have setting ("\\.md$" . "~/.emacs.d/backup-tramp/mdfiles") in
tramp-backup-directory-alist. The backup file in the server is
"!drive_c!plink!!user <at> host!!!opt!host!path!Ava!_summary.md.~1~"

The "!drive_c" comes very strange.

Best Regards,
Shuguang
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sat, 11 Nov 2017 08:58:01 GMT) Full text and rfc822 format available.

Message #11 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Shuguang Sun <shuguang <at> gmail.com>, Michael Albinus <michael.albinus <at> gmx.de>
Cc: 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Sat, 11 Nov 2017 10:57:28 +0200
> From: Shuguang Sun <shuguang <at> gmail.com>
> Date: Thu, 9 Nov 2017 17:27:51 +0800
> 
> Local: Emacs on Windows 7.
> Host:  Linux
> Tramp from Windows 7 to linux
> 
> A further information: it is about backup. When I setup tramp-backup-directory-alist which will make it backup
> serverside. However, It concat !driver_c to the backup file name.
> 
> I have setting ("\\.md$" . "~/.emacs.d/backup-tramp/mdfiles") in tramp-backup-directory-alist. The backup file
> in the server is 
> "!drive_c!plink!!user <at> host!!!opt!host!path!Ava!_summary.md.~1~"
> 
> The "!drive_c" comes very strange.

Michael, any advice on this one?  Do you understand where did
!drive_c! come from?  AFAIU, it should only be used for backups of
local files.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sat, 11 Nov 2017 09:11:01 GMT) Full text and rfc822 format available.

Message #14 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: "michael.albinus" <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>, Shuguang Sun <shuguang <at> gmail.com>
Cc: 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Sat, 11 Nov 2017 10:10:45 +0100
[Message part 1 (text/plain, inline)]
Hi Eli,
My laptop crashed last night. If I cannot recover over the weekend, it might take some days before I could react. Sorry.
Best regards, Michael.


Von meinem Samsung Galaxy Smartphone gesendet.
null
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sat, 11 Nov 2017 10:12:01 GMT) Full text and rfc822 format available.

Message #17 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "michael.albinus" <michael.albinus <at> gmx.de>
Cc: 29149 <at> debbugs.gnu.org, shuguang <at> gmail.com
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Sat, 11 Nov 2017 12:11:34 +0200
> Date: Sat, 11 Nov 2017 10:10:45 +0100
> From: "michael.albinus" <michael.albinus <at> gmx.de>
> Cc: 29149 <at> debbugs.gnu.org
> 
> My laptop crashed last night. If I cannot recover over the weekend, it might take some days before I could
> react. Sorry.

Sorry to hear about that, and hope you will recover soon without
losing any precious stuff.

In any case, there's no urgency to this.  Hope to hear from you when
this problem is behind you.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Tue, 14 Nov 2017 15:45:02 GMT) Full text and rfc822 format available.

Message #20 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 29149 <at> debbugs.gnu.org, Shuguang Sun <shuguang <at> gmail.com>
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Tue, 14 Nov 2017 16:44:41 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> A further information: it is about backup. When I setup
>> tramp-backup-directory-alist which will make it backup
>> serverside. However, It concat !driver_c to the backup file name.
>> 
>> I have setting ("\\.md$" . "~/.emacs.d/backup-tramp/mdfiles") in
>> tramp-backup-directory-alist. The backup file
>> in the server is 
>> "!drive_c!plink!!user <at> host!!!opt!host!path!Ava!_summary.md.~1~"
>> 
>> The "!drive_c" comes very strange.
>
> Michael, any advice on this one?  Do you understand where did
> !drive_c! come from?  AFAIU, it should only be used for backups of
> local files.

Since I cannot test under MS Windows, I need traces. Shuguang, could
you, pls, apply the settings as described in the Tramp manual, at the
bottom of (info "(tramp) Traces and Profiles") . Rerun your tests,
provoking a remote backup file. This produces a buffer *trace-output*,
which should tell us where the mysterious !drive_c! is prepended.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Thu, 16 Nov 2017 02:42:01 GMT) Full text and rfc822 format available.

Message #23 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Thu, 16 Nov 2017 10:20:41 +0800
[Message part 1 (text/plain, inline)]
Hi Michael,

I attached the trace log which has actions: open the file coxph_bench.r,
and edit it, and save it. If you need the full log, please let me know.


Occur: c:/\|drive my help.

Looks like something of "| | | | | | 7 -> (tramp-drop-volume-letter
"c:/opt/home/username/test/coxph_bench.r")" was not applied.



On Tue, Nov 14, 2017 at 11:44 PM, Michael Albinus <michael.albinus <at> gmx.de>
wrote:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> A further information: it is about backup. When I setup
> >> tramp-backup-directory-alist which will make it backup
> >> serverside. However, It concat !driver_c to the backup file name.
> >>
> >> I have setting ("\\.md$" . "~/.emacs.d/backup-tramp/mdfiles") in
> >> tramp-backup-directory-alist. The backup file
> >> in the server is
> >> "!drive_c!plink!!user <at> host!!!opt!host!path!Ava!_summary.md.~1~"
> >>
> >> The "!drive_c" comes very strange.
> >
> > Michael, any advice on this one?  Do you understand where did
> > !drive_c! come from?  AFAIU, it should only be used for backups of
> > local files.
>
> Since I cannot test under MS Windows, I need traces. Shuguang, could
> you, pls, apply the settings as described in the Tramp manual, at the
> bottom of (info "(tramp) Traces and Profiles") . Rerun your tests,
> provoking a remote backup file. This produces a buffer *trace-output*,
> which should tell us where the mysterious !drive_c! is prepended.
>
> Best regards, Michael.
>
[Message part 2 (text/html, inline)]
[tramp_backup_trace_small.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Fri, 17 Nov 2017 14:54:02 GMT) Full text and rfc822 format available.

Message #26 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Fri, 17 Nov 2017 15:53:09 +0100
Shuguang Sun <shuguang <at> gmail.com> writes:

> Hi Michael,

Hi Shuguang,

> I attached the trace log which has actions: open the file
> coxph_bench.r, and edit it, and save it. If you need the full log,
> please let me know.

Thanks!

I'll show the most interesting lines here, which tell us the flow

======================================================================
1 -> (tramp-file-name-handler find-backup-file-name "/plink:username <at> host.com:/opt/home/username/test/coxph_bench.r")

The function `find-backup-file-name' has called the Tramp file name
handler due to the remote nature of the file name.

| 2 -> (tramp-sh-file-name-handler find-backup-file-name "/plink:username <at> host.com:/opt/home/username/test/coxph_bench.r")
| | 3 -> (tramp-handle-find-backup-file-name "/plink:username <at> host.com:/opt/home/username/test/coxph_bench.r")

Some Tramp internal flow in order to find the correct funtion. It is
`tramp-handle-find-backup-file-name'.

| | | 4 -> (tramp-run-real-handler find-backup-file-name ("/plink:username <at> host.com:/opt/home/username/test/coxph_bench.r"))

`tramp-handle-find-backup-file-name' calls again
`find-backup-file-name', but suppressing file name handlers. This is
intended in order to ensure proper encoding of "/", ":" "!" and alike.

| | | | 5 -> (tramp-file-name-handler file-exists-p "/plink:username <at> host.com:/home/bceuser/username/.emacs.d/backup-tramp/Rfiles")
| | | | 5 <- tramp-file-name-handler: t

Some other file name operations are called in `find-backup-file-name',
which work fine. I've removed them from the trace. The last such
operation is `file-exists-p'.

| | | | 5 -> (tramp-file-name-handler expand-file-name "/plink!username <at> host.com!/opt/home/username/test/coxph_bench.r" "/plink:username <at> host.com:/opt/home/username/test/")

`find-backup-file-name' has finished the encoding of the file name (it
is "/plink!username <at> host.com!/opt/home/username/test/coxph_bench.r").
Due to the encoding, it looks like a local file name.

Now, `expand-file-name' is called with the encoded file name. Due to the
leading "/", it is regarded as absolute file name. Tramp is involved due
to the remote default-directory.

| | | | 5 <- tramp-file-name-handler: "c:/plink!username <at> host.com!/opt/home/username/test/coxph_bench.r"

... And this is the problem. Since Tramp sees the local absolute file,
it doesn't do anything, but let the default `expand-file-name' do the
job. This prefixes the file name with "c:/".

The rest is not surprising. The leading "c:" is transformed into
"!drive_c!", and here we are.

| | | | 5 -> (tramp-file-name-handler expand-file-name "!drive_c!plink!!username <at> host.com!!!opt!bee!home_nas!username!test!coxph_bench.r" "/plink:username <at> host.com:~/.emacs.d/backup-tramp/Rfiles")
| | | | 5 <- tramp-file-name-handler: "/plink:username <at> host.com:/home/bceuser/username/.emacs.d/backup-tramp/Rfiles/!drive_c!plink!!username <at> host.com!!!opt!bee!home_nas!username!test!coxph_bench.r"
| | | | 5 -> (tramp-file-name-handler expand-file-name "/plink:username <at> host.com:/home/bceuser/username/.emacs.d/backup-tramp/Rfiles/" nil)
| | | | 5 -> (tramp-file-name-handler file-name-all-completions "!drive_c!plink!!username <at> host.com!!!opt!bee!home_nas!username!test!coxph_bench.r.~" "/plink:username <at> host.com:/home/bceuser/username/.emacs.d/backup-tramp/Rfiles/")
| | | | 5 <- tramp-file-name-handler: ("!drive_c!plink!!username <at> host.com!!!opt!bee!home_nas!username!test!coxph_bench.r.~1~")
| | | 4 <- tramp-run-real-handler: ("/plink:username <at> host.com:/home/bceuser/username/.emacs.d/backup-tramp/Rfiles/!drive_c!plink!!username <at> host.com!!!opt!bee!home_nas!username!test!coxph_bench.r.~2~")
| | 3 <- tramp-handle-find-backup-file-name: ("/plink:username <at> host.com:/home/bceuser/username/.emacs.d/backup-tramp/Rfiles/!drive_c!plink!!username <at> host.com!!!opt!bee!home_nas!username!test!coxph_bench.r.~2~")
| 2 <- tramp-sh-file-name-handler: ("/plink:username <at> host.com:/home/bceuser/username/.emacs.d/backup-tramp/Rfiles/!drive_c!plink!!username <at> host.com!!!opt!bee!home_nas!username!test!coxph_bench.r.~2~")
1 <- tramp-file-name-handler: ("/plink:username <at> host.com:/home/bceuser/username/.emacs.d/backup-tramp/Rfiles/!drive_c!plink!!username <at> host.com!!!opt!bee!home_nas!username!test!coxph_bench.r.~2~")

I have no clue yet how to fix. Pls give me some days to think about.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Mon, 20 Nov 2017 13:32:01 GMT) Full text and rfc822 format available.

Message #29 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Mon, 20 Nov 2017 14:31:01 +0100
Michael Albinus <michael.albinus <at> gmx.de> writes:

Hi Shuguang,

> I have no clue yet how to fix. Pls give me some days to think about.

I have committed a patch to the emacs-26 branch of the Emacs git
repository. Could you, pls, check whether it works for you?

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sat, 25 Nov 2017 15:28:02 GMT) Full text and rfc822 format available.

Message #32 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Sat, 25 Nov 2017 23:26:57 +0800
[Message part 1 (text/plain, inline)]
Thank you. Now it correctly backups file now server side.

(however,  the similar bugs in backup local PC still exists. I'll raise
another bugs report with logs)

On Mon, Nov 20, 2017 at 9:31 PM, Michael Albinus <michael.albinus <at> gmx.de>
wrote:

> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
> Hi Shuguang,
>
> > I have no clue yet how to fix. Pls give me some days to think about.
>
> I have committed a patch to the emacs-26 branch of the Emacs git
> repository. Could you, pls, check whether it works for you?
>
> Best regards, Michael.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sat, 25 Nov 2017 18:10:02 GMT) Full text and rfc822 format available.

Message #35 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: "michael.albinus" <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Sun, 26 Nov 2017 02:09:00 +0800
[Message part 1 (text/plain, inline)]
Hi,

I put some trace log for problem2:For problem 2: I don't know why it
doesn't take tramp-remote-shell as the shell, but to ask user to input the
shell path in the server side.

When I input /bin/sh, the same as the tramp-remote-shell, it raise the
error "

- "env: c:/bin/sh: No such file or directory" in shell buffer
-  "Process shell exited abnormally with code 127" in tramp_shell2.txt (the
trace buffer)
-  in tramp_shell_debug2.txt, (the tramp debug buffer)
00:34:02.040229 tramp-send-command (6) # cd /opt/bee/home/username/test/
&&  exec  env PS1\=/plink\:username\@host\:/opt/bee/home/username/test/\
\#\$\  TERM\=emacs TERMCAP\=emacs\:co\#135\:tc\=unknown\:
INSIDE_EMACS\=27.0.50\,comint c\:/bin/sh -i

The file is too large, therefore, I put them in github:
https://github.com/ShuguangSun/Emacs-bug-29149

Hope it works.








On Sat, Nov 11, 2017 at 5:10 PM, michael.albinus <michael.albinus <at> gmx.de>
wrote:

> Hi Eli,
>
> My laptop crashed last night. If I cannot recover over the weekend, it
> might take some days before I could react. Sorry.
>
> Best regards, Michael.
>
>
>
> Von meinem Samsung Galaxy Smartphone gesendet.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sat, 06 Jan 2018 15:19:01 GMT) Full text and rfc822 format available.

Message #38 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: "michael.albinus" <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Sat, 6 Jan 2018 23:18:11 +0800
[Message part 1 (text/plain, inline)]
Dear all,

I have a patch to shell.el and dired-aux.el which
1. to use the tramp-remote-shell and tramp-remote-shell-args (in shell.el)
2. remove the "start /b" in dired-do-shell-command (in dired-aux.el)

https://github.com/ShuguangSun/emacsimprovement/tree/master/bug%2329149



On Sun, Nov 26, 2017 at 2:09 AM, Shuguang Sun <shuguang <at> gmail.com> wrote:

> Hi,
>
> I put some trace log for problem2:For problem 2: I don't know why it
> doesn't take tramp-remote-shell as the shell, but to ask user to input the
> shell path in the server side.
>
> When I input /bin/sh, the same as the tramp-remote-shell, it raise the
> error "
>
> - "env: c:/bin/sh: No such file or directory" in shell buffer
> -  "Process shell exited abnormally with code 127" in tramp_shell2.txt
> (the trace buffer)
> -  in tramp_shell_debug2.txt, (the tramp debug buffer)
> 00:34:02.040229 tramp-send-command (6) # cd /opt/bee/home/username/test/
> &&  exec  env PS1\=/plink\:username\@host\:/opt/bee/home/username/test/\
> \#\$\  TERM\=emacs TERMCAP\=emacs\:co\#135\:tc\=unknown\:
> INSIDE_EMACS\=27.0.50\,comint c\:/bin/sh -i
>
> The file is too large, therefore, I put them in github:
> https://github.com/ShuguangSun/Emacs-bug-29149
>
> Hope it works.
>
>
>
>
>
>
>
>
> On Sat, Nov 11, 2017 at 5:10 PM, michael.albinus <michael.albinus <at> gmx.de>
> wrote:
>
>> Hi Eli,
>>
>> My laptop crashed last night. If I cannot recover over the weekend, it
>> might take some days before I could react. Sorry.
>>
>> Best regards, Michael.
>>
>>
>>
>> Von meinem Samsung Galaxy Smartphone gesendet.
>>
>
>
[Message part 2 (text/html, inline)]
[dired-aux.el.diff (text/plain, attachment)]
[shell.el.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sat, 06 Jan 2018 18:53:02 GMT) Full text and rfc822 format available.

Message #41 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Sat, 06 Jan 2018 19:51:59 +0100
Shuguang Sun <shuguang <at> gmail.com> writes:

> Dear all,

Hi,

> I have a patch to shell.el and dired-aux.el which 
> 1. to use the tramp-remote-shell and tramp-remote-shell-args (in
> shell.el)
> 2. remove the "start /b" in dired-do-shell-command (in dired-aux.el)

Thanks for this! However, I believe we should not use tramp-remote-shell
and tramp-remote-shell-args in shell.el. The better approach would be to
use connection-local variables. Have you read the section "Running
‘shell’ on a remote host" in the Tramp manual, chapter
(info "(tramp) Remote processes") ?

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sun, 07 Jan 2018 04:54:02 GMT) Full text and rfc822 format available.

Message #44 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Sun, 7 Jan 2018 12:52:58 +0800
[Message part 1 (text/plain, inline)]
Hi Michael,



On Sun, Jan 7, 2018 at 2:51 AM, Michael Albinus <michael.albinus <at> gmx.de>
wrote:

> Shuguang Sun <shuguang <at> gmail.com> writes:
>
> > Dear all,
>
> Hi,
>
> > I have a patch to shell.el and dired-aux.el which
> > 1. to use the tramp-remote-shell and tramp-remote-shell-args (in
> > shell.el)
> > 2. remove the "start /b" in dired-do-shell-command (in dired-aux.el)
>
> Thanks for this! However, I believe we should not use tramp-remote-shell
> and tramp-remote-shell-args in shell.el. The better approach would be to
> use connection-local variables. Have you read the section "Running
> ‘shell’ on a remote host" in the Tramp manual, chapter
> (info "(tramp) Remote processes") ?
>

Here I focus on the connection from Windows local to linux remote

1. For the shell command:
The setting below from 6.5.2 does make the shell command work.
  (connection-local-set-profile-variables
   'remote-bash
   '((explicit-shell-file-name . "/bin/bash")
     (explicit-bash-args . ("-i"))))

It must specify the explicit-shell-file-name. Otherwise, once the code in
function shell trying to set explicit-shell-file-name sill has bugs:
1.1 expand-file-name will add c:/ to the shell-file name because the local
is windows
1.2 the default directory for read-file-name is better to use
(file-remote-p default-directory) "/" than default-directory
"/path/path/..."

Otherwise this part of code is not necessary.

2. 6.5.3 Running ‘shell-command’ on a remote host or other section can't
solve "start /b" issue. It is introduced by dired-do-shell-command (in
dired-aux.el). It checks w32-shell for local environment and then add "start
/b" to the command. However if it is in a tramp dir (e.g. linux server),
the command with "start /b" will be transpose to remote handler. The linux
shell can't understand it.
If Windows to Windows connection will not meet this issue.



>
> Best regards, Michael.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sun, 07 Jan 2018 12:45:01 GMT) Full text and rfc822 format available.

Message #47 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Sun, 07 Jan 2018 13:44:30 +0100
Shuguang Sun <shuguang <at> gmail.com> writes:

> Hi Michael,

Hi Shuguang,

> Here I focus on the connection from Windows local to linux remote
>
> 1. For the shell command:
> The setting below from 6.5.2 does make the shell command work.
>   (connection-local-set-profile-variables
>    'remote-bash
>    '((explicit-shell-file-name . "/bin/bash")
>      (explicit-bash-args . ("-i"))))
>
> It must specify the explicit-shell-file-name. Otherwise, once the code
> in function shell trying to set explicit-shell-file-name sill has
> bugs:
> 1.1 expand-file-name will add c:/ to the shell-file name because the
> local is windows
> 1.2 the default directory for read-file-name is better to use
> (file-remote-p default-directory) "/" than default-directory
> "/path/path/..."
>
> Otherwise this part of code is not necessary.
>
> 2. 6.5.3 Running ‘shell-command’ on a remote host or other section
> can't solve "start /b" issue. It is introduced by
> dired-do-shell-command (in dired-aux.el). It checks w32-shell for
> local environment and then add "start /b" to the command. However if
> it is in a tramp dir (e.g. linux server), the command with "start /b"
> will be transpose to remote handler. The linux shell can't understand
> it.

Next days, I will hijack a Windows machine, and try to reproduce the
problem, and check your proposed patch.

> If Windows to Windows connection will not meet this issue.

???

In this case, Tramp is not involved.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sat, 13 Jan 2018 17:38:02 GMT) Full text and rfc822 format available.

Message #50 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Sat, 13 Jan 2018 18:37:25 +0100
Shuguang Sun <shuguang <at> gmail.com> writes:

> Hi Michael,

Hi Shuguang,

> Here I focus on the connection from Windows local to linux remote

Finally, I was able to test on a Windows machine.

> 1.1 expand-file-name will add c:/ to the shell-file name because the
> local is windows

Yes. However, your patch (commenting expand-file-name) does not look
proper. I've committed another patch, changing the order
expand-file-name and file-local-name are called. This fixes this.

> 1.2 the default directory for read-file-name is better to use
> (file-remote-p default-directory) "/" than default-directory
> "/path/path/..."

I don't see why. Could you pls explain?

> 2. 6.5.3 Running ‘shell-command’ on a remote host or other section
> can't solve "start /b" issue. It is introduced by
> dired-do-shell-command (in dired-aux.el). It checks w32-shell for
> local environment and then add "start /b" to the command. However if
> it is in a tramp dir (e.g. linux server), the command with "start /b"
> will be transpose to remote handler. The linux shell can't understand
> it.

Yes. Your patch is OK, so I've applied it.

Everything committed to the master branch. Could you, pls, check?

Since both patches are simple, they could also be backported to the
emacs-26 branch. Eli, could you pls advice me whether I shall do?

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sat, 13 Jan 2018 19:23:01 GMT) Full text and rfc822 format available.

Message #53 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 29149 <at> debbugs.gnu.org, shuguang <at> gmail.com
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Sat, 13 Jan 2018 21:21:35 +0200
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  29149 <at> debbugs.gnu.org
> Date: Sat, 13 Jan 2018 18:37:25 +0100
> 
> Since both patches are simple, they could also be backported to the
> emacs-26 branch. Eli, could you pls advice me whether I shall do?

It's okay to back-port these to the release branch.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Sun, 14 Jan 2018 09:06:02 GMT) Full text and rfc822 format available.

Message #56 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 29149 <at> debbugs.gnu.org, shuguang <at> gmail.com
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Sun, 14 Jan 2018 10:05:16 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Since both patches are simple, they could also be backported to the
>> emacs-26 branch. Eli, could you pls advice me whether I shall do?
>
> It's okay to back-port these to the release branch.

I've cherry-picked them from master.

> Thanks.

Best regards, Michael.




Merged 29149 29442. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Sun, 14 Jan 2018 09:09:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Thu, 25 Jan 2018 12:03:01 GMT) Full text and rfc822 format available.

Message #61 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Thu, 25 Jan 2018 20:01:59 +0800
[Message part 1 (text/plain, inline)]
Thanks Micahel,

Now it works!



On Sun, Jan 14, 2018 at 1:37 AM, Michael Albinus <michael.albinus <at> gmx.de>
wrote:

> Shuguang Sun <shuguang <at> gmail.com> writes:
>
> > Hi Michael,
>
> Hi Shuguang,
>
> > Here I focus on the connection from Windows local to linux remote
>
> Finally, I was able to test on a Windows machine.
>
> > 1.1 expand-file-name will add c:/ to the shell-file name because the
> > local is windows
>
> Yes. However, your patch (commenting expand-file-name) does not look
> proper. I've committed another patch, changing the order
> expand-file-name and file-local-name are called. This fixes this.
>
> > 1.2 the default directory for read-file-name is better to use
> > (file-remote-p default-directory) "/" than default-directory
> > "/path/path/..."
>
> I don't see why. Could you pls explain?
>
If we well set the shell via connection-local-set-profile-variables which
measn there is explicit-shell-file-name, it will not prompt the directory.

For example as in the manual:
  (connection-local-set-profile-variables
   'remote-bash
   '((explicit-shell-file-name . "/bin/bash")
     (explicit-bash-args . ("-i"))
     ))



> > 2. 6.5.3 Running ‘shell-command’ on a remote host or other section
> > can't solve "start /b" issue. It is introduced by
> > dired-do-shell-command (in dired-aux.el). It checks w32-shell for
> > local environment and then add "start /b" to the command. However if
> > it is in a tramp dir (e.g. linux server), the command with "start /b"
> > will be transpose to remote handler. The linux shell can't understand
> > it.
>
> Yes. Your patch is OK, so I've applied it.
>
> Everything committed to the master branch. Could you, pls, check?
>
> Since both patches are simple, they could also be backported to the
> emacs-26 branch. Eli, could you pls advice me whether I shall do?
>
> Best regards, Michael.
>
[Message part 2 (text/html, inline)]

Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Thu, 25 Jan 2018 12:31:02 GMT) Full text and rfc822 format available.

Notification sent to Shuguang Sun <shuguang <at> gmail.com>:
bug acknowledged by developer. (Thu, 25 Jan 2018 12:31:02 GMT) Full text and rfc822 format available.

Message #66 received at 29149-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149-done <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Thu, 25 Jan 2018 13:30:34 +0100
Shuguang Sun <shuguang <at> gmail.com> writes:

> Thanks Micahel,

Hi Shuguang,

> Now it works!

Thanks for testing. So I mark this bug as closed.

>     > 1.2 the default directory for read-file-name is better to use
>     > (file-remote-p default-directory) "/" than default-directory
>     > "/path/path/..."
>
>     I don't see why. Could you pls explain?
>
> If we well set the shell via connection-local-set-profile-variables
> which measn there is explicit-shell-file-name, it will not prompt the
> directory. 
>
> For example as in the manual:
>   (connection-local-set-profile-variables
>    'remote-bash
>    '((explicit-shell-file-name . "/bin/bash")
>      (explicit-bash-args . ("-i"))
>      ))

Hmm. I still don't understand why you want to change
default-directory. Or do you want to say it doesn't matter, when
explicit-shell-file-name is set?

And even in case there is no explicit-shell-file-name set,
read-file-name shall work as expected with the existing default-directory.

Best regards, Michael.




Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Thu, 25 Jan 2018 12:31:02 GMT) Full text and rfc822 format available.

Notification sent to Shuguang Sun <shuguang <at> gmail.com>:
bug acknowledged by developer. (Thu, 25 Jan 2018 12:31:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Thu, 25 Jan 2018 14:26:01 GMT) Full text and rfc822 format available.

Message #74 received at 29149-done <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149-done <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Thu, 25 Jan 2018 22:25:49 +0800
[Message part 1 (text/plain, inline)]
On Thu, Jan 25, 2018 at 8:30 PM, Michael Albinus <michael.albinus <at> gmx.de>
wrote:

> Shuguang Sun <shuguang <at> gmail.com> writes:
>
> > Thanks Micahel,
>
> Hi Shuguang,
>
> > Now it works!
>
> Thanks for testing. So I mark this bug as closed.
>
> >     > 1.2 the default directory for read-file-name is better to use
> >     > (file-remote-p default-directory) "/" than default-directory
> >     > "/path/path/..."
> >
> >     I don't see why. Could you pls explain?
> >
> > If we well set the shell via connection-local-set-profile-variables
> > which measn there is explicit-shell-file-name, it will not prompt the
> > directory.
> >
> > For example as in the manual:
> >   (connection-local-set-profile-variables
> >    'remote-bash
> >    '((explicit-shell-file-name . "/bin/bash")
> >      (explicit-bash-args . ("-i"))
> >      ))
>
> Hmm. I still don't understand why you want to change
> default-directory. Or do you want to say it doesn't matter, when
> explicit-shell-file-name is set?
>
From the logic, when explicit-shell-file-name is set, the read-file-name
will not be triggered. So it doesn't matter.

>
> And even in case there is no explicit-shell-file-name set,
> read-file-name shall work as expected with the existing default-directory.
>
If there is no explicit-shell-file-name set when local windows and remote
nix-llike, the read-file-name will
1. put the shell-file-name "c:/..../cmdproxy.exe" after the default
directory in the minibuffer prompt. User has to delete those things.
2. Usually the shell file is more close to root "/" than the the default
directory (which is the HOME or even deeper). User has to delete characters
to the root and then find the shell file.
 User experience may need improvement.


> Best regards, Michael.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Thu, 25 Jan 2018 14:51:02 GMT) Full text and rfc822 format available.

Message #77 received at 29149-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149-done <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Thu, 25 Jan 2018 15:50:04 +0100
Shuguang Sun <shuguang <at> gmail.com> writes:

Hi Shuguang,

>     And even in case there is no explicit-shell-file-name set,
>     read-file-name shall work as expected with the existing
>     default-directory.
>
> If there is no explicit-shell-file-name set when local windows and
> remote nix-llike, the read-file-name will 
> 1. put the shell-file-name "c:/..../cmdproxy.exeS" after the default
> directory in the minibuffer prompt. User has to delete those things. 
> 2. Usually the shell file is more close to root "/" than the the
> default directory (which is the HOME or even deeper). User has to
> delete characters to the root and then find the shell file.
>  User experience may need improvement.

You get the default in the minibuffer like
"/plink:remotehost:<default-directory><shell-file-name>". The prompt is
between <default-directory> and local <shell-file-name>. You do NOT need
to delete anything from <default-directory>, delete the local
<shell-file-name> by C-k, which must be done anyway. Then, simply type
"/path/to/my/shell" (for example, "/bin/bash"). Note the resulting
double-slash between <default-directory> and what you have typed! This
works due to the electricity of file name completion in the
minibuffer. This is roughly the same as typing the shell file name from
the remote host's root directory.

See also (info "(tramp) File name completion")

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Fri, 26 Jan 2018 02:04:02 GMT) Full text and rfc822 format available.

Message #80 received at 29149-done <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149-done <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Fri, 26 Jan 2018 10:03:02 +0800
[Message part 1 (text/plain, inline)]
Hi Michael,

Thank you for your patient explanition. Now it is very clear to me.

On Thu, Jan 25, 2018 at 10:50 PM, Michael Albinus <michael.albinus <at> gmx.de>
wrote:

> Shuguang Sun <shuguang <at> gmail.com> writes:
>
> Hi Shuguang,
>
> >     And even in case there is no explicit-shell-file-name set,
> >     read-file-name shall work as expected with the existing
> >     default-directory.
> >
> > If there is no explicit-shell-file-name set when local windows and
> > remote nix-llike, the read-file-name will
> > 1. put the shell-file-name "c:/..../cmdproxy.exeS" after the default
> > directory in the minibuffer prompt. User has to delete those things.
> > 2. Usually the shell file is more close to root "/" than the the
> > default directory (which is the HOME or even deeper). User has to
> > delete characters to the root and then find the shell file.
> >  User experience may need improvement.
>
> You get the default in the minibuffer like
> "/plink:remotehost:<default-directory><shell-file-name>". The prompt is
> between <default-directory> and local <shell-file-name>. You do NOT need
> to delete anything from <default-directory>, delete the local
> <shell-file-name> by C-k, which must be done anyway. Then, simply type
> "/path/to/my/shell" (for example, "/bin/bash"). Note the resulting
> double-slash between <default-directory> and what you have typed! This
> works due to the electricity of file name completion in the
> minibuffer. This is roughly the same as typing the shell file name from
> the remote host's root directory.
>
> See also (info "(tramp) File name completion")
>
> Best regards, Michael.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Fri, 26 Jan 2018 14:38:02 GMT) Full text and rfc822 format available.

Message #83 received at 29149-done <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: michael.albinus <at> gmx.de, 29149-done <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Fri, 26 Jan 2018 09:37:47 -0500
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Is there a place in our documentation for Michael's patient
explanation?  I'm sure you're not the only user that will benefit from it.

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Skype: No way! See https://stallman.org/skype.html.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29149; Package emacs. (Fri, 26 Jan 2018 15:44:02 GMT) Full text and rfc822 format available.

Message #86 received at 29149-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Richard Stallman <rms <at> gnu.org>
Cc: 29149-done <at> debbugs.gnu.org, Shuguang Sun <shuguang <at> gmail.com>
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Fri, 26 Jan 2018 16:43:23 +0100
Richard Stallman <rms <at> gnu.org> writes:

Hi Richard,

> Is there a place in our documentation for Michael's patient
> explanation?  I'm sure you're not the only user that will benefit from it.

The Tramp manual explains it already, but people tend to ignore that
manual. A good place to explain this special behaviour for remote file
names would be at (info "(emacs) Minibuffer File") .

In the section about interactive shells, this explanation could be
mirrored, or a link to the previous explanation could be added, see
(info "(emacs) Interactive Shell") .

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 24 Feb 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.