all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mathieu Lirzin <mthl@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 30147-done@debbugs.gnu.org
Subject: [bug#30147] Simplify “scripts/guix”
Date: Wed, 24 Jan 2018 12:45:16 +0100	[thread overview]
Message-ID: <87efmf32gj.fsf@gnu.org> (raw)
In-Reply-To: <87bmhk7jxq.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 23 Jan 2018 15:01:53 +0100")

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

Hello again,

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

> Mathieu Lirzin <mthl@gnu.org> skribis:
>
>> From 77379bbf2642762927c01cc7f10eb5761626f172 Mon Sep 17 00:00:00 2001
>> From: Mathieu Lirzin <mthl@gnu.org>
>> Date: Tue, 23 Jan 2018 12:52:33 +0100
>> Subject: [PATCH] guix: Refactor script.
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=UTF-8
>> Content-Transfer-Encoding: 8bit
>>
>> * scripts/guix.in: Remove empty surrounding ‘let’.  Define 'main' as the
>> procedure called when running the script.
>> (maybe-augment-load-paths!): Rename to ...
>> (augment-load-paths!): ... this.  Use 'and=>' for 'file-exists?'.
>> (run-guix-main): Rename to ...
>> (main): ... this.  Call 'augment-load-paths!'.
>
> Works for me.  Applied and pushed, thanks!

Thanks for applying this.

I didn't notice that Emacs stopped setting ‘scheme-mode’ automatically
due to the extra line implied by the use of the Guile meta switch.

Here is a fix to please Emacs.


[-- Attachment #2: 0001-guix-Let-Emacs-detect-scripts-guix.in-appropriate-mo.patch --]
[-- Type: text/x-patch, Size: 1265 bytes --]

From a798d6b7fa3b71faf85b4d415de99abccbfe7aab Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl@gnu.org>
Date: Wed, 24 Jan 2018 12:29:17 +0100
Subject: [PATCH] =?UTF-8?q?guix:=20Let=20Emacs=20detect=20=E2=80=9Cscripts?=
 =?UTF-8?q?/guix.in=E2=80=9D=20appropriate=20mode.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Since commit 6f774d481839f87178c5895ac2d661e141f879b8 which introduces the use
of Guile's meta switch in “scripts/guix.in”, Emacs was not using ‘scheme-mode’
for this file.

* scripts/guix.in: Replace "-*- scheme -*-" with a local variable.
---
 scripts/guix.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/guix.in b/scripts/guix.in
index e0f0ae7e0..d1c12eae5 100644
--- a/scripts/guix.in
+++ b/scripts/guix.in
@@ -1,6 +1,5 @@
 #!@GUILE@ \
 --no-auto-compile -e main -s
--*- scheme -*-
 !#
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
@@ -57,3 +56,7 @@
     ;; but since the 'guix' command is not updated by 'guix pull', we cannot
     ;; really do it now.
     (apply guix-main args)))
+
+;;; Local Variables:
+;;; mode: scheme
+;;; End:
-- 
2.16.0


[-- Attachment #3: Type: text/plain, Size: 97 bytes --]


Sorry for the mess.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37

  reply	other threads:[~2018-01-24 11:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 19:25 [bug#30147] Simplify “scripts/guix” Mathieu Lirzin
2018-01-22 18:19 ` Eric Bavier
2018-01-23 11:06   ` Mathieu Lirzin
2018-01-23  9:13 ` bug#30147: " Ludovic Courtès
2018-01-23 12:29   ` [bug#30147] " Mathieu Lirzin
2018-01-23 14:01     ` Ludovic Courtès
2018-01-24 11:45       ` Mathieu Lirzin [this message]
2018-01-24 13:46         ` Ludovic Courtès

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

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

  git send-email \
    --in-reply-to=87efmf32gj.fsf@gnu.org \
    --to=mthl@gnu.org \
    --cc=30147-done@debbugs.gnu.org \
    --cc=ludo@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.