all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Maybe we can improve this function call-process-to-string?
Date: Thu, 08 Apr 2021 19:18:09 +0200	[thread overview]
Message-ID: <AM9PR09MB4977F5191AC267DC38A3C43896749@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <YG8nrnLoDW8fneI7@protected.localdomain> (Jean Louis's message of "Thu, 8 Apr 2021 18:56:30 +0300")

Jean Louis <bugs@gnu.support> writes:

> * Eli Zaretskii <eliz@gnu.org> [2021-04-08 16:40]:
>> > Date: Thu, 8 Apr 2021 14:53:18 +0300
>> > From: Jean Louis <bugs@gnu.support>
>> > Cc: help-gnu-emacs@gnu.org

> I would not know how to get output from system command by using those
> functions without using shell-command-to-string or call-process

M-! your-shell-command 

That will give you a buffer named `*Shell Command Output*`. You can
either switch interactively to that buffer and execute your lisp program
via M-x or M-: (depending if it's just a function or interactive
command).

Alternatively you can call it from lisp like:

(shell-command "your comand --with-some-args") and have same buffer.

Might be good to provide optional arguments for target buffer and error
buffer so you get eventual errors separated in other buffer then one you
will process.

I would also not use a string for the final result(s), just do everyting
in that buffer, remove text you don't need and construct your link(s) in
that buffer, it will probably be faster than creating temp buffer and
taking buffer strings.

> 	(push (shell-command-to-string command) list)))
>     (kill-new (with-temp-buffer
> 		(dolist (item list)
> 		  (insert item))
> 		(buffer-string)))))

It is really inneficient to push result form the command to a list to
traverse it later and insert into buffer, when Emacs does that already
for you by default.

> [![https://gnu.support/images/1536/gnu-head-large.jpg](https://gnu.support/images/1536/gnu-head-large.jpg =1536x1024 "https://gnu.support/images/1536/gnu-head-large.jpg")](https://gnu.support/images/1536/gnu-head-large.jpg "https://gnu.support/images/1536/gnu-head-large.jpg")

Your website looks very deceptive to me. I don't remember the name of
that guy that used to post on this list for a while that was rude to
you, but looking at your site now I understand what he ment. I have no
idea who you are or what you do, but something tells me that is not an
official GNU support site, isn't it? Maybe you have all best intentions,
but it looks shady, more akin to a scam page. Hopefully that form on the
front page looks so ugly so nobody will fall for it, but if I would you
and value GNU movement as much as you do, I would probably change that
domain name and removed that from the web, as well as changed that email
from "bugs@gnu.support" to something less deceptive, because it also
looks shady to me. I am by no mean associated with GNU, more than being
a mere user of GNU software, so I can only express my personal feeling
when I saw it.

I understand you mean well but that is how it looks like. I
understand you mean well :).

Best regards
/a



  parent reply	other threads:[~2021-04-08 17:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08  7:40 Maybe we can improve this function call-process-to-string? Jean Louis
2021-04-08  7:55 ` Eli Zaretskii
2021-04-08 11:53   ` Jean Louis
2021-04-08 13:39     ` Eli Zaretskii
2021-04-08 15:56       ` Jean Louis
2021-04-08 16:25         ` Eli Zaretskii
2021-04-08 18:17           ` Jean Louis
2021-04-08 18:36             ` Eli Zaretskii
2021-04-08 18:44               ` Jean Louis
2021-04-08 17:18         ` Arthur Miller [this message]
2021-04-08 18:32           ` Jean Louis
2021-04-08 19:41             ` Arthur Miller
2021-04-09  8:52               ` Jean Louis
2021-04-09 10:07                 ` tomas
2021-04-08 13:08 ` Michael Albinus
2021-04-08 15:50   ` Jean Louis
2021-04-08 17:49 ` Stefan Monnier
2021-04-08 18:33   ` Jean Louis
2021-04-08 18:40   ` Jean Louis

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=AM9PR09MB4977F5191AC267DC38A3C43896749@AM9PR09MB4977.eurprd09.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@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.