diff options
author | Kyle Meyer <kyle@kyleam.com> | 2020-07-15 23:28:00 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2020-07-15 23:28:00 -0400 |
commit | 454131d22801a483b13a1b4442ddd67acf9aa458 (patch) | |
tree | 8785938dc25f5cd8163703b5397db1703cb21464 | |
parent | 0ab117bc57f26ccbd482fc3112a9321b189ed22b (diff) | |
download | org-mode-454131d22801a483b13a1b4442ddd67acf9aa458.tar.gz |
ob-screen: Quote session name before passing to string-match
* lisp/ob-screen.el (org-babel-screen-session-socketname): Quote
session name before giving it to string-match because the name may
have regexp characters.
While touching the line, make two cosmetic tweaks.
-rw-r--r-- | lisp/ob-screen.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ob-screen.el b/lisp/ob-screen.el index 193a7a2..8f96628 100644 --- a/lisp/ob-screen.el +++ b/lisp/ob-screen.el @@ -98,8 +98,8 @@ In case you want to use a different screen than one selected by your $PATH") nil (mapcar (lambda (x) - (when (string-match session x) - x)) + (and (string-match-p (regexp-quote session) x) + x)) sockets))))) (when match-socket (car (split-string match-socket))))) |