all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Random832 <random832@fastmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Add file-dwim.
Date: Mon, 19 Oct 2015 09:08:04 +0300	[thread overview]
Message-ID: <834mhnie63.fsf@gnu.org> (raw)
In-Reply-To: <87k2qj9z3f.fsf@fastmail.com>

> From: Random832 <random832@fastmail.com>
> Date: Mon, 19 Oct 2015 02:00:52 -0400
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> >> Can call-process return the stdout of the process in a string, as
> >> shell-command-to-string does?
> >
> > Yes, of course.  See its documentation: the output could go into a
> > buffer, a string, a file, or the null device.
> 
> I looked at the documentation. As far as I can tell, you can specify
> where the output goes with the following types of argument:
> 
> - A buffer
> - A string *which names a buffer*
> - t, which selects the current buffer.
> - A list which names a file
> - nil, which discards the output
> - 0, which discards the output and backgrounds the process
> - A list that does any of the above with stdout and something else with stderr
> 
> Nowhere is a way to get the output *as a string* mentioned. There may or
> may not be a perfectly safe and efficient way to use a temporary buffer
> or file to get a string, but those aren't being accomplished by the
> call-process function itself.

You are right, sorry.  However, buffer-string from that temporary
buffer will do the job.



  reply	other threads:[~2015-10-19  6:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-18 14:54 [PATCH] Add file-dwim Taylan Ulrich Bayırlı/Kammer
2015-10-18 19:12 ` Artur Malabarba
2015-10-18 19:46   ` Taylan Ulrich Bayırlı/Kammer
2015-10-18 22:22     ` Artur Malabarba
2015-10-18 22:39       ` Random832
2015-10-19  4:44         ` Eli Zaretskii
2015-10-19  6:00           ` Random832
2015-10-19  6:08             ` Eli Zaretskii [this message]
2015-10-19  7:49         ` Artur Malabarba
2015-10-19  8:39       ` Taylan Ulrich Bayırlı/Kammer
2015-10-19  9:30         ` Artur Malabarba
2015-10-19 13:32 ` Wolfgang Jenkner

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=834mhnie63.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=random832@fastmail.com \
    /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.