Ver Fonte

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.
Kyle Meyer há 4 anos atrás
pai
commit
454131d228
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      lisp/ob-screen.el

+ 2 - 2
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)))))