From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OKrAB0woJ19kZwAA0tVLHw (envelope-from ) for ; Sun, 02 Aug 2020 20:55:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6DygA0woJ19ESAAA1q6Kng (envelope-from ) for ; Sun, 02 Aug 2020 20:55:40 +0000 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 A77489403CB for ; Sun, 2 Aug 2020 20:55:39 +0000 (UTC) Received: from localhost ([::1]:35192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2L18-0008Ay-L0 for larch@yhetil.org; Sun, 02 Aug 2020 16:55:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2L0a-0007q1-NS for emacs-orgmode@gnu.org; Sun, 02 Aug 2020 16:55:04 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:34236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2L0Z-0003WU-2e for emacs-orgmode@gnu.org; Sun, 02 Aug 2020 16:55:04 -0400 Received: by mail-lj1-x235.google.com with SMTP id q7so37554129ljm.1 for ; Sun, 02 Aug 2020 13:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:message-id :date:mime-version; bh=TGX2fYOcNyxgYHf1oCF+nBCVlCgqonUtviyxctPu4u0=; b=R4u/GjkwGPgzy1//FUNEcQcgHGtre+gYS134RHD6MgMyerGjUHyC3W0ZzZarUUpODL MrLP8P6/COivVVHycT8dn1Pguq4UWADW6IuhrQscLfDwcIAnKnsc3PTrtFDx512wVsqw xnO/zNZSf64kMdtA2bHs5L0hgFjz+wc2Be4RdU+NLPLsbn/XgUY9RntlPN3HidCnuNpK d1inHsJ09K+BPEp2KHOsRgTI/eaTPdk/O95adHYggf9uQGy1uFcK/zq37H+2kLnx9zKa 1OYYUYSJHf110XbN6vvONLTBFc2EcyspA57u2Dj/EkOrWMFj4jYFjEQgJsCXC0IuY7Nh t+2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=TGX2fYOcNyxgYHf1oCF+nBCVlCgqonUtviyxctPu4u0=; b=gxr0v6uvqtCQciHd7bcNtxdQHt5ioYnPT7e91b45LVawQSfI1CYjDNMEldzS7BLeua C16sEQnLyoyxJHhSCSrSzwkcs8SWAL4LU5FxNDuwwl+PEdGNROp7HwISDDzxZm8avYZO utkJ8f/3GjuhxNPogR98kQRg3AW6oJthjhLTa9VXtPy4TQ8gClLbQcNNTetMPHOJKENj x1TB6soGy5VPeEreXuzNqg6OHrmdTSkLL7C7NWFTY3CiTW6uEO44HlmECePXY3lXP8O8 gfs+4c+RqZvsWcJUTwZixlkt/0+JmOCp2Qx2DHL44ofxBIdBRsuD9x10RxSJs77+pq72 6VZg== X-Gm-Message-State: AOAM532Yz097qJKPmpR84dYH1lcZvfDpIdWjxAgueJNVWG8dkLM3RSa2 0IWaLKttOkB21MhAjifp1LDQGAec X-Google-Smtp-Source: ABdhPJzrHYwfIJMX55IqqAZv8ZpN2Unm+zbTdWTt1KcVScgR7802s0FAapgBEr6cxh9DBXxhnJ3KZw== X-Received: by 2002:a2e:330e:: with SMTP id d14mr2517601ljc.407.1596401700355; Sun, 02 Aug 2020 13:55:00 -0700 (PDT) Received: from arch ([98.128.186.72]) by smtp.gmail.com with ESMTPSA id d26sm3940414lfq.73.2020.08.02.13.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 13:54:59 -0700 (PDT) References: <87ft94hj1w.fsf@therning.org> User-agent: mu4e 1.4.10; emacs 26.3 From: John Herrlin To: Magnus Therning Subject: Re: Setting language on result of code block In-reply-to: <87ft94hj1w.fsf@therning.org> Message-ID: <874kpklqe7.fsf@gmail.com> Date: Sun, 02 Aug 2020 22:54:57 +0200 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=jherrlin@gmail.com; helo=mail-lj1-x235.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=R4u/Gjkw; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: Y/v/eHjAUFEP You can use =:wrap= for that. Here is the docs: https://orgmode.org/manual/Results-of-Evaluation.html And here is an example. #+BEGIN_SRC shell :results output :wrap example json curl http://ip.jsontest.com/ #+END_SRC #+RESULTS: #+begin_example json {"ip": "8.8.8.8"} #+end_example Best regards John Magnus Therning writes: > Is there some way to specify the language on the result of a code block. > For instance, if the block > > #+begin_src bash > aws --endpoint-url=http://localhost:4566 sns create-topic --name the-topic > #+end_src > > gives the result > > #+RESULTS: > #+begin_example > { > "TopicArn": "arn:aws:sns:eu-central-1:000000000000:the-topic" > } > #+end_example > > Is there some way I can specify that the result is JSON? That is get the > result > > #+RESULTS: > #+begin_example json > { > "TopicArn": "arn:aws:sns:eu-central-1:000000000000:the-topic" > } > #+end_example > > /M