From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id eEU5NtqGu2WKGAEAe85BDQ:P1 (envelope-from ) for ; Thu, 01 Feb 2024 12:56:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id eEU5NtqGu2WKGAEAe85BDQ (envelope-from ) for ; Thu, 01 Feb 2024 12:56:10 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=mYn8H1tm; 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=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706788570; 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=EX3HK05+CGbGIk7PsNfWP9gdnqYiJ7Kkk1wJfJKJG+U=; b=d2dtRkaazcRu9vUB6WgcC0QwaY/FWcMs03dprJmL1nwsJ4r7BEZL85gGfZYjMFYnoDm3DB 5mLFIb+164bMnnR4djScL/t+C0qfYr9Y1R0VUwf9SEForRfZB8zmolGxOWl3OKBXj3t+np 8wgWWi6/dJxG8lHfLZ5syXHzD2w7QB+78r3FtG56aSF/hMnJExWvuG+RHJ7UmSvqyP7E19 W84pWkkji0F+X5Grf6OPGF7g07f7SEE8R2blljrbX8Q5d0LBidpXTj9S/ZjBPk/e/nYQ0X NBWlhB2GomD6l4yBN66TFb0+QJm3vWv2C2UeruJuiS95cWxYlmNAqzc+nZH6eg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=mYn8H1tm; 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=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706788570; a=rsa-sha256; cv=none; b=hRkHqZ+E1MQgXa7zvU6Zk+r5JYq4qkg8Wa41A6UBA0cm2YwQv/sigvIgZcn8KgZIA+8NBp SSEXY/V4D6nKAR5k37LKbxt31E/K7Hqvq+qOBM8BoVlciKd83fKbox05mU06AuYQekEoiy yMCO37pSk3oKkgjUuxETeu9z0l+k6bKaCt5oIjn1mD4OG+qjRsCxx0W/Osmcf9jAB3GUp4 wgybJ2VweY042+AQk5m+peFQJSjOKeAZCWxDxw20Ziej1eXxSWUkOe5a5j5ZAW3Mu0EkRq CjERHpeuIWNUzkYh4Lz8Rz8xatH2OHDCbdA2GhWxaTTEHegsjjTx9R9Ud46mmA== 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 9A3DD4542D for ; Thu, 1 Feb 2024 12:56:10 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVVfR-0002Kj-A1; Thu, 01 Feb 2024 06:55:41 -0500 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 1rVVfP-0002IU-EY for emacs-orgmode@gnu.org; Thu, 01 Feb 2024 06:55:39 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVVfL-0003U8-Oj for emacs-orgmode@gnu.org; Thu, 01 Feb 2024 06:55:39 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 64B39240105 for ; Thu, 1 Feb 2024 12:55:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1706788534; bh=bbnEYmWXcm1y7WDTv6IyBuEAE4nEoYyo+4PPAYdSzDA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=mYn8H1tmlKajZGz0XeBBRlbVaS8oICvfG2nyOP2Q2g2bRVH59ZjeCx3W3OnjAPig+ GhAuNyCr3/gDJqmTkKTtphN5xYURrFacHhfW4bpxBnUDGd8Bq+6VbXWFeEmwagh7KY d0Er6i5GvGJOK9i0QXU3SwwjqYTEEXs519DYlxC0Z3cz8Umgleo1ZIPzxQ/hUBkQr7 tCxLUSqhhNfHBS6ZWCvEYRCwoIJXu0CGrkK/lhzeyTfe7jYIYXDGIC4othxt77ml7d cR33/SAHwgjuUbB+7f6iWZrqG3c3A6hEuehG7+6NAjsC1ibI4hlREQxSojJkSiq5Xz C+aHlSY5MXfCA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TQcmP4Nxhz9rxN; Thu, 1 Feb 2024 12:55:33 +0100 (CET) From: Ihor Radchenko To: Jack Kamm Cc: Nasser Alkmim , emacs-orgmode@gnu.org Subject: Re: Async Python src block behavior with :dir header property In-Reply-To: <87plxg95u4.fsf@gmail.com> References: <87il3a55bg.fsf@gmail.com> <8734udvjai.fsf@localhost> <86plxhely9.fsf@gmail.com> <8734udoejo.fsf@localhost> <86y1c5cztv.fsf@gmail.com> <875xz9o4nj.fsf@localhost> <87plxg95u4.fsf@gmail.com> Date: Thu, 01 Feb 2024 11:59:04 +0000 Message-ID: <87msskmm47.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.32 X-Migadu-Queue-Id: 9A3DD4542D X-Spam-Score: -9.32 X-Migadu-Scanner: mx11.migadu.com X-TUID: giFXdl0Md37n Jack Kamm writes: >> Confirmed. > > Does the attached patch fix the issue? > > It seems the problem is with async sessions generally (not just > ob-python), and happens because `org-babel-comint-async-filter' does not > set `default-directory' before calling `org-babel-insert-result', unlike > `org-babel-execute-src-block'. The patch generally looks reasonable, although I am slightly concerned about interaction between :dir and session we describe in the manual: When =E2=80=98dir=E2=80=99 is used with =E2=80=98session=E2=80=99, Org = sets the starting directory for a new session. But Org does not alter the directory of an already existing session. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at