unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Lirzin <mthl@openmailbox.org>
To: Alex Kost <alezost@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 3/4] emacs: Move guix-guile-program to 'guix-config'.
Date: Thu, 06 Aug 2015 19:55:28 +0200	[thread overview]
Message-ID: <87a8u4z4hb.fsf@openmailbox.org> (raw)
In-Reply-To: <87oaivl5ro.fsf@gmail.com> (Alex Kost's message of "Wed, 29 Jul 2015 11:36:27 +0300")

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

Alex Kost <alezost@gmail.com> writes:

> The potential problem with 'defconst', is that it overrides the
> current value if it already exists.  [...] That's why I think it is
> better to use 'defvar' for 'guix-guile-program'.

Done. Otherwise I've renamed this patch to better describe the intention.

--
Mathieu Lirzin


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-emacs-Fix-guix-guile-program-default-value.patch --]
[-- Type: text/x-diff, Size: 1992 bytes --]

From 07deba1e666befaedf1367f388fb7a16c6f992e7 Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl@openmailbox.org>
Date: Mon, 27 Jul 2015 22:55:28 +0200
Subject: [PATCH 2/3] emacs: Fix guix-guile-program default value.

* emacs/guix-backend.el: Use guix-config.
  (guix-guile-program): Move to ...
* emacs/guix-config.el.in (guix-guile-program): ... here.  Use Guile
  program file name from compile-time instead of depending on
  PATH.  (Bug#21127)
---
 emacs/guix-backend.el   | 10 +---------
 emacs/guix-config.el.in |  9 +++++++++
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/emacs/guix-backend.el b/emacs/guix-backend.el
index 73a429b..3fafae4 100644
--- a/emacs/guix-backend.el
+++ b/emacs/guix-backend.el
@@ -52,6 +52,7 @@
 ;;; Code:
 
 (require 'geiser-mode)
+(require 'guix-config)
 (require 'guix-emacs)
 
 (defvar guix-load-path
@@ -63,15 +64,6 @@
   (expand-file-name "guix-helper.scm" guix-load-path)
   "Auxiliary scheme file for loading.")
 
-(defvar guix-guile-program (or geiser-guile-binary "guile")
-  "Name of the guile executable used for Guix REPL.
-May be either a string (the name of the executable) or a list of
-strings of the form:
-
-  (NAME . ARGS)
-
-Where ARGS is a list of arguments to the guile program.")
-
 \f
 ;;; REPL
 
diff --git a/emacs/guix-config.el.in b/emacs/guix-config.el.in
index 8804f72..0ab97e2 100644
--- a/emacs/guix-config.el.in
+++ b/emacs/guix-config.el.in
@@ -22,6 +22,15 @@
 (defconst guix-emacs-interface-directory
   (replace-regexp-in-string "${prefix}" "@prefix@" "@emacsuidir@"))
 
+(defvar guix-guile-program "@GUILE@"
+  "Name of the guile executable used for Guix REPL.
+May be either a string (the name of the executable) or a list of
+strings of the form:
+
+  (NAME . ARGS)
+
+Where ARGS is a list of arguments to the guile program.")
+
 (defconst guix-state-directory
   ;; This must match `NIX_STATE_DIR' as defined in `daemon.am'.
   (or (getenv "NIX_STATE_DIR") "@guix_localstatedir@/guix"))
-- 
2.1.4


  reply	other threads:[~2015-08-06 17:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27 21:48 [PATCH 0/4] Emacs Interface build system Mathieu Lirzin
2015-07-27 21:48 ` [PATCH 1/4] build: Add more variables to (guix config) Mathieu Lirzin
2015-07-29  8:35   ` Alex Kost
2015-08-06 17:38     ` Mathieu Lirzin
2015-08-18 15:15   ` Ludovic Courtès
2015-08-25 21:14     ` Mathieu Lirzin
2015-07-27 21:48 ` [PATCH 2/4] build: Produce 'guix-config' instead of using compile-time tricks Mathieu Lirzin
2015-07-27 21:56   ` Mathieu Lirzin
2015-07-29  8:35   ` Alex Kost
2015-08-06 17:50     ` Mathieu Lirzin
2015-08-13  8:04       ` Alex Kost
2015-08-25 21:16         ` Mathieu Lirzin
2015-08-26 10:51           ` Alex Kost
2015-08-30 17:55             ` Mathieu Lirzin
2015-08-30 19:03               ` Alex Kost
2015-07-27 21:48 ` [PATCH 3/4] emacs: Move guix-guile-program to 'guix-config' Mathieu Lirzin
2015-07-29  8:36   ` Alex Kost
2015-08-06 17:55     ` Mathieu Lirzin [this message]
2015-08-07  7:21       ` Alex Kost
2015-08-25 21:18         ` Mathieu Lirzin
2015-08-30 17:32           ` Ludovic Courtès
2015-08-30 19:03             ` Alex Kost
2015-08-30 20:54               ` Mathieu Lirzin
2015-07-27 21:48 ` [PATCH 4/4] emacs: Use only one guix-load-path variable Mathieu Lirzin
2015-07-29  8:36   ` Alex Kost
2015-08-06 17:58     ` Mathieu Lirzin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a8u4z4hb.fsf@openmailbox.org \
    --to=mthl@openmailbox.org \
    --cc=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).