Add xelb non-posix shell patch

This commit is contained in:
adisbladis 2018-12-28 17:36:00 +00:00
parent 92b2550b69
commit 1b2aea39fc
No known key found for this signature in database
GPG key ID: ED58F95069B004F5
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,30 @@
From 407cce8dd8b0e621449c6c3015c303539f53819b Mon Sep 17 00:00:00 2001
From: adisbladis <adisbladis@gmail.com>
Date: Fri, 28 Dec 2018 16:54:34 +0000
Subject: [PATCH] Fix startup using non-posix shells
* xcb.el (xcb:create-auth-info): Use lisp for string substitution instead of shell
---
xcb.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/xcb.el b/xcb.el
index 7ed2d3e..a769d2f 100644
--- a/xcb.el
+++ b/xcb.el
@@ -147,7 +147,11 @@
(defun xcb:create-auth-info ()
"Create the default `auth-info'."
(let ((xauth-output (shell-command-to-string
- "xauth list ${DISPLAY#localhost} 2>/dev/null"))
+ (concat
+ "xauth list "
+ (replace-regexp-in-string "^localhost" ""
+ (getenv "DISPLAY"))
+ " 2>/dev/null")))
(name "MIT-MAGIC-COOKIE-1") ;only support MIT-MAGIC-COOKIE-1 protocol.
(data ""))
(if (string= "" xauth-output)
--
2.19.2

View file

@ -33,6 +33,8 @@ in {
packageRequires = [ cl-generic super.emacs ];
src = mkSrc "xelb";
patches = [ ./0001-Fix-startup-using-non-posix-shells.patch ];
};
in {
exwm = melpaBuild {