From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 YOIrANf7b2UDkgAAauVa8A:P1 (envelope-from ) for ; Wed, 06 Dec 2023 05:43:03 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YOIrANf7b2UDkgAAauVa8A (envelope-from ) for ; Wed, 06 Dec 2023 05:43:03 +0100 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 9781B50AC7 for ; Wed, 6 Dec 2023 05:43:02 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=YgfkL0ds; 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=1701837782; a=rsa-sha256; cv=none; b=rlGVNzop5jjgmifblYWwkK5c3CfsJi7E5jX12qrfgGfcyRp++GFFlMpywgX3uM9/9ycmjQ AGDh1o8aidVxP1mEcknV3gOg6EJ2NuL3eLWvj5x5QZFfn0B2okdhKcgsF/8H57Y47vOxKZ O6NDawUUgfld8woLtusBWrDRZm3CIWiXcSaEo8RS//IgDqEce1Vf8GtvIA/Yv9t86onsZP nmabp3TY8pfuMn1t7M+82tp6hWqYHSw4QOB//PrrlkKZ61ecM+pgzjKByhWLldhs3aQw7+ b+WE4jcle8yg2jUOvh6HWnKKCBKk2t51cuFyhEKyfIs7JdfoOpKm+Ca23ctS5A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=YgfkL0ds; 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=1701837782; 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=UAKWq96zkqhhXxiU0cuAsjZl9EWW8gsu8avn2Razmgg=; b=WtpIAAssUMSpAfMWoR8p/bDaud70S/AhN0OMb0OFsiEmXSD1TVEt18mva1Ev73avJw+kCj ftJ72r9DuDec3piYON01mmYXAUaUYDwiQR5ABnWdNm9dTnfX4yedAQFEaJnAVcLLtQautm CfveMUQnkTascpDlbgEAcjHDnXXMg80YxQksxOtr9rCB9qRob/HT8evW4oIBXq1k92oS9m DLsRkXQJ0S0vtViVIRusMmncoBpeZpKvCUL1TjKSJn5j4pRKsAfkFPLyFcMHK2k+cIhTv3 piuUD0pQChNQo696VXXlCz3GSDJjqFp5ynjByUPtMAkqeZcdwn0xygr0vRFFIA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAjjU-0008Eg-FH; Tue, 05 Dec 2023 23:42:00 -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 1rAjjS-0008EF-AB for emacs-orgmode@gnu.org; Tue, 05 Dec 2023 23:41:58 -0500 Received: from mail-vs1-xe2c.google.com ([2607:f8b0:4864:20::e2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rAjjQ-0000E1-I3 for emacs-orgmode@gnu.org; Tue, 05 Dec 2023 23:41:58 -0500 Received: by mail-vs1-xe2c.google.com with SMTP id ada2fe7eead31-46486775ad7so1108333137.2 for ; Tue, 05 Dec 2023 20:41:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701837715; x=1702442515; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=UAKWq96zkqhhXxiU0cuAsjZl9EWW8gsu8avn2Razmgg=; b=YgfkL0ds6HA5dum4sMWiAtw/lX2xfhZT0TeQSUJ2FFeRmMr4HdfX7Uv/Z7A/bnf3AZ o/1qc+vxTnULwd2pjmULlhN+3N9/sSEESvbQWEyxYK4+XIMMozrItGzK5ftSZ/zOY3V+ my+BvRQB0pNMQ4WmvFbEsSw2ITu14xy6LOokFeTz7O40pkBcSz2ah5l1dXMS/lFqCATe 55Dj8oBLd0TO9J6Y1ZZH/hzBa0ufBvx1vERceDjdcIJuMD1rv2z3R3TtVL1jbA5mICtK u+9tZkI59MMUWR31/qOqQwBQzL7UhnbUdf6IdxRqhmxumcBENrbg0AVwfc3HhQ6ToJZd WDkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701837715; x=1702442515; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UAKWq96zkqhhXxiU0cuAsjZl9EWW8gsu8avn2Razmgg=; b=s8YYZ6QQG1a6BFKLicJZYst0MijnV55Dbzr+nJTWCmw+QwI6F3yTquw0886DSDZwR2 qaCzS+gAC6le4f3mjHlptjHNORHO16vbkIGQ6zIQi2RPC0RQCjLIo+OxshXuNvAau3Qh TnBl60k03Y0RsGFh2RVkzWdBci9ObxfIJLdUlisd9F+WMynicMJCpEGA8eNK/QtEW7fA xUjMV8Q6YuQayJ6Mf9XZvbh6/aCjn+RhhWjplgkkqQqwLgjnaJA0pfnr1q7zRYdz8lWI AgQjrHsiv16ohqatR8PcjWFhOAygM3liuVyDmaQJfKhvNoUjd7AAh4pemvEwyOEydSUS qAEA== X-Gm-Message-State: AOJu0YxPI6BZ3y9xFKSFH1y1YDcBUY/nBtl2DRvtvmGDHkWEf3tZ+ElI JWLPLT2Fw+A2jPC7RD/3QBUNeRHaJgkS5xAvb/8= X-Google-Smtp-Source: AGHT+IH1Ty02UZUSc3SKfRbz9b00nbC5pQ8sGZ/ZN614zKwTAIgaHzMZ0C/XlRls6HpEWAF7ONaRzTZJBRKMO4rN+S8= X-Received: by 2002:a67:ad13:0:b0:464:a399:2346 with SMTP id t19-20020a67ad13000000b00464a3992346mr279778vsl.17.1701837715369; Tue, 05 Dec 2023 20:41:55 -0800 (PST) MIME-Version: 1.0 References: <87zfyosw8n.fsf@localhost> In-Reply-To: <87zfyosw8n.fsf@localhost> From: Liu Hui Date: Wed, 6 Dec 2023 12:41:43 +0800 Message-ID: Subject: Re: [PATCH] Set Python shell in Org edit buffer To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="0000000000007d8b9d060bcff8a6" Received-SPF: pass client-ip=2607:f8b0:4864:20::e2c; envelope-from=liuhui1610@gmail.com; helo=mail-vs1-xe2c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -8.36 X-Spam-Score: -8.36 X-Migadu-Queue-Id: 9781B50AC7 X-TUID: HNnqkeS3cF0+ --0000000000007d8b9d060bcff8a6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ihor Radchenko =E4=BA=8E2023=E5=B9=B412=E6=9C=885=E6= =97=A5=E5=91=A8=E4=BA=8C 19:48=E5=86=99=E9=81=93=EF=BC=9A > > Liu Hui writes: > > > When editing python src block using C-c ', the python shell is not set > > in Org edit buffer according to the :session header argument of the > > block. Consequently, commands such as python-shell-send-region cannot > > send python code to the correct python process. To address this, the > > attached patch defines org-babel-edit-prep:python in ob-python.el. > > Makes sense. > I think we may drop a note about this new feature in ORG-NEWS. Thanks, I have added it in the attached patch. > > In addition, I tried to use org-src-associate-babel-session at first, > > but found it doesn't work because it is called when enabling > > org-src-mode, where org-src--babel-info is still nil. It seems it has > > stopped working since 203bf5870, and I think it is safe to remove it > > and related stuffs to avoid confusion. > > I do not see it being used much, except > https://github.com/frederic-santos/ob-ess-julia and > https://github.com/alphapapa/outshine > Although, ob-ess-julia is deprecated and outshine only mentions this in > "TODO" comment. > > To be safe, I'd prefer to mark `org-src-associate-babel-session' > obsolete and mention the removal in ORG-NEWS, pointing users to > `org-babel-edit-prep:..' instead. Fine by me. --0000000000007d8b9d060bcff8a6 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Set-Python-shell-in-Org-edit-buffer.patch" Content-Disposition: attachment; filename="0001-Set-Python-shell-in-Org-edit-buff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