GNU bug report logs - #29442
dired-do-shell-command puts "start /b" in tramp dired

Previous Next

Package: emacs;

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.

Full log


View this message in rfc822 format

From: Shuguang Sun <shuguang <at> gmail.com>
To: shuguang <at> gmail.com
Cc: 29442 <at> debbugs.gnu.org
Subject: bug#29442: dired-do-shell-command puts "start /b" in tramp dired
Date: Sun, 26 Nov 2017 14:03:58 +0800
[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)]

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

Previous Next


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