guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Add Emacs without GTK


From: Taylan Ulrich Bayirli/Kammer
Subject: Add Emacs without GTK
Date: Tue, 29 Jul 2014 10:00:56 +0200

When using GTK, killing the X server will kill an Emacs daemon even if
all frames of it have been closed.

So here's a package inheriting from the default Emacs, taking out GTK
and passing its ./configure script the argument "--with-x-toolkit=no".
(If this isn't done explicitly and it can't find any toolkit, it will
complain.)

Note that this doesn't mean "no X", just no toolkit; this makes scroll
bars, tool bars, menus etc. ugly.  (I think most seasoned users
disable those anyway.)

AFAIK Lucid AKA Athena AKA Xaw isn't much prettier than no toolkit
either but if someone knows of advantages of Xaw or another supported
toolkit over no toolkit, say so.

Also say if you have a better idea for the package name than
"emacs-no-x-toolkit".


===File
/home/tub/media/src/guix/0001-gnu-Add-emacs-no-x-toolkit.patch===
>From eb8b480c810322f8f986fc7cdb230f57e269a8c6 Mon Sep 17 00:00:00 2001
From: Taylan Ulrich B <address@hidden>
Date: Mon, 28 Jul 2014 22:26:59 +0200
Subject: [PATCH] gnu: Add emacs-no-x-toolkit.

* gnu/packages/emacs.scm (emacs-no-x-toolkit): New variable.
---
 gnu/packages/emacs.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index af8772e..2ed9e7b 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -36,7 +36,9 @@
   #:use-module ((gnu packages compression)
                 #:renamer (symbol-prefix-proc 'compression:))
   #:use-module (gnu packages xml)
-  #:use-module (gnu packages glib))
+  #:use-module (gnu packages glib)
+  #:use-module (guix utils)
+  #:use-module (srfi srfi-1))
 
 (define-public emacs
   (package
@@ -102,6 +104,15 @@ large Lisp programs.  It has full Unicode support for 
nearly all human
 languages.")
     (license gpl3+)))
 
+(define-public emacs-no-x-toolkit
+  (package (inherit emacs)
+    (name "emacs-no-x-toolkit")
+    (inputs (alist-delete "gtk+" (package-inputs emacs)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments emacs)
+       ((#:configure-flags flags)
+        `(cons "--with-x-toolkit=no" ,flags))))))
+
 
 ;;;
 ;;; Emacs hacking.
-- 
1.8.4

============================================================



reply via email to

[Prev in Thread] Current Thread [Next in Thread]