unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>,
	Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: 51755@debbugs.gnu.org
Subject: [bug#51755] [PATCH 1/1] gnu: proof-general: Adjust autoloads for Emacs.
Date: Sun, 21 Nov 2021 22:11:58 +0100	[thread overview]
Message-ID: <86bl2dfc2p.fsf@gmail.com> (raw)
In-Reply-To: <87y25huuxp.fsf@nicolasgoaziou.fr>

Hi,

Thanks for the review.


On Sun, 21 Nov 2021 at 21:15, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>> Am Sonntag, den 21.11.2021, 19:40 +0100 schrieb Nicolas Goaziou:

>>> So, IIUC, the above is basically a hack: you disguise the main file
>>> into an autoloads file because no autoloads file is generated from
>>> the code base? If so, this might deserve a longer comment, IMO.
>
> Actually, my assumption was wrong. "proof-general.el" is
> a meta-autoloads file:
>
>     ;; This file is a thin, package.el-friendly wrapper around generic/proof-site,
>     ;; suitable for execution on Emacs start-up.  It serves two purposes:
>     ;;
>     ;; * Setting up the load path when byte-compiling PG.
>     ;; * Loading a minimal PG setup on startup (not all of Proof General, of course;
>     ;;   mostly mode hooks and autoloads).

Yes.  Note that ’proof-general’ was at one moment in its long history a
standalone package, i.e., running ’bin/proofgeneneral’ started Emacs and
launched everything.  This had been removed long time ago [1] but the
current code inherits this long history.

1: <https://github.com/ProofGeneral/PG/commit/1a18e33658645a81225c56b5d4f4a4b89434d301>


>> Alternatively, we could in an after-
>> unpack phase add autoload cookies to the source file or write our own
>> autoloads altogether.  WDYT?
>
> Autoload cookies are already present in the code base, but in
> sub-directories.

Yes.  The limitation comes from this subdirectory structure.  This
breaks the usual way of packaging Emacs tools for Guix, IIUC.


> OTOH, I assume the solution proposed by Zimoun, as hackish as it is,
> works well enough. And it requires less work. IMO, it is acceptable with
> a good comment.

From my point of view, my proposed patch appears to me the easiest fix.
If something is better, please let me know. :-)


About the comment, I thought « allow-subfolders-autoloads » and « Make
it visible by Emacs » would have been enough. ;-)

--8<---------------cut here---------------start------------->8---
             (add-after 'install 'allow-subfolders-autoloads
               (lambda* (#:key outputs #:allow-other-keys)
                 (let ((out (assoc-ref outputs "out")))
                   ;; Make it visible by Emacs
--8<---------------cut here---------------end--------------->8---


Instead, I propose to extend to:

--8<---------------cut here---------------start------------->8---
             (add-after 'install 'allow-subfolders-autoloads
               ;; Autoload cookies are present in sub-directories. A friendly
               ;; wrapper proof-general.el around generic/proof-site.el is
               ;; provided for execution on Emacs start-up.  It serves two
               ;; purposes:
               ;; * Setting up the load path when byte-compiling pg.
               ;; * Loading a minimal PG setup on startup (not all of Proof
               ;; General, of course;mostly mode hooks and autoloads).
               ;; The rename to proof-general-autoloads.el is Guix specific.
               (lambda* (#:key outputs #:allow-other-keys)
                 (let ((out (assoc-ref outputs "out")))
                   (copy-file "proof-general.el"
                              (string-append out ,base-directory
                                             "/proof-general-autoloads.el")))))))))
--8<---------------cut here---------------end--------------->8---


Is it fine?  If yes, I can send* a v2.  Or please push directly. :-)



Cheers,
simon

*send v2: for the record, I do not have commit right. ;-)




  reply	other threads:[~2021-11-21 21:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 19:26 [bug#51755] [PATCH 0/1] Fix ProofGeneral (emacs front-end for Coq) zimoun
2021-11-10 19:37 ` [bug#51755] [PATCH 1/1] gnu: proof-general: Adjust autoloads for Emacs zimoun
2021-11-21 18:40   ` Nicolas Goaziou
2021-11-21 19:07     ` Liliana Marie Prikler
2021-11-21 20:15       ` Nicolas Goaziou
2021-11-21 21:11         ` zimoun [this message]
2021-11-22 18:22           ` bug#51755: " Nicolas Goaziou
2021-11-21 22:17             ` [bug#51755] " zimoun
2021-11-19 12:27 ` [bug#51755] [PATCH 0/1] Fix ProofGeneral (emacs front-end for Coq) zimoun

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=86bl2dfc2p.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=51755@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    --cc=mail@nicolasgoaziou.fr \
    /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).