From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id OMDqMBULmGXDtQAAkFu2QA (envelope-from ) for ; Fri, 05 Jan 2024 14:58:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0IcwLBULmGUY7QAA62LTzQ (envelope-from ) for ; Fri, 05 Jan 2024 14:58:45 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=DXcruQto; 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=1704463125; 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=LQ3EcA7YX19GINbJO5QtMcFzBW2QnUS0a+4AZdoWIrI=; b=m3yyAt82BknKtEpeIIHaCMUuZDdhLqnr+EmR40mhCFPw52C4pf9SDDVH7LkvqZXvB1mZZP tia5CzUhTLyRrVKJjDG+sHHNSBkkhEFNake7ldH5yUSqR5W1WgaTcMvHZEd/YHUGxOzF2M UaQy8xINNV8Z72gDG8Gun1lgpdDbD3Efv8Zk8N4/Nldsy5lNh4TfdwchEtyru0a5KtgwXG 7cp53RYyUkajUHzw68k8m98EjAzvAN39I89JqRzXNYeCw4sq1wkzVAg6NCwxyFUZtF9gxL qIfRdz8/9N4ZrI7otwKVyGToJaPCna4jzRuXSl/3PAj5QBcvg94ok6WmMkfAKA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704463125; a=rsa-sha256; cv=none; b=UHN1Caz7yrT8tcBtiKMtj2Jy50YDWeI2FVd0b67QJabfEyRBCTl21LB6qM8UHUKlkYhfp2 EYa+IBe1faSxtFRNEez+MLNrPKuLaWZ+ErUeSEFCEq4LzuBcW9paGmlWR1W7bSb1+0TsBO 9C3KDDFeOsv7YVoDXVJh61T0q6i+RBNa2XPqc9/9B9lbabBYxV4tBGk9Hcn6CGJrxkYkKM H0E3RXuqxOfc3dvfXBEcuAhwDoFr0MIKv4HC1OGvYTXF60/K17hgwMm9526aS/Q9MUERhR v93Zpe/+si+TrZAH7pl8Cl8iyUoxnnXq8tKuWi+zMK1p1gqaExwZdRVnBHTrWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=DXcruQto; 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 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 92F4752F00 for ; Fri, 5 Jan 2024 14:58:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLkhj-00050w-Fh; Fri, 05 Jan 2024 08:57:43 -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 1rLkhh-00050h-EX for emacs-orgmode@gnu.org; Fri, 05 Jan 2024 08:57:41 -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 1rLkhe-0002ys-L1 for emacs-orgmode@gnu.org; Fri, 05 Jan 2024 08:57:40 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4A2F6240027 for ; Fri, 5 Jan 2024 14:57:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1704463056; bh=ZPklYdH3yflBLKqDT0ww/UHJ1dXqazgAJ8NtilF2fWY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=DXcruQto+iOuo+2P5Ke8oM8XRdCw0QI5ogdRhvqgJ1gxCwgK68AFaH3NCKXLwP0NR Xlaeeh+t0bMlkgbVbfB2atMU4ZlK53SpyfomWSAA59S4xsuE+PsFbFq5yubCSI/ADw UA5glua+eLquPoDS28stOO1fdhj5GwigN9FG7sQU2I5wbYKhSl3f9peSUlFQVz/3gT kMTWAl2nvAm0nhS+4xjtjPU5auZZPOpF33a+F8MSnY7Wrv9Y1Lx+lk61nisXUzN9J/ VmpIAmKq3oi9Js5/hiUdvYM93JsbRhArNPyrwaPWLhFmfC1uz2/0hgoMTT9GZgP5O4 86NrtES+IzFCg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T64lg3yxDz9rxB; Fri, 5 Jan 2024 14:57:35 +0100 (CET) From: Ihor Radchenko To: Jack Kamm Cc: Liu Hui , emacs-orgmode@gnu.org Subject: Re: [PATCH] Set Python shell in Org edit buffer In-Reply-To: <871qb21bp7.fsf@gmail.com> References: <87zfyosw8n.fsf@localhost> <87ttovlb1u.fsf@localhost> <878r6647vv.fsf@localhost> <87bkb2rqer.fsf@localhost> <87edfwsuvx.fsf@localhost> <87sf4bsm1w.fsf@localhost> <87jzp018lv.fsf@gmail.com> <878r5ek0jj.fsf@localhost> <87h6k10zcg.fsf@gmail.com> <875y0e8qun.fsf@localhost> <871qb21bp7.fsf@gmail.com> Date: Fri, 05 Jan 2024 14:00:48 +0000 Message-ID: <87ttnr6fsf.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-Spam-Score: -8.58 X-Spam-Score: -8.58 X-Migadu-Queue-Id: 92F4752F00 X-Migadu-Scanner: mx11.migadu.com X-TUID: ab0jI5w780pA Jack Kamm writes: >> python.el is convenient as it allows setting the session buffer name in >> advance via buffer-local variable. Then, all the normal python-mode >> commands, including `run-python' or `python-shell-send-region' will work >> as expected. However, other babel backends like ob-R do not have such a >> luxury (see the dance with renaming R process buffer in >> `org-babel-R-initiate-session'). > > For R specifically, using `ess-gen-proc-buffer-name-function' might > simplify things. Though of course this doesn't solve the problem more > generally for other languages. For now, I changed ob-R and ob-julia to use `ess-gen-proc-buffer-name-function'. This is indeed cleaner. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=b6643884c With this, I am wondering what would be more appropriate place to set `ess-gen-proc-buffer-name-function' - `org-babel-edit-prep:R' or `org-babel-R-associate-session'. Same for python and other backends. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at