* 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/)]
@ 2020-07-09 16:38 Ken Mankoff
2020-07-15 3:09 ` Kyle Meyer
0 siblings, 1 reply; 2+ messages in thread
From: Ken Mankoff @ 2020-07-09 16:38 UTC (permalink / raw)
To: emacs-orgmode
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))
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: 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/)]
2020-07-09 16:38 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/)] Ken Mankoff
@ 2020-07-15 3:09 ` Kyle Meyer
0 siblings, 0 replies; 2+ messages in thread
From: Kyle Meyer @ 2020-07-15 3:09 UTC (permalink / raw)
To: Ken Mankoff, emacs-orgmode
Ken Mankoff writes:
> 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.
For posterity: This patch was included in a set of patches at
<https://orgmode.org/list/87h7u93j8b.fsf@gmail.com>.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-15 3:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-09 16:38 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/)] Ken Mankoff
2020-07-15 3:09 ` Kyle Meyer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).