unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: emacs: Install site-start.el in non-versioned directory.
@ 2016-07-21 17:28 Alex Kost
  2016-07-24  5:06 ` Ricardo Wurmus
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Kost @ 2016-07-21 17:28 UTC (permalink / raw)
  To: guix-devel

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

Ricardo tested Emacs 25 with this package definition:
<http://paste.lisp.org/display/320941> and noticed that it doesn't find
Emacs packages in ~/.guix-profile.

This happens because "site-start.el" in the inherited package is placed
"/share/emacs/24.5/site-lisp" directory (the version part is wrong).  To
avod this, we can put "site-start.el" into a non-versioned site-lisp
directory.  The patch is attached.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-emacs-Install-site-start.el-in-non-versioned-dir.patch --]
[-- Type: text/x-patch, Size: 1337 bytes --]

From 5907c4768bdba861e1c30b1cb5f0a73fe33f9600 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Thu, 21 Jul 2016 20:13:27 +0300
Subject: [PATCH] gnu: emacs: Install site-start.el in non-versioned directory.

Reported by Ricardo Wurmus on #guix.

* gnu/packages/emacs.scm (emacs)[arguments]: Put "site-start.el" in
"/share/emacs/site-lisp" instead of "/share/emacs/<version>/site-lisp"
to let inherited package with another version find it.
---
 gnu/packages/emacs.scm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 3fcf121..eed64f4 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -125,9 +125,7 @@
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((guix-src (assoc-ref inputs "guix-src"))
                     (out      (assoc-ref outputs "out"))
-                    (lisp-dir (string-append out "/share/emacs/"
-                                             ,(version-major+minor version)
-                                             "/site-lisp"))
+                    (lisp-dir (string-append out "/share/emacs/site-lisp"))
                     (unpack   (assoc-ref %standard-phases 'unpack)))
                (mkdir "guix")
                (with-directory-excursion "guix"
-- 
2.8.3


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

* Re: [PATCH] gnu: emacs: Install site-start.el in non-versioned directory.
  2016-07-21 17:28 [PATCH] gnu: emacs: Install site-start.el in non-versioned directory Alex Kost
@ 2016-07-24  5:06 ` Ricardo Wurmus
  2016-07-24  6:16   ` Alex Kost
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2016-07-24  5:06 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel


Alex Kost <alezost@gmail.com> writes:

> Ricardo tested Emacs 25 with this package definition:
> <http://paste.lisp.org/display/320941> and noticed that it doesn't find
> Emacs packages in ~/.guix-profile.
>
> This happens because "site-start.el" in the inherited package is placed
> "/share/emacs/24.5/site-lisp" directory (the version part is wrong).  To
> avod this, we can put "site-start.el" into a non-versioned site-lisp
> directory.  The patch is attached.

Thank you, Alex.

As far as I understand, the generated “site-start.el” file is
version-agnostic, so I think this is the right approach.

(I haven’t yet found the time to actually test your patch with my Emacs
25 package.)

~~ Ricardo

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

* Re: [PATCH] gnu: emacs: Install site-start.el in non-versioned directory.
  2016-07-24  5:06 ` Ricardo Wurmus
@ 2016-07-24  6:16   ` Alex Kost
  2016-07-25 14:24     ` Alex Kost
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Kost @ 2016-07-24  6:16 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus (2016-07-24 08:06 +0300) wrote:

> Alex Kost <alezost@gmail.com> writes:
>
>> Ricardo tested Emacs 25 with this package definition:
>> <http://paste.lisp.org/display/320941> and noticed that it doesn't find
>> Emacs packages in ~/.guix-profile.
>>
>> This happens because "site-start.el" in the inherited package is placed
>> "/share/emacs/24.5/site-lisp" directory (the version part is wrong).  To
>> avod this, we can put "site-start.el" into a non-versioned site-lisp
>> directory.  The patch is attached.
>
> Thank you, Alex.
>
> As far as I understand, the generated “site-start.el” file is
> version-agnostic, so I think this is the right approach.

Yes, the code to find guix packages doesn't care about Emacs version.

> (I haven’t yet found the time to actually test your patch with my Emacs
> 25 package.)

I tested it :-)  So I'm going to commit it soon.

-- 
Alex

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

* Re: [PATCH] gnu: emacs: Install site-start.el in non-versioned directory.
  2016-07-24  6:16   ` Alex Kost
@ 2016-07-25 14:24     ` Alex Kost
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Kost @ 2016-07-25 14:24 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Alex Kost (2016-07-24 09:16 +0300) wrote:

> Ricardo Wurmus (2016-07-24 08:06 +0300) wrote:
>
>> Alex Kost <alezost@gmail.com> writes:
>>
>>> Ricardo tested Emacs 25 with this package definition:
>>> <http://paste.lisp.org/display/320941> and noticed that it doesn't find
>>> Emacs packages in ~/.guix-profile.
>>>
>>> This happens because "site-start.el" in the inherited package is placed
>>> "/share/emacs/24.5/site-lisp" directory (the version part is wrong).  To
>>> avod this, we can put "site-start.el" into a non-versioned site-lisp
>>> directory.  The patch is attached.
>>
>> Thank you, Alex.
>>
>> As far as I understand, the generated “site-start.el” file is
>> version-agnostic, so I think this is the right approach.
>
> Yes, the code to find guix packages doesn't care about Emacs version.
>
>> (I haven’t yet found the time to actually test your patch with my Emacs
>> 25 package.)
>
> I tested it :-)  So I'm going to commit it soon.

Committed as c48899e.

-- 
Alex

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

end of thread, other threads:[~2016-07-25 14:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-21 17:28 [PATCH] gnu: emacs: Install site-start.el in non-versioned directory Alex Kost
2016-07-24  5:06 ` Ricardo Wurmus
2016-07-24  6:16   ` Alex Kost
2016-07-25 14:24     ` Alex Kost

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).