From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 AHTwNg4ErWXh6wAAqHPOHw:P1 (envelope-from ) for ; Sun, 21 Jan 2024 12:46:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id AHTwNg4ErWXh6wAAqHPOHw (envelope-from ) for ; Sun, 21 Jan 2024 12:46:23 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=K5UuUd23; dmarc=pass (policy=none) header.from=posteo.net; 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=1705837582; a=rsa-sha256; cv=none; b=tiEm9W+AFZzElpsiqRg1DKcMxVX5Usk5nV42hRQoRjvWS6FHip2ScScJu1bwrpJ5dfsXD4 9dzj20rdUB3+i+OQpqOrwOisUILsLyB8z+mWmuenmN/qWByA+a9lxM+hgtmt2AMwgVAsdE btUPfIbNPUiKR6z51NaYpJS4S/Osvam4QQ7KZWRLx0fItybBVOE7CXw1bP2oPwaEDvQBUt ugCMfoXOJUySFBgg97zF1OooQFwmaslDBARUgOgt3cc8bYh4u+RO3JUcLcKLyrBsenz13c W1kPA9YWk5SW+VeexQzpr4K3efy0jSnKSWainEpLy7Ip2IGjjBg/j+Qu0Cka1w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=K5UuUd23; dmarc=pass (policy=none) header.from=posteo.net; 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=1705837582; 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=YC3owYzqYtYALA1l8PmqQg7sFrStYYjZi0ZgpgcwSFg=; b=MztMZE7Q2t4DCi3eKOhibXuYormLhz2q6Y+iFaDhirkon4ZWzxPlfwfbrQG7RVaDBGYD1i Mt5ouAQfD+NeiBcNG0tQBTXM7GzdpmK8zRpC67OqpsQWVZjHatOyPl9vTEAwUNnOCZuIPW KM7bHQOmJjcAHTav0s+tjXlEbOTbEah9oBHCvlWkcKUOUahRr+7bbiSUViKPspFJGgeUxy SJ9wXv8ZbxMpEiEVQOPj+kwpPMJX3khG/AzQvGzD5xgDLIhlRKlLoJofMx6kss95SWQ7Zb qXRZ0JFTVU4SOIel/eIVOujNMH+Q3qJmxcyIx5U1/ZGDlpDkQN6O3yXk2zIysA== 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 898E124D86 for ; Sun, 21 Jan 2024 12:46:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRWGR-000478-MO; Sun, 21 Jan 2024 06:45:23 -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 1rRWGP-00046t-7a for emacs-orgmode@gnu.org; Sun, 21 Jan 2024 06:45:21 -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 1rRWGM-00008M-BS for emacs-orgmode@gnu.org; Sun, 21 Jan 2024 06:45:20 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 83784240027 for ; Sun, 21 Jan 2024 12:45:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705837515; bh=yUkqGSyZnER3WXeVMyo5N8/Q4vVEMdhubK2yt/AzS+U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=K5UuUd23vNjf0A6qQWOIyXGkqQbjJfFUkZ+KlqKth6/eaARX4sCBsmsYcqzKjyGkd bClF6dVupaUNT4ZxGRh9bRI1sdFUSaKwrzQ+047Irfoh7OKOofxHju9fsuR1w/Fa7s Ca4x8rKszBJE1++gx+xQq5nF9PelrhZMwUtwOA1V/WGPwm7Ds3FtgR1MvlbVeA6A2l J9pmdXzUW4/li+B2lehI0NMGxhQ3Jw25j6Zenr8BBbaFV8MWCj+Zpo/fHbXGWAqWVN t7La/pJPLQo1xRiMSP/qLmEAg4/7taoh7FIO/7mOJJDQwIbNvRKjF1BF496b4IAnxO vBdPRgxofUqXA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4THs3Z3CxBz9rxG; Sun, 21 Jan 2024 12:45:14 +0100 (CET) From: Ihor Radchenko To: "Sparapani, Rodney" Cc: Jack Kamm , "ESS-core@r-project.org" , Liu Hui , "emacs-orgmode@gnu.org" Subject: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer) In-Reply-To: <871qapkkqt.fsf@localhost> References: <87sf4bsm1w.fsf@localhost> <87mstw18r4.fsf@gmail.com> <87bkaak0ol.fsf@localhost> <87ttnyz0jv.fsf@gmail.com> <87wmsn6ghw.fsf@localhost> <87o7dxu15h.fsf@gmail.com> <87msthwbfz.fsf@localhost> <87le91t13e.fsf@gmail.com> <87zfxgxb8m.fsf@localhost> <87r0ir2ln8.fsf@gmail.com> <87zfxewewe.fsf@localhost> <87le8x3e0a.fsf@gmail.com> <87cyu9qt4e.fsf@localhost> <877ckhkmtd.fsf@localhost> <871qapkkqt.fsf@localhost> Date: Sun, 21 Jan 2024 11:48:32 +0000 Message-ID: <878r4ihppr.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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-Scanner: mx10.migadu.com X-Spam-Score: -8.39 X-Migadu-Queue-Id: 898E124D86 X-Migadu-Spam-Score: -8.39 X-TUID: t/ith9JzAxnn --=-=-= Content-Type: text/plain Ihor Radchenko writes: > We recently discovered `ess-gen-proc-buffer-name-function', but it does > not work as we expected, unfortunately. (which is either because we > misunderstand something or because there is a bug). I am attaching tentative patch that will make `ess-request-a-process' obey `ess-gen-proc-buffer-name-function'. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-ess-request-a-process-Honor-ess-gen-proc-buffer-name.patch >From 68984a5a0a1df5a5a2619b579f23f70128e979cd Mon Sep 17 00:00:00 2001 Message-ID: <68984a5a0a1df5a5a2619b579f23f70128e979cd.1705837631.git.yantar92@posteo.net> From: Ihor Radchenko Date: Sun, 21 Jan 2024 12:44:32 +0100 Subject: [PATCH] ess-request-a-process: Honor ess-gen-proc-buffer-name-function * lisp/ess-inf.el (ess-request-a-process): Do not make processes not matching `ess-gen-proc-buffer-name-function' current. --- lisp/ess-inf.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ess-inf.el b/lisp/ess-inf.el index 9ca3f455..aaff314c 100644 --- a/lisp/ess-inf.el +++ b/lisp/ess-inf.el @@ -820,7 +820,7 @@ (defun ess-request-a-process (message &optional noswitch ask-if-1) (delete-dups (list "R" "S+" (or (bound-and-true-p S+-dialect-name) "S+") "stata" (or (bound-and-true-p STA-dialect-name) "stata") "julia" "SAS"))))) - (pname-list (delq nil ;; keep only those matching dialect + (pname-list (delq nil ;; keep only those matching dialect and `ess-gen-proc-buffer-name-function' (append (mapcar (lambda (lproc) (and (equal ess-dialect @@ -828,6 +828,8 @@ (defun ess-request-a-process (message &optional noswitch ask-if-1) 'ess-dialect (process-buffer (get-process (car lproc))))) (not (equal ess-local-process-name (car lproc))) + (equal (buffer-name (process-buffer (get-process (car lproc)))) + (funcall ess-gen-proc-buffer-name-function (car lproc))) (car lproc))) ess-process-name-list) ;; append local only if running -- 2.43.0 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--