all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Shuguang Sun <shuguang@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: emacs-devel@gnu.org
Subject: Re: Patch of shell-command-to-string in simple for tramp support
Date: Thu, 25 Jan 2018 22:11:41 +0800	[thread overview]
Message-ID: <CACspjXc1-To3eF2rr8dJp13DHve-HstBD9uj-ajssFk-Lkh00g@mail.gmail.com> (raw)
In-Reply-To: <87efme5bne.fsf@gmx.de>

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

It works as I expected.
Thanks.

On Thu, Jan 25, 2018 at 9:08 PM, Michael Albinus <michael.albinus@gmx.de>
wrote:

> Shuguang Sun <shuguang@gmail.com> writes:
>
> > Hi,
>
> Hi Shuguang,
>
> > The shell-command-to-string calls shell-file-name directly and it
> > doesn't work in the case of local Windows and remoter Unix. I borrow
> > the some code from shell.el and make a patch to simple.el.
>
> I believe it is wrong to make `shell-command-to-string' Tramp-aware. We
> have `shell-command', which runs a (Tramp) file name handler if
> needed. The proper change should be:
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/lisp/simple.el b/lisp/simple.el
> index e51bc132a6..44f738f07e 100644
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -3844,7 +3844,7 @@ shell-command-to-string
>    (with-output-to-string
>      (with-current-buffer
>        standard-output
> -      (process-file shell-file-name nil t nil shell-command-switch
> command))))
> +      (shell-command command t))))
>
>  (defun process-file (program &optional infile buffer display &rest args)
>    "Process files synchronously in a separate process.
> --8<---------------cut here---------------end--------------->8---
>
> Could you, pls, test it in your environment?
>
> > Best Regards,
> > Shuguang
>
> Best regards, Michael.
>

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

  reply	other threads:[~2018-01-25 14:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25 12:11 Patch of shell-command-to-string in simple for tramp support Shuguang Sun
2018-01-25 13:08 ` Michael Albinus
2018-01-25 14:11   ` Shuguang Sun [this message]
2018-01-25 14:31     ` Michael Albinus
2018-01-25 14:12   ` Stefan Monnier

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=CACspjXc1-To3eF2rr8dJp13DHve-HstBD9uj-ajssFk-Lkh00g@mail.gmail.com \
    --to=shuguang@gmail.com \
    --cc=emacs-devel@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 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.