From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id eJPfLZBtdGUSmwAAG6o9tA:P1 (envelope-from ) for ; Sat, 09 Dec 2023 14:37:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eJPfLZBtdGUSmwAAG6o9tA (envelope-from ) for ; Sat, 09 Dec 2023 14:37:20 +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 80AB727C35 for ; Sat, 9 Dec 2023 14:37:20 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=SiDtEZDE; 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=1702129040; 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=iGq69f3zvAdvEDu9pCY4ZwgqZVeBwKrrys1KDkk7ShQ=; b=j18qdRe8mhFrNa9acG6zU8PV8mlbcBvKrBuioI97paYvx00iASgopsdyOd6Qx9D7+6zr4X 9XpznDQ3a9Ufk9OM6Xzdil4Hjdy5BTY3g3R93Outq1hs4fQKuhG28KsQdhxdpFognck0l+ Q/TL63ZYNJ8lDs9Rx+13u6cC/i9R2STNANaOHk21FNyx6K+1I4vf4Vq8VZbkJH4JgQYAkW 7Xhslzd0EtF6pxbzo54yRiuuvNmn4p+sDPMlpIvhz/9/o0zh8TBeBgOXe60cHtK1ZOuyBY bQK4APn2STQvjCKPeFTsxiGL2KgDiwonAremIbEgoFHNNMIBZKBz6BxTkUSoMQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702129040; a=rsa-sha256; cv=none; b=rzA0FPo5irXGCKco0X7KVXPHEkbo7tHG9cO7Db4g6wu2hY0VsgL3VZysONqbh/2hXoUJqB f8iN0iI/vYA5qjfXBDEVcApfDxBCdCh6Ht3Zj/qOJE4x0jv5BGiBU8hADG0tJXW2YDiSxT bPJWE739ORm9YBb1fQohV6y475ztTHpo8XU54YYKshxd7a5tXaunb1K3ne042PBv4OQwCI drjrcg553SFBuxkKoI73VT6vX9cwZGDYAG5/+j5EuWznXEZinfKV/FoQRPnVsf0GPw4moV ytIgqwy0tu3J3EVfwNFvdYNIlFpjSkZQmFTbt+eYSG5wZtW0bZ6X5cMi3kFazA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=SiDtEZDE; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBxVc-0002V1-Ku; Sat, 09 Dec 2023 08:36:44 -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 1rBxVa-0002TW-Oo for emacs-orgmode@gnu.org; Sat, 09 Dec 2023 08:36:42 -0500 Received: from mail-vs1-xe34.google.com ([2607:f8b0:4864:20::e34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBxVY-0000fX-LP for emacs-orgmode@gnu.org; Sat, 09 Dec 2023 08:36:42 -0500 Received: by mail-vs1-xe34.google.com with SMTP id ada2fe7eead31-46487cb65f4so933410137.2 for ; Sat, 09 Dec 2023 05:36:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702128999; x=1702733799; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iGq69f3zvAdvEDu9pCY4ZwgqZVeBwKrrys1KDkk7ShQ=; b=SiDtEZDEn6OgV7Y+kh8Qv7ZgykQwM8maN2BpEJxT+UcRAoqlyTUSfffCgUWZJlrO4k DXxDNFCGr6bsce+GDv6EfkJmcc9KvKClEGyR2mrRROln5WVy+1tvmN7CNtKbdIkmDwzY HjjJpTBcU4g0QHCT+F6W0XaEm6z35cKABBJU5XcqYnwbx2oPVQwU0/+0rDVEkP97J5yw LHwBFjncVA8FoqhHbScrD8qoG/yI9FeAulrvajymbbL0sx4X2cqdmnXG+XUrAJ2XjQw1 9t0l+eOiX8HVTINNv5nJifeBEis6ypaAk+2CX65ZA5qA21i5WmTEdk/zv7TyLkQHIq/l 1PYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702128999; x=1702733799; h=content-transfer-encoding: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=iGq69f3zvAdvEDu9pCY4ZwgqZVeBwKrrys1KDkk7ShQ=; b=NgfrJI0qMh1BZwUZ8vHabSOljAvcr1WytJT6mZ4/vkkGlZEE5NcK/WRNXi9JQev7AY CaS5rJ19BD0CeRX8b2O/KTesc7CTV0xzsTd3iuOEZBB5LqK8IL0ks0fZbUvie0dfrQ/r 2YVBxuQKoayShfrUny7brDhEtdOVEqMyOyFli/RIRe8fEs7Vh879Q3VtyMhYlEAfByaE i+d1vpa62cxcPVtw5FDh45iWWM+5fcaaWd4NFNN18VPZhocSnJZuQRcIGigzTjSwOJB/ kD1P8ngch2pDUZxrAydU9DucfieFDhVkHT4O+ICU3K4Rg1dnFm95nqv63k94SKi1gzOd p/2g== X-Gm-Message-State: AOJu0YwumJdDN+H8iPcz0N6EW3n3PS8ciHDGV/UU4gqTGeSpX5pbvCjw YXa/MrYwbhp/654OtVCBFWGyE71OLDqm96myoig= X-Google-Smtp-Source: AGHT+IGlaa4e2SZdTBizFzlc29kUQL0M2A2S7DH30OlRZzkfhb0+KHicIRN8ClorgR/T0MsuaI8qGKOvsT1vPH0PI+0= X-Received: by 2002:a05:6102:374e:b0:464:9e20:d515 with SMTP id u14-20020a056102374e00b004649e20d515mr1146852vst.10.1702128999206; Sat, 09 Dec 2023 05:36:39 -0800 (PST) MIME-Version: 1.0 References: <87zfyosw8n.fsf@localhost> <87ttovlb1u.fsf@localhost> <878r6647vv.fsf@localhost> <87bkb2rqer.fsf@localhost> <87edfwsuvx.fsf@localhost> <87sf4bsm1w.fsf@localhost> In-Reply-To: <87sf4bsm1w.fsf@localhost> From: Liu Hui Date: Sat, 9 Dec 2023 21:36:27 +0800 Message-ID: Subject: Re: [PATCH] Set Python shell in Org edit buffer To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::e34; envelope-from=liuhui1610@gmail.com; helo=mail-vs1-xe34.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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.45 X-Spam-Score: -9.45 X-Migadu-Queue-Id: 80AB727C35 X-Migadu-Scanner: mx12.migadu.com X-TUID: lNILoAmUTcav Ihor Radchenko =E4=BA=8E2023=E5=B9=B412=E6=9C=889=E6= =97=A5=E5=91=A8=E5=85=AD 18:29=E5=86=99=E9=81=93=EF=BC=9A > > Liu Hui writes: > > >> 2. Check the new variable and attempt to run > >> `org-babel--associate-session' in org-src-mode definition. > > > > I think associating the edit buffer with some session doesn't require > > starting the session, which is at least feasible for ob-python. When > > editing python src block, users can use C-c C-p to start the session > > themselves for evaluating code. So it would be nice to allow a value > > of 'associate in the customization, which means just running > > `org-babel--associate-session'. > > I think we have a misunderstanding here. > > Didn't we just discuss that C-c C-p in python is not equivalent to > `org-babel-python-initiate-session'? > > Also, by "start a new session" I meant "start a new session if there is > none running already; if a session is already running, unconditionally > associate Org Src buffer with that running session". I just want to set 'python-shell-buffer-name' in the edit buffer according to the :session header and don't need to start the session even if the session doesn't exist. It may be not a real association by your definition, so my previous comment is not relevant any more.