Hi Rodrigo,

Rodrigo Morales <rodrigo-mailing-li...@morales.pe> writes:

> I saved the contents of the code block below to the file =/tmp/a.org=.
>
>
> I wish those ^M were not shown in the sh code blocks in the Org Mode
> buffer. Does anyone know how to accomplish this behavior?
>

Your result is mixing different "end-of-line" conventions.  If you
redirect the result into a file and open it with Emacs, you will get the
same result: it's not related to Org (HTTP headers use '\r\n', your JSON
'\n').

You could include a translation step. For example, using 'tr':
   #+begin_src shell :results raw
     curl --include --silent 
https://filesampleshub.com/download/code/json/sample1.json | tr -d '\r'
   #+end_src
   
If you are fetching arbitrary data, you do not want to do that though.
You may ask curl to dump the headers in a file, and translate only
that file (using --dump-header).

Note that getting any JSON file out there should give the same result;
i.e. no need to install Flask :)


HTH,

Bruno


Reply via email to