help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert the shell command used in emacs init-file into its normal ve


From: Eli Zaretskii
Subject: Re: Convert the shell command used in emacs init-file into its normal version.
Date: Thu, 10 Jun 2021 09:59:53 +0300

> From: Hongyi Zhao <hongyi.zhao@gmail.com>
> Date: Thu, 10 Jun 2021 10:26:36 +0800
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> > > > 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\\\"]}}}\""

My proposal is to use split-string-and-unquote, then concatenate the
members of the resulting list, separated by spaces, with mapconcat or
somesuch.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]