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 SGw/B4VCB1//FAAA0tVLHw (envelope-from ) for ; Thu, 09 Jul 2020 16:15:01 +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 0FMLA4VCB19kbwAAbx9fmQ (envelope-from ) for ; Thu, 09 Jul 2020 16:15:01 +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 58FAF940AFA for ; Thu, 9 Jul 2020 16:15:00 +0000 (UTC) Received: from localhost ([::1]:47826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtZCL-0006eh-QK for larch@yhetil.org; Thu, 09 Jul 2020 12:14:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtZBw-0006cu-4l for emacs-orgmode@gnu.org; Thu, 09 Jul 2020 12:14:32 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:37122) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtZBu-0002If-AU for emacs-orgmode@gnu.org; Thu, 09 Jul 2020 12:14:31 -0400 Received: by mail-pg1-x532.google.com with SMTP id d4so1182698pgk.4 for ; Thu, 09 Jul 2020 09:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=9JUJ+g78TSJVMfmLhmAk8gyH567OUF4+5ZX5uAB6XN4=; b=N11zTcqkVSp07xpxgLq4WTZY5O+aRjyAGN3mEhW67JsdunluEPp6bpfHw5bmpBj9m5 AlqMoylm0LAIWf8a1+vMc93v9DQsEbvS4Fp/Mwq0NVZ8IOssQAB8a2at+k0O/FrN1a8t Ks4XYZA2a7g0DF0jT7VSdBUUcJyL3sCkf7s9y+tMV8NMd+pCYw9I+T21R0BeI6wo774K efZ+x5jn1OntEt6weKz4b2uCT8r4Dq2zwTSMxdmGTZjlZK+1gUhfnLQqaFetwFMuQnj+ 3GHXIK6BRY8IEyxQrkEH8zhuNZVOdOr9jRYebKupob6kP9WITjslkuj98K2+//sl9tf3 Xlrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=9JUJ+g78TSJVMfmLhmAk8gyH567OUF4+5ZX5uAB6XN4=; b=hO6NNsG6yhh2bn6qsbJzSwTnagfkaVFBhS8JKCD4TAe3karh1IOKrxgV/5Pni9N78n zVcaWJSU+soA1FvJPpcLTqgXfwkbRSG6scR3e9gXTk9a6EkVqtbECgD4vvEV2R0I8NZ8 8kEByZKJIQRjdGFIQ6NkdwQRlntRlRM/atYYgHaATbh3hZn/R5hSU1SNm5D7dJXTPBXq 3oriMr6/9c8eZW/VPFoyfCbPhmyUhMJjB5RGwwCB+cR3ztrqdM9eUrXkaVcRpIXvPRXc 7aJrjj9t+HHCpz9nljAhZvXGBfRpefgPVs0EzqheANtWftBfQmU9xYECAYk6SCcwt/Jw Ww0w== X-Gm-Message-State: AOAM531s8qKgvsuD3T965xdLQwQawUbu35ZXu1eQ6vNaVlcxYL+1ZXp7 JiscCqtmgHwt+CUHsr9FbJ3Eh4N8 X-Google-Smtp-Source: ABdhPJydKXLFc2P/c8Kr8CCoS3oncnpxIwVFUrgC2rHdrn+e8myKYUAKmP7IoMQumY8/TDxhSwBSXQ== X-Received: by 2002:a62:7657:: with SMTP id r84mr56910929pfc.130.1594311268527; Thu, 09 Jul 2020 09:14:28 -0700 (PDT) Received: from geus3064linuxwsm (97-126-92-2.tukw.qwest.net. [97.126.92.2]) by smtp.gmail.com with ESMTPSA id fh12sm2920808pjb.5.2020.07.09.09.14.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2020 09:14:28 -0700 (PDT) User-agent: mu4e 1.4.3; emacs 26.3 From: Ken Mankoff To: emacs-orgmode@gnu.org Subject: patch: ob-screen: don't change user-specified session name [9.3.7 (9.3.7-12-g5d6868-elpaplus @ /home/kdm/.emacs.d/elpa/org-plus-contrib-20200706/)] Date: Thu, 09 Jul 2020 09:14:27 -0700 Message-ID: <874kqgsm1o.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=mankoff@gmail.com; helo=mail-pg1-x532.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=N11zTcqk; dmarc=pass (policy=none) header.from=gmail.com; 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-Spam-Score: -1.71 X-TUID: gvMvY0miUHKa ob-screen prepends "org-babel-session-" to the user-specific screen name for some reason. I suggest this is not necessary nor optimal. One of the key points of 'screen' is that you can detach and attach from elsewhere. The name of the session is an important part of this process, and changing the user-chosen name complicates this. I note that in the other babel :session names I use (shell, Python, jupyter-python, etc.) the :session name is not modified. -k. diff --git a/lisp/ob-screen.el b/lisp/ob-screen.el index 75a2dc691..685961a7e 100644 --- a/lisp/ob-screen.el +++ b/lisp/ob-screen.el @@ -62,8 +62,7 @@ In case you want to use a different screen than one selected by your $PATH") (process-name (concat "org-babel: terminal (" session ")"))) (apply 'start-process process-name "*Messages*" terminal `("-T" ,(concat "org-babel: " session) "-e" ,org-babel-screen-location - "-c" "/dev/null" "-mS" ,(concat "org-babel-session-" session) - ,cmd)) + "-c" "/dev/null" "-mS" ,session ,cmd)) ;; XXX: Is there a better way than the following? (while (not (org-babel-screen-session-socketname session)) ;; wait until screen session is available before returning @@ -97,8 +96,7 @@ In case you want to use a different screen than one selected by your $PATH") nil (mapcar (lambda (x) - (when (string-match - (concat "org-babel-session-" session) x) + (when (string-match session x) x)) sockets))))) (when match-socket (car (split-string match-socket)))))