all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Shuguang Sun <shuguang@gmail.com>
To: shuguang@gmail.com
Cc: 29442@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	[thread overview]
Message-ID: <CACspjXddJ4Waijj1+VXiV1KbuS--=vjYd9C3iCU=zBAQg7woDw@mail.gmail.com> (raw)
In-Reply-To: <CACspjXfjbQKNqrfz6CfVwv-BFcCbAoy-2f=VvJpfCd84t0Mb5A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

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))))))

[-- Attachment #2: Type: text/html, Size: 1173 bytes --]

      reply	other threads:[~2017-11-26  6:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-25 18:09 bug#29442: dired-do-shell-command puts "start /b" in tramp dired Shuguang Sun
2017-11-26  6:03 ` Shuguang Sun [this message]

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

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

  git send-email \
    --in-reply-to='CACspjXddJ4Waijj1+VXiV1KbuS--=vjYd9C3iCU=zBAQg7woDw@mail.gmail.com' \
    --to=shuguang@gmail.com \
    --cc=29442@debbugs.gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.