From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id QPXQCHKfcWVeUAEA9RJhRA:P1 (envelope-from ) for ; Thu, 07 Dec 2023 11:33:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QPXQCHKfcWVeUAEA9RJhRA (envelope-from ) for ; Thu, 07 Dec 2023 11:33:22 +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 03F2264164 for ; Thu, 7 Dec 2023 11:33:22 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=STO0ymlN; 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=1701945202; 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=g5rz+IuOM6CF0/g/a12eCJUxxG5JuZarKy03IqQsFuA=; b=AFtb+zJjmpsKJXZowbJraLJaAcbeHbZ/vqkzbnaga+wWI7ybzAECibMbH9OJynNnSOfY7G L6ilIgO8SsHC+CItm34NcW3Qh49YQ5/DR5OiuFwTvJunmi0PDdx7QSM57Ol7I4gwESp1BJ T24iShHizAcppx9PyJQEwi0cJIS1jI0QhHrHd7cQz5Zdas4QyGka/8SDmS79OdRaXuIXfC tkC+5mIUbVQljL7xWPvN5gv2k2rCccAUrLxbEO13c3riZsDsixFLmd8W18SUodUtJxQR3R 1osSev+TqYuGZW6kBC7/DsZDi1rmxSUpcc3Kdg28txQ8H8mx2GiyKhakdT876Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=STO0ymlN; 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=1701945202; a=rsa-sha256; cv=none; b=p/EKkkCEnq+DGO2GrqploDjqHc8Qu7+r+yJqCp/F4pr1vKe6AjCSUr8XcSRD8wVgsNMCNe h6vCrDnNmqCsqPQk0c75sjnGlwyh0cnYFeWjsNnL8hixY21CIM0gNTdpkEbU7jYkML2PHI aP6eJ2NSvANB7S1K/fPCQOykb1v7stym7zsqBI0PHnPU9BV2aN7tbP0jKFXLqgmn+bCNH9 afeq1+NTcf59Faieu9DI+xdK7rClKdGPEaJdOlIPPWTvhFhl0WedfARh6Uis0cE3FjAtY4 gwr6z6unfWDFc7oc+TFRqd4D+s7Znt/9byeiJD22xK0+LQB/Nx+f5UkcXSlASg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBBgp-0000hZ-Ac; Thu, 07 Dec 2023 05:33:07 -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 1rBBgo-0000h4-3E for emacs-orgmode@gnu.org; Thu, 07 Dec 2023 05:33:06 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBBgm-0002nm-6f for emacs-orgmode@gnu.org; Thu, 07 Dec 2023 05:33:05 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B3867240031 for ; Thu, 7 Dec 2023 11:33:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1701945181; bh=iwk7Q/WdZFszxP/jybgQwDBWI6hYAZaB/Uca4MymzuY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=STO0ymlNm+jXNBfI46Xpm3UdCSPTPJUshj4G6Wfa0FY5r11FG6EzTaAOjrH+m3SaF yi+HnBg5sXHHiN7QnbT1DDk3tVhIWfTrXem17sfU2/jXDGDDLcWOjXpPCBnEXnWrUx aw1BI7dHqnY0PIYP/o9s8mQkDJsHn3mz1n9YDhnk+Wrb9dym74VzU5C5fbfYYAJT4X /7f0EFk9tkgqNZ3EFnzJv5tz14uGr4qOlz+g7NSlUAyxu8kVDsk4+sqt68089ZMsdX 6rgYIgWWA92zDLx26vsaWrB3XU3C20K3FGaGcA7MRheM2HOv4xcuU1Qc4pW0CNgPEm dQjt2A0JzrMeA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Sm9b12Ptpz6tw4; Thu, 7 Dec 2023 11:33:01 +0100 (CET) From: Ihor Radchenko To: Liu Hui Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Set Python shell in Org edit buffer In-Reply-To: References: <87zfyosw8n.fsf@localhost> <87ttovlb1u.fsf@localhost> Date: Thu, 07 Dec 2023 10:36:04 +0000 Message-ID: <878r6647vv.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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_H5=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-Queue-Id: 03F2264164 X-Spam-Score: -6.59 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.59 X-TUID: ECFpN2O2FK7E Liu Hui writes: >> May you also mention what this means in practice? Like that users can >> now send region for evaluation right from the edit src buffer? >> Otherwise, it may not be very clear for ordinary users what this feature >> adds. > > Yes, I have updated the text and you're welcome to improve it. Thanks! Thanks for the update! > +(defun org-babel-edit-prep:python (info) > + "Set Python shell in Org edit buffer according to INFO." > + (let ((session (cdr (assq :session (nth 2 info))))) > + (when (and session (not (string= session "none"))) > + (setq-local python-shell-buffer-name > + (org-babel-python-without-earmuffs session))))) Will this work if Python session does not exist yet? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at