From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id sNvsHWBUEWed6QAAe85BDQ:P1 (envelope-from ) for ; Thu, 17 Oct 2024 18:16:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id sNvsHWBUEWed6QAAe85BDQ (envelope-from ) for ; Thu, 17 Oct 2024 20:16:00 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=dhyms95m; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729188960; a=rsa-sha256; cv=none; b=XzbI9jD30J39K6lS/dr0wtEivZ8j7BAZ8ID4U/HoKLh1Rkn+3an5f9vlGny88glO+ymMx7 RMBN/8Ljm5ARHhVL6drQCY3PEfBVlZ6TAi+0/Ystf3noIvOK5byiv4CMk/5shOvSkB8axI EtyYHrCEA8Seu4Nrv5MhJNfWvvVXNTwnZNNhig9Omb1XAHQppVbL4mINmcdYsEl8utGjvu PN7nN15R8PvRHymo3cXtKzXHmzO0qJGsJLuaqlQ2wWq/Akjn/5kJr2bBlCRsPSaT18GT5v fQR0PGgYWMXFrAQ4G2oAMqS8ZplaM7kH/O1Ls/Tkao2kkMxREPnilj5n2AfEOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=dhyms95m; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729188960; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=E6mvqkZ9hiD9qS48Kjj3RTDlpIUl2k+XHX595PZ9SoU=; b=SfCJtVv82OgSl7J0GPsF9FhinfZICkmkJAJSGfHBg0N3ANd+46TulxzaNJO9lmGkyO96AB a95463hTwAcA7pNzx4Ujxuu42dWudqwtELozFep+VwJkd45fdeYNcqPW8WvPk/ckGSbz64 1L3KEXgqZp8Mk+aDniqTPYRLPUo9vAoh7wPcvRi2FLY+n9x7mMtQbsIJtxKl69GO27oa5+ Om9ju7fYaOZUyPnmrvUl1VHGBcTXrnE4ZfTBbPFIdn2icHYK/Iu5HF3Gpn82cwRTuQptsV 7exRmbnqqc6H5cKhS7kqxkGaHz7bYxaGP5Tg9AT6tb36hqIHutOjxtQ8+tFXOg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 01C2D313CF for ; Thu, 17 Oct 2024 20:16:00 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1V1e-0000nh-PH; Thu, 17 Oct 2024 14:15:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1V1c-0000nN-Oi for emacs-orgmode@gnu.org; Thu, 17 Oct 2024 14:15:04 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1V1a-0006rp-U4 for emacs-orgmode@gnu.org; Thu, 17 Oct 2024 14:15:04 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4315baa51d8so9303265e9.0 for ; Thu, 17 Oct 2024 11:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729188901; x=1729793701; darn=gnu.org; h=mime-version:date:references:in-reply-to:subject:to:from:message-id :from:to:cc:subject:date:message-id:reply-to; bh=E6mvqkZ9hiD9qS48Kjj3RTDlpIUl2k+XHX595PZ9SoU=; b=dhyms95mq1SpErBaRhZKP5KEfXm/yTulFlknbMkcKm3nrIczY2dGaDirgCK3QhPi85 enQ0rxEsqB4LER3Uq8zkW9gTkQaJNwd/mHNhnjUksUNXYVocWniJcs6svjfyib0sPIEp MeYg3aC8gE1Zrens1Aa6xmOJSPkwAaE1oukkPac2VWYItRI4t5X4JNdDNP/M8wU6UaB6 zor2H88C31N2j50hNLPY/ojXJat77sO/z7hj6UD5SiTHw9GFC9kbyAZDyQBqAyHEm7Ul HDhW4jraPJ8BlFbJI1DE46dbajAMpBPtVrWeNOPCDKatPNYneHdi5NYHIf0WJqjPZD+F ai9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729188901; x=1729793701; h=mime-version:date:references:in-reply-to:subject:to:from:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=E6mvqkZ9hiD9qS48Kjj3RTDlpIUl2k+XHX595PZ9SoU=; b=rpH12ns3dAkEXWnuWE3I6vaHI4KZNXLg1UFeAai5519PQB9UJlbSuUJCErZxHXq2i/ 9mBdi4PVPf75ohcNRQABwZKBvuGNZKUWuyF2foNHYINM2FUmpvIc6nfsE8TS2v7D/Mag /zSzZokWlduFLUrFo98rLZAC9MJm95nr/+m8rtOUNQ7hshlBmdQNuP39iie0QfYcSemp Z8dJl6liyTQfvn20YmxAH2LKt2b+f2lcobp/12F+H7+enKm2WdwE2tYqkl1+6d9j8pPl nsD1rlhNxGwRtMFrtzZ76UEyUVe4jTHRMfC4c9OrtMG3BqawL+4jrTDc0pjA/RReODSt uNkA== X-Forwarded-Encrypted: i=1; AJvYcCVLXtPMvfDw/MMDfv6an4sTte+aj2BHCsKUkKYepe4nXxDTD8Od1qJO/L8/G9Yq2+4eCwHIdlZUDyLEPh8H@gnu.org X-Gm-Message-State: AOJu0YxRrLzFqHYbqKOM0wVM6j9cOdt+KPU92rgUY7CLHL2hsgB2CmLK vHdyMYgVrj27PSdrDSesygJ1zH9qZ7xRjFTJGMCZE3HWez6DDLuHlEfJpw== X-Google-Smtp-Source: AGHT+IGw2nbD+U+p/EGJyL2KneTY95kQqPH0FpQGrhJnSZUYcCw0t36rlxdYoPcQz+SikiCV98sW9A== X-Received: by 2002:a5d:440d:0:b0:35f:d70:6193 with SMTP id ffacd0b85a97d-37d5529d97cmr15003840f8f.41.1729188900831; Thu, 17 Oct 2024 11:15:00 -0700 (PDT) Received: from localhost ([2a01:e0a:505:3460:1c18:688d:ece4:372e]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa87775sm7983263f8f.27.2024.10.17.11.14.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2024 11:15:00 -0700 (PDT) Message-ID: <67115424.df0a0220.20f4.03e0@mx.google.com> Received: by localhost (sSMTP sendmail emulation); Thu, 17 Oct 2024 20:14:58 +0200 From: Bruno Barbier To: Rodrigo Morales , emacs-orgmode@gnu.org Subject: Re: Why Emacs shows ^M at the end of some lines in sh code blocks that use curl? In-Reply-To: <87r08eepm4.fsf@morales.pe> References: <87r08eepm4.fsf@morales.pe> Date: Thu, 17 Oct 2024 20:14:58 +0200 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=brubar.cs@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.65 X-Spam-Score: -4.65 X-Migadu-Queue-Id: 01C2D313CF X-Migadu-Scanner: mx10.migadu.com X-TUID: ycU9w6sGNRwD Hi Rodrigo, Rodrigo Morales 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