From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id WOemMi5KxGXRxwAA62LTzQ:P1 (envelope-from ) for ; Thu, 08 Feb 2024 04:27:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id WOemMi5KxGXRxwAA62LTzQ (envelope-from ) for ; Thu, 08 Feb 2024 04:27:42 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EdDawCeV; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707362862; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=zSoB4m7xswmkq+qZAcu/8wbmBjVoottDley/aCsnpCA=; b=ueqnvkp4ZBMZIqrQQchDi7qJSUfJIUWrkLk+pDgzzeRC6PMK6gL1+e+W8pwFChhY/MZdMA JGJgFaGcu5GI0NPPjIxOjlS+iNIig9QLe615MJcGXeXoeSBCzp4vTrHKNirC2ONYnuYS21 gC+Br4iKUvoLEHij+uLterESiZyLwfaxTG9Uf2UjV0KTZkFdOkYEhdQUGnYX9H3ODrWAIC RZVZTmHZNyBIKAxjBr3V9KYr4v5cpqWrwa9+Ia6YhuM6WfN4Mqw+XW+oLJoX1AGC+epMdQ mOClaX1Kp3XM/1Az0z9up/od7+xCTX7G7l8WvSJr+SFlouFuFfFX2i0R6VESVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EdDawCeV; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707362862; a=rsa-sha256; cv=none; b=XW1S0dcQlfJ7ucuqm6jOxIJgoZDOGheAwwjvAFu+DeUl+sJXUlC1nwKbqxGWA6en+7lb9b UcplIF9cp2YJi52UoGo3BPzYk+2h0JyOSKPqZHYCAMo133oKwLESQet0Tg2z4w1U9FfazG /Y9JJ3dbowySt4PEdT3reHELDHZQ/NVelLGXdKTkAuyB2aIUKkRe9EfyE0yWzRyKPD5gC6 LGjykinfAemKzPEEZNvhUgsRUOCyr78DzRCrfCxWjyeVA5pm7Pkmrli23okXp+85UdBFpo 8T1VAMplw0vUec3gxjnQKWj03G4v/4WZYPqAxMxWMP3upbVxYD2ZGNkWQlb8eg== 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 BAEC410172 for ; Thu, 8 Feb 2024 04:27:42 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXv3s-0004Q8-76; Wed, 07 Feb 2024 22:26:52 -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 1rXv3q-0004Pm-0d for emacs-orgmode@gnu.org; Wed, 07 Feb 2024 22:26:50 -0500 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXv3a-0007Yi-M1 for emacs-orgmode@gnu.org; Wed, 07 Feb 2024 22:26:49 -0500 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1d953fa3286so11661325ad.2 for ; Wed, 07 Feb 2024 19:26:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707362788; x=1707967588; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=zSoB4m7xswmkq+qZAcu/8wbmBjVoottDley/aCsnpCA=; b=EdDawCeV2E+jVSnI5ONfCx96Td6200P/paIawYqlduKSqcBgl4DwhBGqX7rZb8cmwx o5497gBJi6izvi9ErpXQf6pE8s/KUvMaO+OkrnouemYbi7tyD+N/52URdhSZJEhoC/ez PxMKRl2/874f+W2S/edFbCQ+e8y/txE+TMFqOHgAmq0lJplFMDfBSryy354B1Agw6oys w1C2Ak9xJV+0C3nGoOamcJEYX0x1+E1C9S6BYmQdgwCTaKsz6DTiAaDNbf+oi4Uhhkv3 ilH+PLNKK+R7Bej5huYTSxdyOnqTpbkn/QRx7o3R9rImbjYwt7BvcjnVUhVYGzACnedJ a2uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707362788; x=1707967588; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zSoB4m7xswmkq+qZAcu/8wbmBjVoottDley/aCsnpCA=; b=CVnM11DrOWXF1xnabe03rKRccLfZxNLS89HSetJOnT5mh6cuIViB8FJBaQogyfPmJ5 3U0iXuHTE4W2WNmvByUSVFuynS9Niyl4dvrqmt2Dj8z5eoJMckWnuSRD+T5KpOJCQzhF FqSePg2e3HZPd2oY/zijOsR1CsH0hAW8ve7iSA1DCOSgl+Gls8Zu13ut1I9vZaJj2Z2P Tk71U5/nX9tw0kAbcxHAYVQTCuFQ3zz+SDxm9+TqZ1DESo6Rz6YwP8I5KKF4S+ERaunT XSdnvIRE6Jktl/wyX8IdYhKqEnhyIW+EJQfGuU02vNbRULCjZW8DPSw4d9fXp0qeV4XO QVvg== X-Gm-Message-State: AOJu0Yz1v4wsDjoy5eDMYI4nDNL/wlPUUohS3S7YKmUqONdBKclZVKoV 5SLmrjilDCSXY6lN8N9p6gddDdQgKvWAv6v6Sa88vV4A3pV2SzrEBWkxASZ0 X-Google-Smtp-Source: AGHT+IHHp245p4EYoWvH40nzE2uqJ1iIVpQ8ByoAs4BMHC0M/E/i4ot2E9NdKFW+zJZpvwORXg9S9g== X-Received: by 2002:a17:902:c94f:b0:1d9:b3ea:25ef with SMTP id i15-20020a170902c94f00b001d9b3ea25efmr8007032pla.10.1707362788426; Wed, 07 Feb 2024 19:26:28 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWwM4oobkyEiHTO1kAttq3JHGboo9vwgYhm1yQdX4HR1jQI60AFiKocJ7lAVqYEdmQCWzNKrLUIqnmBVcsfXFySWe6fhkY= Received: from localhost (157-131-78-143.fiber.dynamic.sonic.net. [157.131.78.143]) by smtp.gmail.com with ESMTPSA id kw7-20020a170902f90700b001d9773a1993sm2237664plb.213.2024.02.07.19.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 19:26:27 -0800 (PST) From: Jack Kamm To: Ihor Radchenko Cc: Bruno Barbier , emacs-orgmode@gnu.org Subject: Re: [BUG] Unexpected result when evaluating python src block asynchronously [9.7-pre (release_9.6.17-1131-gc9ed03.dirty @ /home/yantar92/.emacs.d/straight/build/org/)] In-Reply-To: <87o7cv9e80.fsf@localhost> References: <87o7d0mm54.fsf@localhost> <65bbb108.050a0220.b60fd.6790@mx.google.com> <87jznm8hcu.fsf@gmail.com> <875xz42rp9.fsf@localhost> <874jen8zec.fsf@gmail.com> <87o7cv9e80.fsf@localhost> Date: Wed, 07 Feb 2024 19:26:26 -0800 Message-ID: <87plx77i1p.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=jackkamm@gmail.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=no 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: -7.12 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -7.12 X-Migadu-Queue-Id: BAEC410172 X-TUID: zW/WJ65djLFT Ihor Radchenko writes: >> I agree that it would be good to redesign it, but am not sure where to >> start. > > For example, > > 1. Change `org-babel-comint-async-register' to return UUID and to store > PARAMS as passed by the backend (current approach with PARAMS being > derived from src blocks prevents backends to transform src block > PARAMS dynamically). > 2. Change `org-babel-insert-result' to handle :async t specially, > inserting something reliable, like #+async: in place of result > without performing extra transformations. > 3. Change `org-babel-insert-result' to accept an internal parameter > that will make it replace #+async: keyword rather than perform > normal result insertion. > 4. Change `org-babel-comint-async-filter' to use the previously passed > PARAMS, remove :async t from them, and arrange the call to > `org-babel-insert-result' to replace the #+async: keyword. That all sounds reasonable...if you work on this, let me know if you want any help with testing.