all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#38463] [PATCH] Telega test suite and change in revision
@ 2019-12-02 21:33 Brett Gilio
  2019-12-02 21:34 ` [bug#38463] [PATCH 1/2] gnu: emacs-telega: Use test suites Brett Gilio
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Brett Gilio @ 2019-12-02 21:33 UTC (permalink / raw)
  To: 38463


Hi all, the following patches modify the emacs-telega package to
carefully use the ert and server test suites it has, and also includes
an increase in the revision to use a newer commit. Let me know what you think!

-- 
Brett M. Gilio
https://git.sr.ht/~brettgilio/

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

* [bug#38463] [PATCH 1/2] gnu: emacs-telega: Use test suites.
  2019-12-02 21:33 [bug#38463] [PATCH] Telega test suite and change in revision Brett Gilio
@ 2019-12-02 21:34 ` Brett Gilio
  2019-12-02 21:35 ` [bug#38463] [PATCH 2/2] gnu: emacs-telega: Update to 0.4.4-2 Brett Gilio
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Brett Gilio @ 2019-12-02 21:34 UTC (permalink / raw)
  To: 38463

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


-- 
Brett M. Gilio
https://git.sr.ht/~brettgilio/

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH 1/2] gnu: emacs-telega: Use test suites. --]
[-- Type: text/x-patch, Size: 3759 bytes --]

From 03a2617b29c92dc83828495305d73ec4074a5102 Mon Sep 17 00:00:00 2001
From: Brett Gilio <brettg@posteo.net>
Date: Mon, 2 Dec 2019 15:26:27 -0600
Subject: [PATCH 1/2] gnu: emacs-telega: Use test suites.

* gnu/packages/emacs-xyz.scm (emacs-telega)[arguments]: Adds support for
  running the ert and server test suites.
---
 gnu/packages/emacs-xyz.scm | 39 +++++++++++++++++++++++++++++++++-----
 1 file changed, 34 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 8efa4a17c8..ad78209ebb 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -19974,7 +19974,7 @@ fish-completion.  It can be used in both Eshell and M-x shell.")
          (file-name (git-file-name name version))))
       (build-system gnu-build-system)
       (arguments
-       `(#:tests? #f
+       `(#:test-target "test"
          #:modules ((guix build gnu-build-system)
                     ((guix build emacs-build-system) #:prefix emacs:)
                     (guix build utils)
@@ -19984,17 +19984,45 @@ fish-completion.  It can be used in both Eshell and M-x shell.")
                              (guix build emacs-utils))
          #:phases
          (modify-phases %standard-phases
-           (add-after 'unpack 'unpack-patch
+           (add-after 'unpack 'prefix-patch
              (lambda _
                (substitute* "server/Makefile"
                  (("CC=cc")
                   "CC=gcc")
                  (("INSTALL_PREFIX=\\$\\(HOME\\)/.telega")
                   (string-append "INSTALL_PREFIX=" (assoc-ref %outputs "out")
-                                 "/bin")))
+                                 "/bin"))
+                 ;; Manually invoke `run_tests.py` after install phase.
+                 (("python3 run_tests.py")
+                  ""))
+               #t))
+           ;; The telega test suite checks for a version of Emacs
+           ;; compiled with imagemagick and svg support. Since we
+           ;; are using `emacs-minimal`, this step will fail.
+           ;; Grok the failing test, and remove problematic assertions.
+           (add-after 'unpack 'ert-suite-patch
+             (lambda _
+               (substitute* "telega-core.el"
+                 (("\\(image-type-available-p 'imagemagick\\) nil")
+                  "t")
+                 (("\\(image-type-available-p 'svg\\) nil")
+                  "t"))
+               #t))
+           ;; The server test suite has a hardcoded path.
+           ;; Reset this behavior to use the proper path.
+           (add-after 'unpack 'server-suite-patch
+             (lambda _
+               (substitute* "server/run_tests.py"
+                 (("~/.telega/telega-server")
+                  (string-append (assoc-ref %outputs "out")
+                                 "/bin/telega-server")))
+               #t))
+           (add-after 'install 'run-server-suite
+             (lambda _
+               (invoke "python3" "server/run_tests.py")
                #t))
            (delete 'configure)
-
+           
            ;; Build emacs-side using `emacs-build-system'
            (add-after 'compress-documentation 'emacs-add-source-to-load-path
              (assoc-ref emacs:%standard-phases 'add-source-to-load-path))
@@ -20008,7 +20036,8 @@ fish-completion.  It can be used in both Eshell and M-x shell.")
        `(("emacs-visual-fill-column" ,emacs-visual-fill-column)))
       (native-inputs
        `(("tdlib" ,tdlib)
-         ("emacs" ,emacs-minimal)))
+         ("emacs" ,emacs-minimal)
+         ("python" ,python)))
       (synopsis "GNU Emacs client for the Telegram messenger")
       (description
        "Telega is full-featured, unofficial client for the Telegram messaging
-- 
2.24.0


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

* [bug#38463] [PATCH 2/2] gnu: emacs-telega: Update to 0.4.4-2
  2019-12-02 21:33 [bug#38463] [PATCH] Telega test suite and change in revision Brett Gilio
  2019-12-02 21:34 ` [bug#38463] [PATCH 1/2] gnu: emacs-telega: Use test suites Brett Gilio
@ 2019-12-02 21:35 ` Brett Gilio
  2019-12-05  0:36 ` [bug#38463] [PATCH] Telega test suite and change in revision Brett Gilio
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Brett Gilio @ 2019-12-02 21:35 UTC (permalink / raw)
  To: 38463

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


-- 
Brett M. Gilio
https://git.sr.ht/~brettgilio/

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH 2/2] gnu: emacs-telega: Update to 0.4.4-2 --]
[-- Type: text/x-patch, Size: 1399 bytes --]

From 04e417466dcd7e1a39ce69d04b9afc60c41bd603 Mon Sep 17 00:00:00 2001
From: Brett Gilio <brettg@posteo.net>
Date: Mon, 2 Dec 2019 15:28:39 -0600
Subject: [PATCH 2/2] gnu: emacs-telega: Update to 0.4.4-2

* gnu/packages/emacs-xyz.scm (emacs-telega): Bump the package to use a newer
  git revision, which includes additional client features.
---
 gnu/packages/emacs-xyz.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ad78209ebb..4fa5cafd8d 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -19956,8 +19956,8 @@ fish-completion.  It can be used in both Eshell and M-x shell.")
       (license license:gpl3+))))
 
 (define-public emacs-telega
-  (let ((commit "019e923f933370d75dbe0a8473a18eb66fe94c0e")
-	(revision "1")
+  (let ((commit "56aef884921d99e5170d5425dbe0fce645620511")
+	(revision "2")
 	(version "0.4.4"))
     (package
       (name "emacs-telega")
@@ -19970,7 +19970,7 @@ fish-completion.  It can be used in both Eshell and M-x shell.")
                (commit commit)))
          (sha256
           (base32
-           "058814agkq8mp9ajpj8sz51rm9nigs2xpsdij05wjkxhfq30kqva"))
+           "0a8k3j20nz4xwswg9qp9xpaakk3q3ibiz8mkryk92zmrdmaah5mi"))
          (file-name (git-file-name name version))))
       (build-system gnu-build-system)
       (arguments
-- 
2.24.0


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

* [bug#38463] [PATCH] Telega test suite and change in revision
  2019-12-02 21:33 [bug#38463] [PATCH] Telega test suite and change in revision Brett Gilio
  2019-12-02 21:34 ` [bug#38463] [PATCH 1/2] gnu: emacs-telega: Use test suites Brett Gilio
  2019-12-02 21:35 ` [bug#38463] [PATCH 2/2] gnu: emacs-telega: Update to 0.4.4-2 Brett Gilio
@ 2019-12-05  0:36 ` Brett Gilio
  2019-12-05 13:50 ` [bug#38463] [PATCH 3/3] gnu: emacs-telega: Properly install alists Brett Gilio
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Brett Gilio @ 2019-12-05  0:36 UTC (permalink / raw)
  To: 38463

Brett Gilio <brettg@posteo.net> writes:

> Hi all, the following patches modify the emacs-telega package to
> carefully use the ert and server test suites it has, and also includes
> an increase in the revision to use a newer commit. Let me know what
> you think!

Is there any critique of this patch? Sorry for pestering!

-- 
Brett M. Gilio
https://git.sr.ht/~brettgilio/

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

* [bug#38463] [PATCH 3/3] gnu: emacs-telega: Properly install alists.
  2019-12-02 21:33 [bug#38463] [PATCH] Telega test suite and change in revision Brett Gilio
                   ` (2 preceding siblings ...)
  2019-12-05  0:36 ` [bug#38463] [PATCH] Telega test suite and change in revision Brett Gilio
@ 2019-12-05 13:50 ` Brett Gilio
  2019-12-05 17:31 ` Leo Prikler
  2019-12-05 20:01 ` [bug#38463] [PATCH 3/3] gnu: emacs-telega: Install telega-data to site-lisp Brett Gilio
  5 siblings, 0 replies; 11+ messages in thread
From: Brett Gilio @ 2019-12-05 13:50 UTC (permalink / raw)
  To: 38463

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: [PATCH 3/3] gnu: emacs-telega: Properly install alists. --]
[-- Type: text/x-patch, Size: 2235 bytes --]

From 5b4430dce26b607cc0ebf443a33a3607a3b33eb1 Mon Sep 17 00:00:00 2001
From: Brett Gilio <brettg@posteo.net>
Date: Thu, 5 Dec 2019 07:48:30 -0600
Subject: [PATCH 3/3] gnu: emacs-telega: Properly install alists.

* gnu/packages/emacs-xyz.scm (emacs-telega)[arguments]: Telega has an etc
  directory that needs to be installed to emacs site-lisp dir. This patch adds
  that functionality.
---
 gnu/packages/emacs-xyz.scm | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 60d27ca3de..d5110e96da 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -20019,11 +20019,23 @@ fish-completion.  It can be used in both Eshell and M-x shell.")
            ;; Build emacs-side using `emacs-build-system'
            (add-after 'compress-documentation 'emacs-add-source-to-load-path
              (assoc-ref emacs:%standard-phases 'add-source-to-load-path))
-           (add-after 'emacs-set-emacs-load-path 'emacs-install
+           (add-after 'emacs-add-source-to-load-path 'emacs-install
              (assoc-ref emacs:%standard-phases 'install))
-           (add-after 'emacs-install 'emacs-build
+           ;; This step adds subdir /etc to the site-lisp dir
+           ;; which is needed for images, notification sounds,
+           ;; and various alists.
+           ;; TODO: Replace with `#:include' method used by
+           ;; emacs-build-system.
+           (add-after 'emacs-install 'emacs-install-etc
+             (lambda* (#:key outputs #:allow-other-keys)
+               (with-directory-excursion "."
+                 (invoke "cp" "-r" "etc/"
+                         (string-append (assoc-ref outputs "out")
+                                        "/share/emacs/site-lisp/")))
+               #t))
+           (add-after 'emacs-install-etc 'emacs-build
              (assoc-ref emacs:%standard-phases 'build))
-           (add-after 'emacs-install 'emacs-make-autoloads
+           (add-after 'emacs-build 'emacs-make-autoloads
              (assoc-ref emacs:%standard-phases 'make-autoloads)))))
       (propagated-inputs
        `(("emacs-visual-fill-column" ,emacs-visual-fill-column)))
-- 
2.24.0

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

* [bug#38463] [PATCH 3/3] gnu: emacs-telega: Properly install alists.
  2019-12-02 21:33 [bug#38463] [PATCH] Telega test suite and change in revision Brett Gilio
                   ` (3 preceding siblings ...)
  2019-12-05 13:50 ` [bug#38463] [PATCH 3/3] gnu: emacs-telega: Properly install alists Brett Gilio
@ 2019-12-05 17:31 ` Leo Prikler
  2019-12-05 18:00   ` Brett Gilio
  2019-12-05 20:01 ` [bug#38463] [PATCH 3/3] gnu: emacs-telega: Install telega-data to site-lisp Brett Gilio
  5 siblings, 1 reply; 11+ messages in thread
From: Leo Prikler @ 2019-12-05 17:31 UTC (permalink / raw)
  To: brettg; +Cc: 38463

Hi Brett,

Am Donnerstag, den 05.12.2019, 07:48 -0600 schrieb Brett Gilio
> * gnu/packages/emacs-xyz.scm (emacs-telega)[arguments]: Telega has an
> etc
>   directory that needs to be installed to emacs site-lisp dir. This
> patch adds
>   that functionality.

Out of curiosity, would it be possible to make this a subfolder of the
telega installation directory?  It appears, as though these files are
accessed via telega-etc-file in telega-util.el, so it should still
function in the same way with the right substitutions.

Regards,
Leo

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

* [bug#38463] [PATCH 3/3] gnu: emacs-telega: Properly install alists.
  2019-12-05 17:31 ` Leo Prikler
@ 2019-12-05 18:00   ` Brett Gilio
  2019-12-05 18:18     ` Leo Prikler
  0 siblings, 1 reply; 11+ messages in thread
From: Brett Gilio @ 2019-12-05 18:00 UTC (permalink / raw)
  To: Leo Prikler; +Cc: 38463

Leo Prikler <leo.prikler@student.tugraz.at> writes:

> Out of curiosity, would it be possible to make this a subfolder of the
> telega installation directory?  It appears, as though these files are
> accessed via telega-etc-file in telega-util.el, so it should still
> function in the same way with the right substitutions.
>
> Regards,
> Leo
>

Hi Leo,

I want to make sure I understand clearly what you are saying. The telega
installation directory seems to be just the
<profile>/share/emacs/site-lisp. What subdirectory are you speaking of
exactly? I will send a revised patch once I get some more information
:).

Thanks!

-- 
Brett M. Gilio
https://git.sr.ht/~brettgilio/

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

* [bug#38463] [PATCH 3/3] gnu: emacs-telega: Properly install alists.
  2019-12-05 18:00   ` Brett Gilio
@ 2019-12-05 18:18     ` Leo Prikler
  2019-12-05 18:46       ` Brett Gilio
  0 siblings, 1 reply; 11+ messages in thread
From: Leo Prikler @ 2019-12-05 18:18 UTC (permalink / raw)
  To: Brett Gilio; +Cc: 38463

Am Donnerstag, den 05.12.2019, 12:00 -0600 schrieb Brett Gilio:
> Leo Prikler <leo.prikler@student.tugraz.at> writes:
> 
> > Out of curiosity, would it be possible to make this a subfolder of
> > the
> > telega installation directory?  It appears, as though these files
> > are
> > accessed via telega-etc-file in telega-util.el, so it should still
> > function in the same way with the right substitutions.
> > 
> > Regards,
> > Leo
> > 
> 
> Hi Leo,
> 
> I want to make sure I understand clearly what you are saying. The
> telega
> installation directory seems to be just the
> <profile>/share/emacs/site-lisp. What subdirectory are you speaking
> of
> exactly? I will send a revised patch once I get some more information
> :).
> 
> Thanks!

Hi Brett,

That's my bad, I haven't looked at the structure of share/emacs/site-
lisp since the last change has been made.  I expected, that packages
still had their own folders, just with guix.d in the middle being
removed, but just now found out that everything is at top-level.

I still don't feel comfortable with data being at the top of site-lisp, 
though.  Perhaps something similar to emacs-yasnippet-snippets, where
you store the data in share/emacs/telega-data would be more
appropriate.

WDYT?
Leo

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

* [bug#38463] [PATCH 3/3] gnu: emacs-telega: Properly install alists.
  2019-12-05 18:18     ` Leo Prikler
@ 2019-12-05 18:46       ` Brett Gilio
  2019-12-05 22:55         ` Leo Prikler
  0 siblings, 1 reply; 11+ messages in thread
From: Brett Gilio @ 2019-12-05 18:46 UTC (permalink / raw)
  To: Leo Prikler; +Cc: 38463

Leo Prikler <leo.prikler@student.tugraz.at> writes:

>
> Hi Brett,
>
> That's my bad, I haven't looked at the structure of share/emacs/site-
> lisp since the last change has been made.  I expected, that packages
> still had their own folders, just with guix.d in the middle being
> removed, but just now found out that everything is at top-level.

I know how you feel. The recent changes has thrown me into a whirlpool
of confusion. That is why I made the note about eventually replacing the
installation of that directory to use the system usually used by
`emacs-build-system` because I figure this would cause less issues in
the future if for some reason the emacs site-lisp directory structure
were to change again.

--8<---------------cut here---------------start------------->8---
;; TODO: Replace with `#:include' method used by
;; emacs-build-system.
--8<---------------cut here---------------end--------------->8---

But I don't think it is a pressing issue to do it so cleanly.
Or maybe it is. Idk.


> I still don't feel comfortable with data being at the top of site-lisp, 
> though.  Perhaps something similar to emacs-yasnippet-snippets, where
> you store the data in share/emacs/telega-data would be more
> appropriate.

I was ACTUALLY going to do it this way originally, but I was really
uncertain of it so I just sent the patch as is. I like the idea more, so
I am going to revise the patch. Otherwise, once I get this revision in
everything should be good to go. I'll also substitute the functions to
reflect that changed path.

While I am at it, I want to do a shameless plug for Evgeny Zajcev who
has been supportive of me making additions to his repository to include
instructions on installing `telega` from Guix, including a local-build
`guix.scm`, adding a tag for Guix on the repo description, and adding an
issue label for Guix as well. If any of you are reading this and use
Telegram as a messaging client, join https://t.me/emacs_telega and give
him (@zevlg) and I (@brettmg) a hello. The work he has been doing has
been great, even though the build recipe for it for Guix is well over
100 LoC now. Ha.

Alright, carry on! Patch will be available soon.

-- 
Brett M. Gilio
https://git.sr.ht/~brettgilio/

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

* [bug#38463] [PATCH 3/3] gnu: emacs-telega: Install telega-data to site-lisp.
  2019-12-02 21:33 [bug#38463] [PATCH] Telega test suite and change in revision Brett Gilio
                   ` (4 preceding siblings ...)
  2019-12-05 17:31 ` Leo Prikler
@ 2019-12-05 20:01 ` Brett Gilio
  5 siblings, 0 replies; 11+ messages in thread
From: Brett Gilio @ 2019-12-05 20:01 UTC (permalink / raw)
  To: 38463

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


This patch is a reworked version of [PATCH 3/3] sent earlier in the
list. Thanks to Leo Prikler who I have marked as a co-author for their
help.

Everything should be good to merge now!

-- 
Brett M. Gilio
https://git.sr.ht/~brettgilio/



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH 3/3] gnu: emacs-telega: Install telega-data to site-lisp. --]
[-- Type: text/x-patch, Size: 3092 bytes --]

From 62ad3f8a8a62fddc4e83cdbc43d2701dcd476224 Mon Sep 17 00:00:00 2001
From: Brett Gilio <brettg@posteo.net>
Date: Thu, 5 Dec 2019 13:51:14 -0600
Subject: [PATCH 3/3] gnu: emacs-telega: Install telega-data to site-lisp.

* gnu/packages/emacs-xyz.scm (emacs-telega)[arguments]: This commit revises a
  previous patch and gives the source etc/ directory a unique installation pth
  in the site-lisp directory stucture.

Co-authored-by: Leo Prikler <leo.prikler@student.tugraz.at>
---
 gnu/packages/emacs-xyz.scm | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 60d27ca3de..1c0a5acc38 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -19989,6 +19989,13 @@ fish-completion.  It can be used in both Eshell and M-x shell.")
                  (("python3 run_tests.py")
                   ""))
                #t))
+           ;; Modify telega-util to reflect unique dir name in
+           ;; `telega-install-data' phase.
+           (add-after 'unpack 'telega-data-patch
+             (lambda _
+               (substitute* "telega-util.el"
+                 (("etc/") "telega-data/"))
+               #t))
            ;; The telega test suite checks for a version of Emacs
            ;; compiled with imagemagick and svg support. Since we
            ;; are using `emacs-minimal`, this step will fail.
@@ -20019,11 +20026,24 @@ fish-completion.  It can be used in both Eshell and M-x shell.")
            ;; Build emacs-side using `emacs-build-system'
            (add-after 'compress-documentation 'emacs-add-source-to-load-path
              (assoc-ref emacs:%standard-phases 'add-source-to-load-path))
-           (add-after 'emacs-set-emacs-load-path 'emacs-install
+           (add-after 'emacs-add-source-to-load-path 'emacs-install
              (assoc-ref emacs:%standard-phases 'install))
-           (add-after 'emacs-install 'emacs-build
+           ;; This step adds subdir /etc to the site-lisp dir and
+           ;; gives it a unique name which is needed for images,
+           ;; notification sounds, and various alists.
+           ;; TODO: Replace with `#:include' method used by
+           ;; emacs-build-system.
+           (add-after 'emacs-install 'telega-install-data
+             (lambda* (#:key outputs #:allow-other-keys)
+               (with-directory-excursion "."
+                 (invoke "cp" "-r" "etc/"
+                         (string-append (assoc-ref outputs "out")
+                                        "/share/emacs/site-lisp/"
+                                        "telega-data/")))
+               #t))
+           (add-after 'telega-install-data 'emacs-build
              (assoc-ref emacs:%standard-phases 'build))
-           (add-after 'emacs-install 'emacs-make-autoloads
+           (add-after 'emacs-build 'emacs-make-autoloads
              (assoc-ref emacs:%standard-phases 'make-autoloads)))))
       (propagated-inputs
        `(("emacs-visual-fill-column" ,emacs-visual-fill-column)))
-- 
2.24.0


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

* [bug#38463] [PATCH 3/3] gnu: emacs-telega: Properly install alists.
  2019-12-05 18:46       ` Brett Gilio
@ 2019-12-05 22:55         ` Leo Prikler
  0 siblings, 0 replies; 11+ messages in thread
From: Leo Prikler @ 2019-12-05 22:55 UTC (permalink / raw)
  To: Brett Gilio; +Cc: 38463

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

Am Donnerstag, den 05.12.2019, 12:46 -0600 schrieb Brett Gilio:
> That is why I made the note about eventually replacing the
> installation of that directory to use the system usually used by
> `emacs-build-system` because I figure this would cause less issues in
> the future if for some reason the emacs site-lisp directory structure
> were to change again.
> 
> --8<---------------cut here---------------start------------->8---
> ;; TODO: Replace with `#:include' method used by
> ;; emacs-build-system.
> --8<---------------cut here---------------end--------------->8---
> 
> But I don't think it is a pressing issue to do it so cleanly.
> Or maybe it is. Idk.
Perhaps you're right, but as far as I can see the Emacs build system
does not yet tell us how to proceed with data.  It also has a unique
way of handling documentation, first putting it into site-lisp before
moving it to share/info where it should belong.

> > I still don't feel comfortable with data being at the top of site-
> > lisp, 
> > though.  Perhaps something similar to emacs-yasnippet-snippets,
> > where
> > you store the data in share/emacs/telega-data would be more
> > appropriate.
> 
> I was ACTUALLY going to do it this way originally, but I was really
> uncertain of it so I just sent the patch as is. I like the idea more,
> so
> I am going to revise the patch. Otherwise, once I get this revision
> in
> everything should be good to go. I'll also substitute the functions
> to
> reflect that changed path.
> 
> [...] 
> 
> Alright, carry on! Patch will be available soon.
Looking at your revised patch, I still feel a bit uneasy about putting
data into the load-path.  I therefore proprose a revised revised (R^2,
if you will) patch, which I've attached to this message.

Regards,
Leo

[-- Attachment #2: 0003-gnu-emacs-telega-Install-telega-data-to-site-lisp.patch --]
[-- Type: text/x-patch, Size: 3062 bytes --]

From 59918d4a486c453463e6c59487047177f3b54205 Mon Sep 17 00:00:00 2001
From: Brett Gilio <brettg@posteo.net>
Date: Thu, 5 Dec 2019 13:51:14 -0600
Subject: [PATCH 3/3] gnu: emacs-telega: Install telega-data to site-lisp.

* gnu/packages/emacs-xyz.scm (emacs-telega)[arguments]: This commit revises a
  previous patch and gives the source etc/ directory a unique installation pth
  in the site-lisp directory stucture.

Co-authored-by: Leo Prikler <leo.prikler@student.tugraz.at>
---
 gnu/packages/emacs-xyz.scm | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f8f65f0e7e..c4aa44d8d0 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -19989,6 +19989,16 @@ fish-completion.  It can be used in both Eshell and M-x shell.")
                  (("python3 run_tests.py")
                   ""))
                #t))
+           ;; Modify telega-util to reflect unique dir name in
+           ;; `telega-install-data' phase.
+           (add-after 'unpack 'telega-data-patch
+             (lambda _
+               (substitute* "telega-util.el"
+                 (("\\(concat \"etc/\" filename\\) telega--lib-directory")
+                  "(concat \"telega-data/\" filename)
+                    (locate-dominating-file telega--lib-directory
+                                            \"telega-data\")"))
+               #t))
            ;; The telega test suite checks for a version of Emacs
            ;; compiled with imagemagick and svg support. Since we
            ;; are using `emacs-minimal`, this step will fail.
@@ -20019,11 +20029,20 @@ fish-completion.  It can be used in both Eshell and M-x shell.")
            ;; Build emacs-side using `emacs-build-system'
            (add-after 'compress-documentation 'emacs-add-source-to-load-path
              (assoc-ref emacs:%standard-phases 'add-source-to-load-path))
-           (add-after 'emacs-set-emacs-load-path 'emacs-install
+           (add-after 'emacs-add-source-to-load-path 'emacs-install
              (assoc-ref emacs:%standard-phases 'install))
-           (add-after 'emacs-install 'emacs-build
+           ;; This step installs subdir /etc, which contains images, sounds and
+           ;; various other data, next to the site-lisp dir.
+           (add-after 'emacs-install 'telega-install-data
+             (lambda* (#:key outputs #:allow-other-keys)
+               (copy-recursively
+                "etc"
+                (string-append (assoc-ref outputs "out")
+                               "/share/emacs/telega-data/"))
+               #t))
+           (add-after 'telega-install-data 'emacs-build
              (assoc-ref emacs:%standard-phases 'build))
-           (add-after 'emacs-install 'emacs-make-autoloads
+           (add-after 'emacs-build 'emacs-make-autoloads
              (assoc-ref emacs:%standard-phases 'make-autoloads)))))
       (propagated-inputs
        `(("emacs-visual-fill-column" ,emacs-visual-fill-column)))
-- 
2.24.0


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

end of thread, other threads:[~2019-12-05 22:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-02 21:33 [bug#38463] [PATCH] Telega test suite and change in revision Brett Gilio
2019-12-02 21:34 ` [bug#38463] [PATCH 1/2] gnu: emacs-telega: Use test suites Brett Gilio
2019-12-02 21:35 ` [bug#38463] [PATCH 2/2] gnu: emacs-telega: Update to 0.4.4-2 Brett Gilio
2019-12-05  0:36 ` [bug#38463] [PATCH] Telega test suite and change in revision Brett Gilio
2019-12-05 13:50 ` [bug#38463] [PATCH 3/3] gnu: emacs-telega: Properly install alists Brett Gilio
2019-12-05 17:31 ` Leo Prikler
2019-12-05 18:00   ` Brett Gilio
2019-12-05 18:18     ` Leo Prikler
2019-12-05 18:46       ` Brett Gilio
2019-12-05 22:55         ` Leo Prikler
2019-12-05 20:01 ` [bug#38463] [PATCH 3/3] gnu: emacs-telega: Install telega-data to site-lisp Brett Gilio

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.