unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: Andrew Tropin <andrew@trop.in>
Cc: 48331@debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: bug#48331: Emacs' describe-package doesn't work for packages managed by guix
Date: Wed, 19 May 2021 20:42:37 +0200	[thread overview]
Message-ID: <88a438a74fabe0f4d4bfd8a649c38e960ef82ed2.camel@student.tugraz.at> (raw)
In-Reply-To: <CABrWRW2OpFaJU-Wz19-smz3OkMx79+rX2WT-N_ZuHkD_Mu6ghQ@mail.gmail.com>

That looks like it'd mess with people's installed ELPA packages.  In
general, hacks based on package-directory-list don't feel very stable. 
Consider writing a function similar in nature to `package-load-all-
descriptors' instead.

Also, this seems to rely on us not deleting the -pkg.el, but probably
won't work for packages, that don't ship it, e.g. emacs-howm.

[Adding Arun Isaac to CC.  Their commit d8796851 is the first one to
drop -pkg.el, but without explanation.]

Am Mittwoch, den 19.05.2021, 20:58 +0300 schrieb Andrew Tropin:
> From: Andrew Tropin <andrew@trop.in>
> Date: Wed, 19 May 2021 20:44:22 +0300
> Subject: [PATCH] guix: build: emacs-build-system: Make package.el
> aware of
>  guix packages
> 
> After updating the package-directory-list variable, functions like
> list-packages,
> describe-package become aware of packages installed by guix.
> 
> ---
> This code is getting work done, but I'm not a very experienced elisp
> developer, so
> please review it thoroughly.
> 
>  gnu/packages/aux-files/emacs/guix-emacs.el | 10 ++++++++++
>  guix/build/emacs-build-system.scm          |  2 +-
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el
> b/gnu/packages/aux-files/emacs/guix-emacs.el
> index ca9146c535..4aa4220cda 100644
> --- a/gnu/packages/aux-files/emacs/guix-emacs.el
> +++ b/gnu/packages/aux-files/emacs/guix-emacs.el
> @@ -58,6 +58,16 @@ The files in the list do not have extensions (.el,
> .elc)."
>              (load f 'noerror))
>            autoloads)))
> 
> +
> +(require 'package)
> +
> +;; Set `package-directory-list' to the value without elpa/ suffix
> +;; to match the structure of site-lisp directory of guix's emacs
> +;; build system.
> +;;;###autoload
> +(setq package-directory-list
> +      (list (string-remove-suffix "/elpa" (car package-directory-
> list))))
> +
>  (provide 'guix-emacs)
> 
>  ;;; guix-emacs.el ends here
> diff --git a/guix/build/emacs-build-system.scm
> b/guix/build/emacs-build-system.scm
> index e41e9a6595..7565b9a422 100644
> --- a/guix/build/emacs-build-system.scm
> +++ b/guix/build/emacs-build-system.scm
> @@ -53,7 +53,7 @@
> 
>  ;; These are the default inclusion/exclusion regexps for the install
> phase.
>  (define %default-include '("^[^/]*\\.el$" "^[^/]*\\.info$"
> "^doc/.*\\.info$"))
> -(define %default-exclude '("^\\.dir-locals\\.el$" "-pkg\\.el$"
> +(define %default-exclude '("^\\.dir-locals\\.el$"
>                             "^[^/]*tests?\\.el$"))
> 
>  (define gnu:unpack (assoc-ref gnu:%standard-phases 'unpack))





  reply	other threads:[~2021-05-19 19:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10  7:51 bug#48331: Emacs' describe-package doesn't work for packages managed by guix Andrew Tropin
2021-05-11 10:05 ` Leo Prikler
2021-05-11 15:57   ` Andrew Tropin
2021-05-11 16:33     ` Leo Prikler
2021-05-11 18:55       ` Andrew Tropin
2021-05-11 19:57         ` Leo Prikler
2021-05-19 14:32           ` Andrew Tropin
2021-05-19 15:08             ` Leo Prikler
2021-05-19 17:58               ` Andrew Tropin
2021-05-19 18:42                 ` Leo Prikler [this message]
2021-05-20 10:01                   ` Andrew Tropin
2021-05-20 10:20                     ` Leo Prikler
2021-05-20 10:32                   ` Arun Isaac
2021-05-20 10:39                     ` Arun Isaac
2021-05-20 11:13                       ` Leo Prikler
2021-05-20 12:24                     ` Andrew Tropin
2021-05-20 15:57                       ` Leo Prikler
2021-05-22  3:09                         ` Maxim Cournoyer
2021-12-03 20:46                           ` Liliana Marie Prikler
2021-12-06  4:52                             ` Andrew Tropin
2021-12-30  8:12                             ` Andrew Tropin
2021-05-11 21:17 ` Ludovic Courtès
2021-05-19 14:41   ` Andrew Tropin
2021-05-22 12:54 ` bug#48331: [PATCH 1/2] build-system: emacs: Keep -pkg.el files Leo Prikler
2021-05-22 12:54   ` bug#48331: [PATCH 2/2] gnu: emacs: Load package descriptors from packages referenced by subdirs.el Leo Prikler
2021-05-25 13:40     ` bug#48331: [PATCH draft] build-system: emacs: Generate -pkg.el file in case it is missing Andrew Tropin
2021-05-25 15:07       ` Leo Prikler
2021-05-26  8:15 ` bug#48331: [PATCH] guix: build: emacs-build-system: Make package.el aware of guix packages Ivan Sokolov

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=88a438a74fabe0f4d4bfd8a649c38e960ef82ed2.camel@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=48331@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=maxim.cournoyer@gmail.com \
    /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).