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 6KlzBExIB1+LXwAA0tVLHw (envelope-from ) for ; Thu, 09 Jul 2020 16:39:40 +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 yOI2AExIB185ewAAbx9fmQ (envelope-from ) for ; Thu, 09 Jul 2020 16:39:40 +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 796BC9401D0 for ; Thu, 9 Jul 2020 16:39:37 +0000 (UTC) Received: from localhost ([::1]:46884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtZaB-0002lR-7Y for larch@yhetil.org; Thu, 09 Jul 2020 12:39:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtZZ0-0001tR-0w for emacs-orgmode@gnu.org; Thu, 09 Jul 2020 12:38:22 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:37659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtZYy-0006Zs-GS for emacs-orgmode@gnu.org; Thu, 09 Jul 2020 12:38:21 -0400 Received: by mail-pl1-x629.google.com with SMTP id p1so1055267pls.4 for ; Thu, 09 Jul 2020 09:38:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:message-id:date:mime-version; bh=R4uRpMu4xwVmWzRX4ZEMgj9SHympNj1oKRBbKQyZP6M=; b=MCP2UTZAofX4DJI1k0KlNgB/2O+fzhlzQRYqqXYfPBkuPcyCGWpkMFlyH7p8bVyPjn TtmtehjzNgzdQW+XnDKFwgnajZdJcQHnqTVlvdgsFq+CHuLiULT7VKeJjz3SX4aHKuTz pCozWF72HIYFzNejVt0ba06hhW574MggYOzvMnVQ4wBktY4rgGbo0Rhgkev/cbI79YZn rN/wskVcNk0rKeqCvQD0eAJwV7U2M/XD+MoBMWZ6GbgVTBFjgdoE0k0T02skicCWZUB2 xu6N8gPZeEKHhp2mgjo9qt2vjt42UHhgT6GbzSPWY3MM82ScnND+Ik/3htV//FqLufw4 Sv2w== 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:message-id:date :mime-version; bh=R4uRpMu4xwVmWzRX4ZEMgj9SHympNj1oKRBbKQyZP6M=; b=jlFI+0VUbmguNlgZpnqUEUB0SSBis6qaPOsedXw1O4sDw6e6+2L+IvfZHZGGJIMyKQ E9n8lzsqrpScRYanSBntKx0XpFk7/eXqE+bDp3J6Id92H7LEZ2XOdPmvQtqy7FZ7G1if AhF7QMhztIuD0rjEp+ezWasX5Fu5W0wIK+CFr8eCZ21hd1gQCLhby123ZDxPX2y7OP28 U6RwI0PcByXw1wirfytBjxzIGYxyFxW6Zv6TC2WeyyRyi9kaOM0pbCIQXgQN/3phM5iI dVD2JsjogaSDYmWB8ENN4bbUh1nJyqst9k8AA/FjWU6dsLXKC4Tu8f7n+gqi7jeeIbkH UKpA== X-Gm-Message-State: AOAM532v8gfv+wYiO18dCyu77OSeC79vWz4lWat8sGNoCcRgTQunQ1vc grokC5IMZ4M/EhVw7ML+pcrH33An X-Google-Smtp-Source: ABdhPJxYULpzxRpWn6qPwqWQc0gFUCX2+vrlBeACKnJm9it+24czp8fRTqeonmMXgw0rlfh3SCGslQ== X-Received: by 2002:a17:902:c389:: with SMTP id g9mr53205504plg.317.1594312698742; Thu, 09 Jul 2020 09:38:18 -0700 (PDT) Received: from geus3064linuxwsm (97-126-92-2.tukw.qwest.net. [97.126.92.2]) by smtp.gmail.com with ESMTPSA id q20sm3413067pfn.111.2020.07.09.09.38.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2020 09:38:18 -0700 (PDT) User-agent: mu4e 1.4.3; emacs 26.3 From: Ken Mankoff To: emacs-orgmode@gnu.org Subject: patch: ob-screen support for user-specified screenrc [9.3.7 (9.3.7-12-g5d6868-elpaplus @ /home/kdm/.emacs.d/elpa/org-plus-contrib-20200706/)] Message-ID: <87sge07igo.fsf@gmail.com> Date: Thu, 09 Jul 2020 09:38:15 -0700 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=mankoff@gmail.com; helo=mail-pl1-x629.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=MCP2UTZA; 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: RdDED5xO6BdF Last ob-screen patch. I apologize if these should have been one email but they are there independent issues. This patch maintains the default behavior of no screenrc "-c /dev/null", but adds a :screenrc header arg that allows the user to specify their default or any file to be used as a screenrc file. -k. diff --git a/lisp/ob-screen.el b/lisp/ob-screen.el index 75a2dc691..3769a767d 100644 --- a/lisp/ob-screen.el +++ b/lisp/ob-screen.el @@ -29,6 +29,8 @@ ;; Adding :cmd and :terminal as header arguments ;; :terminal must support the -T (title) and -e (command) parameter ;; +;; Adding :screenrc as header arguments. Defaults to /dev/null. +;; ;; You can test the default setup. (xterm + sh) with ;; M-x org-babel-screen-test RET @@ -40,7 +42,7 @@ In case you want to use a different screen than one selected by your $PATH") (defvar org-babel-default-header-args:screen - '((:results . "silent") (:session . "default") (:cmd . "sh") (:terminal . "xterm")) + '((:results . "silent") (:session . "default") (:cmd . "sh") (:terminal . "xterm") (:screenrc . "/dev/null")) "Default arguments to use when running screen source blocks.") (defun org-babel-execute:screen (body params) @@ -59,10 +61,11 @@ In case you want to use a different screen than one selected by your $PATH") (let* ((session (cdr (assq :session params))) (cmd (cdr (assq :cmd params))) (terminal (cdr (assq :terminal params))) + (screenrc (cdr (assq :screenrc params))) (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) + "-c" ,screenrc "-mS" ,(concat "org-babel-session-" session) ,cmd)) ;; XXX: Is there a better way than the following? (while (not (org-babel-screen-session-socketname session))