GNU bug report logs -
#29442
dired-do-shell-command puts "start /b" in tramp dired
Previous Next
Reported by: Shuguang Sun <shuguang <at> gmail.com>
Date: Sat, 25 Nov 2017 18:11:02 UTC
Severity: normal
Merged with 29149
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 29442 in the body.
You can then email your comments to 29442 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29442
; Package
emacs
.
(Sat, 25 Nov 2017 18:11:02 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
.
(Sat, 25 Nov 2017 18:11:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
local: Windows7, and shell comman is cmdproxy.exe/cmd
GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2017-11-24
In general dired buffer, if I call dired-do-shell-command on marked file
with end "&", it will call "start /b ..." to run asyn shell command.
However, it hould not happend for tramp dired buffer if the
tramp-remote-shell is not cmd.
For example, my server is linux and tramp-remote-shell is "/bin/sh". If I
run dired-do-shell-command with end "&", it suppose to send the command
directly, but it add "start /b" actually.
I attached the tramp debug for your reference.
Tramp setting:
(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)]
[tramp_dired_do_shell_command_debug.txt (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29442
; Package
emacs
.
(Sun, 26 Nov 2017 06:05:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 29442 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The shell-command works if I use the function as below.
(defun my-dired-open-execute ()
(interactive)
(let* ((file-name (dired-get-file-for-visit))
(file-ext (file-name-extension file-name))
(case-fold-search t))
(if (file-exists-p file-name)
(cond
((and (string-match "^r$" file-ext) (file-remote-p file-name))
(let ((default-directory (or (and (eq major-mode 'dired-mode)
(dired-current-directory))
default-directory)))
(shell-command
(format "nohup /bin/apps64/software/R/R CMD BATCH --no-restore
--no-save --slave \"%s\" &"
(file-name-nondirectory file-name)))
))
(t (w32-shell-execute "open" file-name nil 1))))))
[Message part 2 (text/html, inline)]
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.
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 6 years and 56 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.