GNU bug report logs - #77468
30.1.50; package-quickstart file is not relocatable

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Wed, 2 Apr 2025 18:47:01 UTC

Severity: normal

Found in version 30.1.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 77468 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 77468 <at> debbugs.gnu.org
Subject: Re: bug#77468: 30.1.50; package-quickstart file is not relocatable
Date: Fri, 04 Apr 2025 18:54:23 -0400
>> Also, could we compute (file-name-directory load-file-name)
>> once at the beginning of the quickstart file instead of once per
>> inlined file?
> Done.

I don't see it:

> +(defun package--quickstart-rel (dir file)
> +  "Return an expression which evaluates to FILE while loading a file in DIR."
> +  (if (file-in-directory-p file dir)
> +      ;; Use a relative name so we can still find FILE if DIR is moved.
> +      `(file-name-concat (file-name-directory load-file-name)
> +                         ,(file-relative-name file dir))
> +    file))

We still generate code that computes `(file-name-directory
load-file-name)` N times, AFAICT.


        Stefan





This bug report was last modified 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.