From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sAs+JNCS1V/zNAAA0tVLHw (envelope-from ) for ; Sun, 13 Dec 2020 04:04:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id lQTxH9CS1V+jKQAAbx9fmQ (envelope-from ) for ; Sun, 13 Dec 2020 04:04:32 +0000 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 DC352940355 for ; Sun, 13 Dec 2020 04:04:31 +0000 (UTC) Received: from localhost ([::1]:58316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koIcY-0001xS-8y for larch@yhetil.org; Sat, 12 Dec 2020 23:04:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koIbj-0001xK-I7 for emacs-orgmode@gnu.org; Sat, 12 Dec 2020 23:03:40 -0500 Received: from out0.migadu.com ([2001:41d0:2:267::]:53874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koIbd-00009O-7u for emacs-orgmode@gnu.org; Sat, 12 Dec 2020 23:03:39 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1607832209; h=from:from: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; bh=8Uve9oCgqOFBaz4rzIvB5gjMVolKZTEKA4E9yPnvNsQ=; b=FquiHUfMmMYi8eDvjUmHBPN0/z2qCYHeyYM2EtwtVm0zXfvxe8f+kUXUMPxfaoX3q09Rur l/3zBF6a8FRx7bibPK0PmIB5X7hCCXQg9Shwc3w/F4LEKFHAgNCQEmpU2UGND5Jz9UcXiX ng2djswg45Z68oOvkH5xowJhuubiaJXy8o3HrsNC/vXpCt2SiLN4CM9ZurE8Kj+qh0IRbZ R8ZtFeir5FdAcNntO93lf0K+FxwkfxVRpXB7ksk5TVoS6EaKcRTauALVx8i+EPThcOvylu mPnwV5n2fbHNe505z7yzvQr5epNSdhTnsk0WfB97eEuR/iU5hwdkOMQeq1EVBw== From: Kyle Meyer To: Aaron Madlon-Kay Subject: Re: [PATCH] ob-ruby.el: Don't reuse the same buffer among different named In-Reply-To: References: <87pn3zpag9.fsf@kyleam.com> <87o8jhqfwq.fsf@kyleam.com> Message-ID: <87pn3euzcg.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Date: Sun, 13 Dec 2020 04:03:29 GMT Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=kyle@kyleam.com; helo=out0.migadu.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org, Juri Linkov Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.50 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=FquiHUfM; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: DC352940355 X-Spam-Score: -2.50 X-Migadu-Scanner: scn1.migadu.com X-TUID: lb64GMZxpxnU Aaron Madlon-Kay writes: >> + (run-ruby-or-pop-to-buffer >> + cmd (or session "ruby") >> + (unless session >> + (inf-ruby-buffer))) > > I have just run into an issue with this: If you don't specify :ruby > then `cmd' for me is calculated by > > (cdr (assoc inf-ruby-default-implementation inf-ruby-implementations)) > > which gives the function `inf-ruby--irb-command' as a result. > > However `run-ruby-or-pop-to-buffer' expects to get a string only. Thanks for noting this. Indeed it looks like the old call through run-ruby handled this (run-ruby-or-pop-to-buffer (let ((command (or command (cdr (assoc inf-ruby-default-implementation inf-ruby-implementations))))) (if (functionp command) (funcall command) command)) ...) and that's lost with this switch to run-ruby-or-pop-to-buffer. > I'm not sure if it should be org-mode's responsibility to resolve the > actual command string, or if it should be done by > `run-ruby-or-pop-to-buffer'. (It kind of seems like the latter?) > > Any thoughts? Given the current situation, I don't see a good option aside from doing the functionp dance in org-babel-ruby-initiate-session as well. Even if inf-ruby's check was moved downstream of run-ruby-or-pop-to-buffer, I think it'd be good to fix on ob-ruby's end to work with the current inf-ruby. Juri, what do you think?