all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lynn Winebarger <owinebar@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <emacs-devel@gnu.org>, Lars Ingebrigtsen <larsi@gnus.org>
Subject: Re: master feb654b460: Add new package.el commands for recompilation
Date: Thu, 23 Jun 2022 11:53:06 -0400	[thread overview]
Message-ID: <CAM=F=bDid+LzRGtVAwuSAe=9yQetncK9rZcN7Uo8MaenE90EwQ@mail.gmail.com> (raw)
In-Reply-To: <jwv4k0kztno.fsf-monnier+emacs@gnu.org>

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

On Thu, Jun 16, 2022 at 8:29 AM Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> > +;;;###autoload
> > +(defun package-recompile (pkg)
> > +  "Byte-compile package PKG again.
> > +PKG should be either a symbol, the package name, or a `package-desc'
> > +object."
> > +  (interactive (list (intern (completing-read
> > +                              "Recompile package: "
> > +                              (mapcar #'symbol-name
> > +                                      (mapcar #'car package-alist))))))
> > +  (let ((pkg-desc (if (package-desc-p pkg)
> > +                      pkg
> > +                    (cadr (assq pkg package-alist)))))
> > +    ;; Delete the old .elc files to ensure that we don't inadvertently
> > +    ;; load them (in case they contain byte code/macros that are now
> > +    ;; invalid).
> > +    (dolist (elc (directory-files (package-desc-dir pkg-desc) t
> "\\.elc\\'"))
> > +      (delete-file elc))
> > +    (package--compile pkg-desc)))
>
> Thanks, Lars.  But note that there are packages with ELisp files in
> subdirectories (Hyperbole and Proof-General come to mind, tho I'm sure
> there are others) so we should work a bit harder than the above
> `directory-files`.
>
> The realgud family of packages employs a (single-file) package
load-relative to manage
a fairly large number of elisp files, including munging the feature symbol.

 Looking at my 1000+ package sample, I see the following appear to have more
mundane occurrences of elisp file in subdirectories:


   - all-the-icons
   - auctex
   - axiom-environment
   - ecb
   - elisp-benchmarks
   - elpy (.yas-setup.el)
   - ert-runner
   - irony (tests)
   - julia-snail
   - parser-generator (tests)
   - requirejs (.yas-compiled-snippets.el)
   - slime
   - sly
   - taxy (examples)
   - yasnippet-snippets (.yas-setup.el)

[-- Attachment #2: Type: text/html, Size: 2659 bytes --]

      parent reply	other threads:[~2022-06-23 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <165538015737.18417.15587779043841057948@vcs2.savannah.gnu.org>
     [not found] ` <20220616114917.A93A0C051C9@vcs2.savannah.gnu.org>
2022-06-16 12:22   ` master feb654b460: Add new package.el commands for recompilation Stefan Monnier
2022-06-16 12:26     ` Lars Ingebrigtsen
2022-06-23 15:53     ` Lynn Winebarger [this message]

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='CAM=F=bDid+LzRGtVAwuSAe=9yQetncK9rZcN7Uo8MaenE90EwQ@mail.gmail.com' \
    --to=owinebar@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /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/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.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.