unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Add Emacs without GTK
@ 2014-07-29  8:00 Taylan Ulrich Bayirli/Kammer
  2014-08-11 16:42 ` Ludovic Courtès
  2014-08-11 16:43 ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Taylan Ulrich Bayirli/Kammer @ 2014-07-29  8:00 UTC (permalink / raw)
  To: guix-devel

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 <taylanbayirli@gmail.com>
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))))))
+
 \f
 ;;;
 ;;; Emacs hacking.
-- 
1.8.4

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Add Emacs without GTK
  2014-07-29  8:00 Add Emacs without GTK Taylan Ulrich Bayirli/Kammer
@ 2014-08-11 16:42 ` Ludovic Courtès
  2014-08-11 16:43 ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2014-08-11 16:42 UTC (permalink / raw)
  To: Taylan Ulrich Bayirli/Kammer; +Cc: guix-devel

Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com> skribis:

> From eb8b480c810322f8f986fc7cdb230f57e269a8c6 Mon Sep 17 00:00:00 2001
> From: Taylan Ulrich B <taylanbayirli@gmail.com>
> 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.

LGTM, and a good idea.

> +(define-public emacs-no-x-toolkit
> +  (package (inherit emacs)
> +    (name "emacs-no-x-toolkit")

I’d prefer ‘emacs-no-x’, WDYT?

(ISTR Debian calls it ‘emacs-nox’, FWIW.)

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Add Emacs without GTK
  2014-07-29  8:00 Add Emacs without GTK Taylan Ulrich Bayirli/Kammer
  2014-08-11 16:42 ` Ludovic Courtès
@ 2014-08-11 16:43 ` Ludovic Courtès
  2014-08-11 19:09   ` Taylan Ulrich Bayirli/Kammer
  1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2014-08-11 16:43 UTC (permalink / raw)
  To: Taylan Ulrich Bayirli/Kammer; +Cc: guix-devel

Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com> skribis:

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

Also please add a ‘synopsis’ that says “without X Window support”, as
done in qemu.scm.

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Add Emacs without GTK
  2014-08-11 16:43 ` Ludovic Courtès
@ 2014-08-11 19:09   ` Taylan Ulrich Bayirli/Kammer
  2014-08-11 20:35     ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Taylan Ulrich Bayirli/Kammer @ 2014-08-11 19:09 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com> skribis:
>
>> +(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))))))
>
> Also please add a ‘synopsis’ that says “without X Window support”, as
> done in qemu.scm.
>
> Ludo’.

It's not without X, just without a toolkit. :)

Taylan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Add Emacs without GTK
  2014-08-11 19:09   ` Taylan Ulrich Bayirli/Kammer
@ 2014-08-11 20:35     ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2014-08-11 20:35 UTC (permalink / raw)
  To: Taylan Ulrich Bayirli/Kammer; +Cc: guix-devel

Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com> skribis:
>>
>>> +(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))))))
>>
>> Also please add a ‘synopsis’ that says “without X Window support”, as
>> done in qemu.scm.
>>
>> Ludo’.
>
> It's not without X, just without a toolkit. :)

Ah OK, didn’t know that was possible.

I’ve applied the patch with a synopsis and a copyright line.

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-11 20:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-29  8:00 Add Emacs without GTK Taylan Ulrich Bayirli/Kammer
2014-08-11 16:42 ` Ludovic Courtès
2014-08-11 16:43 ` Ludovic Courtès
2014-08-11 19:09   ` Taylan Ulrich Bayirli/Kammer
2014-08-11 20:35     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).