unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Convert the shell command used in emacs init-file into its normal version.
Date: Thu, 10 Jun 2021 10:26:36 +0800	[thread overview]
Message-ID: <CAGP6POJi8RQfd-8AD4A5tZBi+KPkrn3=99VnzQEMEunH8pXZPw@mail.gmail.com> (raw)
In-Reply-To: <83tum7c5zu.fsf@gnu.org>

On Thu, Jun 10, 2021 at 1:18 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Hongyi Zhao <hongyi.zhao@gmail.com>
> > Date: Wed, 9 Jun 2021 22:21:58 +0800
> > Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> >
> > > > "curl -s https://api.mathpix.com/v3/latex -X POST -H \"app_id: %s\" -H
> > > > \"app_key: %s\" -H \"Content-Type: application/json\" --data
> > > > \"{\\\"src\\\":\\\"%s\\\",\\\"formats\\\":
> > > > [\\\"latex_styled\\\"],\\\"format_options\\\":{\\\"latex_styled\\\":
> > > > {\\\"transforms\\\": [\\\"rm_spaces\\\"]}}}\""
> > > >
> > > > I want to obtain its normal version and test it under the system's
> > > > shell terminal. Any hints for deleting the escape characters correctly
> > > > from the above command in Emacs way?
> > >
> > > Did you try using split-string-and-unquote?
> >
> > To be frank, no. It's an eshell command, and I'm unfamiliar with it.
> > Any hints for using it in this case?
>
> Sorry, I don't understand: you want hints for using what?
>
> And how does eshell come into play here, I don't think you mentioned
> that before.
>

Sorry for my misunderstanding of your meaning. I just want to know the
exact Emacs command sequence for stripping out the black slashes and
quotes of the following string with the function
split-string-and-unquote.

 "curl -s https://api.mathpix.com/v3/latex -X POST -H \"app_id: %s\" -H
 \"app_key: %s\" -H \"Content-Type: application/json\" --data
\"{\\\"src\\\":\\\"%s\\\",\\\"formats\\\":
 [\\\"latex_styled\\\"],\\\"format_options\\\":{\\\"latex_styled\\\":
 {\\\"transforms\\\": [\\\"rm_spaces\\\"]}}}\""

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China



  reply	other threads:[~2021-06-10  2:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09  6:49 Convert the shell command used in emacs init-file into its normal version Hongyi Zhao
2021-06-09  6:58 ` Jean Louis
2021-06-09  8:03   ` Hongyi Zhao
2021-06-09  8:13     ` tomas
2021-06-09  8:22       ` Hongyi Zhao
2021-06-09  8:50         ` tomas
2021-06-09  8:26     ` Jean Louis
2021-06-09  7:23 ` Yuri Khan
2021-06-09  7:57   ` Hongyi Zhao
2021-06-09 11:37 ` Eli Zaretskii
2021-06-09 14:21   ` Hongyi Zhao
2021-06-09 17:17     ` Eli Zaretskii
2021-06-10  2:26       ` Hongyi Zhao [this message]
2021-06-10  6:59         ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CAGP6POJi8RQfd-8AD4A5tZBi+KPkrn3=99VnzQEMEunH8pXZPw@mail.gmail.com' \
    --to=hongyi.zhao@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).