From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 0I9BIuEvb2aubAEAqHPOHw:P1 (envelope-from ) for ; Sun, 16 Jun 2024 18:33:05 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 0I9BIuEvb2aubAEAqHPOHw (envelope-from ) for ; Sun, 16 Jun 2024 20:33:05 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=BYEzRHAJ; 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"; dmarc=none; arc=pass ("zohomail.com:s=zohoarc:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718562785; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=K6AotuRjMV8lgCtwtOG4hO3z+nB7QZVq3ez95ouXCCA=; b=WvjB2QqYn9uGtmYRcHIsS66sQCPgOkzbZuvLpFQeirTs1INTXqIWo+CWat75LLCi6TVeYu /z/7gmzwEt1eV8i0MiZvx7M3x+fjUwTmDYpp9NqdLgvlqEZDr7gJmyC/adf/KZ1Wjyr3l7 /5lfp8mr56QoM1cPqwyE0KSr6GQ5fINlkforW5ze4uj1Vd7KHmZM8Gq7LY4j/aKiTHFQGB 5YgG8PpHmiw8xw48tT1zIoFP5BS5S6HBQnxn+j8lCYLgv6zafH9I+1pHD5bxr7qfgnzPXA n1lsgFQOBGAG4MQEpwqI5FJfCn4K7HSKm4Y594g6+pSioczBDuSgX8+Yergs3A== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=BYEzRHAJ; 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"; dmarc=none; arc=pass ("zohomail.com:s=zohoarc:i=1") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1718562785; a=rsa-sha256; cv=pass; b=JB/Ga7AuXxciFUWzK1tdFXs4Cnq+/YktTZL+Qo7u0vxoJCxqLgWUg70uHrIB/Ib/wUHnIz SpGgWeHOjvfL+OvlyaSMko/aoN+9ZFFMr+CN2GzLleCzzvH6F90gdV5CQZI5ARHIul40MO S/M3rH5ZVYqJTyBQAIcA5ME+XMvHT9tzBWf7T6K11V5igthpHr3E2JTD/SkaKVpl27o3WP iB955IF66QXAtS7xKn3kWVaFSF3bv5vC9MSSpqpJPiJtl2iEigrZtOy35kTpoR2fkMs7H4 /F0ipx+aTbithfUGKlKd1S0/2QmdNhVFMqnfAX5isTR04mem4ONP15R2EexIpA== 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 C7B4D685E8 for ; Sun, 16 Jun 2024 20:33:04 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sIufj-0001rC-Kh; Sun, 16 Jun 2024 14:32:11 -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 1sIufi-0001qk-11 for emacs-orgmode@gnu.org; Sun, 16 Jun 2024 14:32:10 -0400 Received: from sender4-pp-f112.zoho.com ([136.143.188.112]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIufg-0003Un-6g for emacs-orgmode@gnu.org; Sun, 16 Jun 2024 14:32:09 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1718562723; cv=none; d=zohomail.com; s=zohoarc; b=DfY4UKb+I88JV2ge9B8BtKLVSaNmaToccy+2PIq8DTnENV82YeHN790KZhYN6KaYSesqW+ZNCjG17MXjm7fAPyM3y2CwdCsHduK8sit1y6aE+oqgemt+BB9Qf8xS4a7itFL5f2z9paLZw447hgehD4+neqkHuw9uhDVtvGquDu4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718562723; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=K6AotuRjMV8lgCtwtOG4hO3z+nB7QZVq3ez95ouXCCA=; b=ASjZHW3QBFmvrTwrbS9CVf6o3s61EdKW7C0Tb3ZsAVs4r/z00XUGGM/XAtB+1KgUla7fGMPwFrPYjMB2hq9pZObowsoVWA0Xj8h7M806rDjn7KpVpBqSAUuYrMY0AXLNMXGVxHlG9u2+Un31lFtPXgj3EaOfZEUCZE3NF2rE3sw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=excalamus.com; spf=pass smtp.mailfrom=matt@excalamus.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1718562723; s=zmail; d=excalamus.com; i=matt@excalamus.com; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=K6AotuRjMV8lgCtwtOG4hO3z+nB7QZVq3ez95ouXCCA=; b=BYEzRHAJEVesRMNrwHiwJGJPe3Xj5AxCnCN2zuE8pumU2+9tSGC0Z2PFzYFiOp7u FW5hJaCHErkcfNuJYRkX16fJw3Ir+fH9uQu3kbZpWy3rNJ688fLdr4IXREDhyUqXWuR hQpOak7+vnpr31bF3/IKKCmMivcPaimFdJhySwW0= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1718562721657727.4905263304983; Sun, 16 Jun 2024 11:32:01 -0700 (PDT) Date: Sun, 16 Jun 2024 20:32:01 +0200 From: Matt To: "Suhail Singh" Cc: "Org mailing list" Message-ID: <19022520f63.acdaef901507354.6362811776086159414@excalamus.com> In-Reply-To: <87h6e134sp.fsf@gmail.com> References: <87h6e134sp.fsf@gmail.com> Subject: Re: ob-shell: async support in "shell" vs "bash" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Received-SPF: pass client-ip=136.143.188.112; envelope-from=matt@excalamus.com; helo=sender4-pp-f112.zoho.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-Spam-Score: -8.04 X-Migadu-Queue-Id: C7B4D685E8 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -8.04 X-TUID: N+CVYC6f91ol ---- On Mon, 10 Jun 2024 04:33:26 +0200 Suhail Singh wrote ---=20 > On my system both "shell" and "bash" language blocks use "bash" > However, the value of org-babel-header-args:lang differs: >=20 > #+begin_src emacs-lisp :results value replace verbatim > org-babel-header-args:shell > #+end_src >=20 > #+RESULTS: > : ((async (yes no))) >=20 > #+begin_src emacs-lisp :results value replace verbatim > org-babel-header-args:bash > #+end_src >=20 > #+RESULTS: > : nil >=20 > Is this a bug, or are async blocks only currently allowed in "shell" > language blocks and not "bash" language blocks? Thank you for your message! :async should work for all shell types. Are you finding that it's not? In practice, anything but a "no" or "none" for :async should work (see "org= -babel-comint-use-async"). For example, the following should run the block= asynchronously: #+begin_src bash :session *my-bash* :async banana echo "hi" sleep 3 echo "bye" #+end_src All shell languages use the "explicit-shell-file-name" to define a comint b= uffer using the "shell" command. For "shell" blocks, Babel uses whatever t= he user has set for "explicit-shell-file-name", most likely "shell-file-nam= e" which defaults to /bin/sh. Many systems symlink /bin/sh to bash for int= eractive shells. I suspect this is what's happening on your system. You c= an check this with something like 'ls -la' or 'readlink $(which sh)'. For all other shell languages, "explicit-shell-file-name" gets set to the b= lock language name, literally, when "org-babel-shell-initialize" is called,= such as when ob-shell is first loaded. That word, such as "bash", will re= solve according to, I believe, "exec-path" (which is basically PATH). Regarding org-babel-header-args, "org-babel-header-args:shell" is explicitl= y set to '((async . ((yes no)))), it seems, to quiet the linter (https://gi= t.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3D40d1352b). For oth= er languages, such as "org-babel-header-args:bash", it's set to nil. AFAIC= T, what you see are simply the default values. I'm curious, what caused you to notice this inconsistency? -- Matt Trzcinski Emacs Org contributor (ob-shell) Learn more about Org mode at https://orgmode.org Support Org development at=C2=A0https://liberapay.com/org-mode