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.
This commit is contained in:
Kyle Meyer 2020-07-15 23:28:00 -04:00
parent 0ab117bc57
commit 454131d228
1 changed files with 2 additions and 2 deletions

View File

@ -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)))))