From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id V//IOka/i2VqWgEAkFu2QA (envelope-from ) for ; Wed, 27 Dec 2023 07:08:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id CAsqNka/i2W3iAAAqHPOHw (envelope-from ) for ; Wed, 27 Dec 2023 07:08:06 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Kl7oRFpq; 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=1703657286; 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=QVfHNwNj3WzyEytnrFXnSGpN6lRyEskA9ZlZCYeakHE=; b=u2DFfndeVhbUBaAkZPmD08QSnpj5gRqhFIovb7ePmcZocE2QE0DsiF5qbdqMR9Ph1UKgT1 QRdvnID5bYS0CsGY96eMzmmZD2+VziIGu0Swe/9npQPOtdXUz/RfhlLxvSGh7pViMayzEl SD2amnCFKNMuQcg4dhQ46J+z91SvUbpNLIYYoyVMZaF34huU8EH63L3T4aX4uOpPRW0wie L6x5ZBrPW28uMiA9NH/DDS/ZCu4ZkAmLrKk0QewbEARtoUECuPEE1f1pmPmo4fjnrIuV6t /aYI0CJOVp+uRl+kUIgerjhSgauKmzedw7LFBJ34uIp0DalFe0tR8KiS5qsZsA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1703657286; a=rsa-sha256; cv=none; b=F2O+rQ5jtgqCMNz8U/bgeJi5ImvbFioyOWC/pTVbpmgUFrhz/k5wOwRIp/b4Ag7zVV0UF2 MjvdF0ONdFU7krVAJYsxkJ2W/94EdW6tbDJxPieh71AqOOEXqVoDaEg0u5R4bmoPKSgl+B wbfR4z77t5WidyjGagRNFXzKPv18Fe3i4yknhEyWoH0THbmMNUFXDrXLZa9VSv5VdqVxGz yuxfcPEcnLO5eBXM7h06FqZVM1d+Vd6ADjmRtAgk7wsKjAZ7Sc7sMihbB2mbxtSrIIKH6X WvzTl2wzckVkUSZofAGL8h2iymcCiOcTk0pM+vH2aaP67ud6r3XkTGQWfAfNjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Kl7oRFpq; 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 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 AD45D20AD5 for ; Wed, 27 Dec 2023 07:08:06 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rIN50-00009j-DE; Wed, 27 Dec 2023 01:07:46 -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 1rIN4y-00009T-Qn for emacs-orgmode@gnu.org; Wed, 27 Dec 2023 01:07:44 -0500 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rIN4x-0007sT-DP for emacs-orgmode@gnu.org; Wed, 27 Dec 2023 01:07:44 -0500 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5cdbc4334edso1555814a12.3 for ; Tue, 26 Dec 2023 22:07:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703657261; x=1704262061; 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=QVfHNwNj3WzyEytnrFXnSGpN6lRyEskA9ZlZCYeakHE=; b=Kl7oRFpqTG+fYY7a4CSosp+u/KKxLCzwXn9IdmLloQjKw6q41K1n65ZLBqC42L7fKH A6AXe8FGpuL50p0SNmPg2RYAN22Yh0Ntd8hW82GqYzom2wKLRSaWCURqtg5wi7TM7rh8 y+wjH7Z0xSt7cR56Jzg9lLST1aqYrAl4WP+dLltk5OGuIhW0bNrqoG7+KfXy65DVOdaK Wx21mCBxaenYJwX1ObYAzSZxSftrNysmk370aos7fPPiJUjfBmO40ozxpNWK12W1xtZ6 ovvf+x3xa973sxSSSYFh9h1eCSW+2R1aZm8YOxianLThvX/csJYu2yh2qbOt9z2MnAHR Twew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703657261; x=1704262061; 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=QVfHNwNj3WzyEytnrFXnSGpN6lRyEskA9ZlZCYeakHE=; b=MvsnMT0mHHo/IfKLznlW7s4beuY8mk3ebjXrb3DCX8lP3duEUocRkM1rpM4j3SDA9k fmqEY0YoSAqxDfXrLP01Lo9qOpfhT2EJxEM18TX5zmWqYVIr2TKEa2ysYEdI4h0toA9w bpuveoGyPokw372ID5PZ8xyekgQW6yjE4f93KVtIfDNrPIl9vf/xU5sqNMfZ+EnYBF16 B3I5lfWx6vQZJg5KauYZVQ3ofl92xvLVF3QJ355BO/ggQmmc2yHJfmmWxKcByL5okeLt CfW2tsxwpnNvADY5IwLGnZR1P69BPyJ5TypY0IR7CkVMim1C/RxK1ttGl3xzwT5eYBIE j15g== X-Gm-Message-State: AOJu0Yzg1MvOvEM/FPiUUpIwW351QHx9iE/vBy0WSO3umtN9RZe2zJS7 /zbfPuj67tgsNqYX2QYX290= X-Google-Smtp-Source: AGHT+IHgwMfkHSpHqmUvTMxFVVaT1mA/b7Z6dl4DSqyvPubv/Zv3mgPWjAvSOER8UhUjb8ziu1/e7A== X-Received: by 2002:a05:6a20:938f:b0:196:2a94:efff with SMTP id x15-20020a056a20938f00b001962a94efffmr61436pzh.80.1703657261386; Tue, 26 Dec 2023 22:07:41 -0800 (PST) Received: from localhost (157-131-78-143.fiber.dynamic.sonic.net. [157.131.78.143]) by smtp.gmail.com with ESMTPSA id d3-20020a17090aa68300b0028c060d5c59sm9373604pjq.15.2023.12.26.22.07.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 22:07:40 -0800 (PST) From: Jack Kamm To: Ihor Radchenko , Liu Hui Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Set Python shell in Org edit buffer In-Reply-To: <87sf4bsm1w.fsf@localhost> References: <87zfyosw8n.fsf@localhost> <87ttovlb1u.fsf@localhost> <878r6647vv.fsf@localhost> <87bkb2rqer.fsf@localhost> <87edfwsuvx.fsf@localhost> <87sf4bsm1w.fsf@localhost> Date: Tue, 26 Dec 2023 22:07:40 -0800 Message-ID: <87jzp018lv.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=jackkamm@gmail.com; helo=mail-pg1-x52f.google.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, 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: -8.21 X-Spam-Score: -8.21 X-Migadu-Queue-Id: AD45D20AD5 X-Migadu-Scanner: mx12.migadu.com X-TUID: lZHMGOEOyIsL Ihor Radchenko writes: > 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'? ob-python works fine with sessions started externally by `run-python'. And I have preserved this functionality, as I enjoy the flexibility of working this way. In particular, ob-python will detect when it needs to run `org-babel-python--setup-session', even if the session was started externally by `run-python'. `org-babel-python-initiate-session' might be misnamed, which may be causing some confusion here. It is run whenever a Python block is executed, even if the session already exists.