unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Please apply this patched function to package.el in Emacs 25.
@ 2016-05-23 23:11 Robert Weiner
  2016-07-21  2:05 ` bug#23607: " Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Weiner @ 2016-05-23 23:11 UTC (permalink / raw)
  To: Tom Tromey, Daniel Hackney; +Cc: bug-gnu-emacs, emacs-devel

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

Replacing this function in package.el allows for correct generation of the
<package>-autoloads.el file for packages that have .el files in multiple
subdirectories.  The only thing changed is the line with 'apply' in it.  It
ignores symlinks to directories in case there are any.  It is a simple
change.  I hope you like it.

This is important for larger packages such as my forthcoming Hyperbole
package which includes a 2nd directory of code.


(defun package-generate-autoloads (name pkg-dir)
  (let* ((auto-name (format "%s-autoloads.el" name))
         ;;(ignore-name (concat name "-pkg.el"))
         (generated-autoload-file (expand-file-name auto-name pkg-dir))
         ;; Silence `autoload-generate-file-autoloads'.
         (noninteractive inhibit-message)
         (backup-inhibited t)
         (version-control 'never))
    (package-autoload-ensure-default-file generated-autoload-file)
    (apply #'update-directory-autoloads pkg-dir
  (delq nil (mapcar (lambda (f) (and (file-directory-p f)
     (not (file-symlink-p f)) f))
    (directory-files pkg-dir t "[a-zA-Z].*" nil))))
    (let ((buf (find-buffer-visiting generated-autoload-file)))
      (when buf (kill-buffer buf)))
    auto-name))

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

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

* bug#23607: Please apply this patched function to package.el in Emacs 25.
  2016-05-23 23:11 Please apply this patched function to package.el in Emacs 25 Robert Weiner
@ 2016-07-21  2:05 ` Stefan Monnier
  2016-07-21  3:50   ` Clément Pit--Claudel
  2016-07-21 15:47   ` Robert Weiner
  0 siblings, 2 replies; 8+ messages in thread
From: Stefan Monnier @ 2016-07-21  2:05 UTC (permalink / raw)
  To: Robert Weiner; +Cc: Tom Tromey, 23607, Daniel Hackney

> Replacing this function in package.el allows for correct generation of the
> <package>-autoloads.el file for packages that have .el files in multiple
> subdirectories.

FWIW, I think this will break the dash package which includes
a dev/ert.el file with autoload cookies in it and those shouldn't be
placed into the dash-autoloads.el file.


        Stefan


PS: Please send it as a patch so we can see what changed without having
to try and guess.





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

* bug#23607: Please apply this patched function to package.el in Emacs 25.
  2016-07-21  2:05 ` bug#23607: " Stefan Monnier
@ 2016-07-21  3:50   ` Clément Pit--Claudel
  2016-07-21  4:40     ` Stefan Monnier
  2016-07-21 15:47   ` Robert Weiner
  1 sibling, 1 reply; 8+ messages in thread
From: Clément Pit--Claudel @ 2016-07-21  3:50 UTC (permalink / raw)
  To: 23607; +Cc: Stefan Monnier


[-- Attachment #1.1: Type: text/plain, Size: 272 bytes --]

On 2016-07-20 22:05, Stefan Monnier wrote:
> FWIW, I think this will break the dash package which includes
> a dev/ert.el file with autoload cookies in it and those shouldn't be
> placed into the dash-autoloads.el file.

What kind of breakage do you have in mind?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* bug#23607: Please apply this patched function to package.el in Emacs 25.
  2016-07-21  3:50   ` Clément Pit--Claudel
@ 2016-07-21  4:40     ` Stefan Monnier
  2016-07-21  5:02       ` Clément Pit--Claudel
  2020-09-15 15:56       ` Lars Ingebrigtsen
  0 siblings, 2 replies; 8+ messages in thread
From: Stefan Monnier @ 2016-07-21  4:40 UTC (permalink / raw)
  To: Clément Pit--Claudel; +Cc: 23607

>> FWIW, I think this will break the dash package which includes
>> a dev/ert.el file with autoload cookies in it and those shouldn't be
>> placed into the dash-autoloads.el file.
> What kind of breakage do you have in mind?

The autoloads for the real ert.el will be overridden by those from
dash-autoloads.el which will say that for example that ert-deftest
should be autoloaded from "dev/ert.el".


        Stefan





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

* bug#23607: Please apply this patched function to package.el in Emacs 25.
  2016-07-21  4:40     ` Stefan Monnier
@ 2016-07-21  5:02       ` Clément Pit--Claudel
  2016-07-24 15:58         ` Phillip Lord
  2020-09-15 15:56       ` Lars Ingebrigtsen
  1 sibling, 1 reply; 8+ messages in thread
From: Clément Pit--Claudel @ 2016-07-21  5:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 23607


[-- Attachment #1.1: Type: text/plain, Size: 609 bytes --]

On 2016-07-21 00:40, Stefan Monnier wrote:
>>> FWIW, I think this will break the dash package which includes
>>> a dev/ert.el file with autoload cookies in it and those shouldn't be
>>> placed into the dash-autoloads.el file.
>> What kind of breakage do you have in mind?
> 
> The autoloads for the real ert.el will be overridden by those from
> dash-autoloads.el which will say that for example that ert-deftest
> should be autoloaded from "dev/ert.el".

I see; I didn't realize dash had their own copy of ert... I wonder why they do.
But you're right, this is definitely an issue.

Clément.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* bug#23607: Please apply this patched function to package.el in Emacs 25.
  2016-07-21  2:05 ` bug#23607: " Stefan Monnier
  2016-07-21  3:50   ` Clément Pit--Claudel
@ 2016-07-21 15:47   ` Robert Weiner
  1 sibling, 0 replies; 8+ messages in thread
From: Robert Weiner @ 2016-07-21 15:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Tom Tromey, 23607, Daniel Hackney

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

On Wed, Jul 20, 2016 at 10:05 PM, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:
>> Replacing this function in package.el allows for correct generation of
the
>> <package>-autoloads.el file for packages that have .el files in multiple
>> subdirectories.
>
> FWIW, I think this will break the dash package which includes
> a dev/ert.el file with autoload cookies in it and those shouldn't be
> placed into the dash-autoloads.el file.
>
>
>         Stefan
>
>
> PS: Please send it as a patch so we can see what changed without having
> to try and guess.

Here is the patch.  -- Bob


*** package-orig.el 2016-05-17 12:16:33.000000000 -0400
--- package.el 2016-06-15 14:43:46.000000000 -0400
***************
*** 916,928 ****
           (backup-inhibited t)
           (version-control 'never))
      (package-autoload-ensure-default-file generated-autoload-file)
!     (update-directory-autoloads pkg-dir)
      (let ((buf (find-buffer-visiting generated-autoload-file)))
        (when buf (kill-buffer buf)))
      auto-name))

  (defun package--make-autoloads-and-stuff (pkg-desc pkg-dir)
   "Generate autoloads, description file, etc.. for PKG-DESC installed at
PKG-DIR."
    (package-generate-autoloads (package-desc-name pkg-desc) pkg-dir)
    (let ((desc-file (expand-file-name (package--description-file pkg-dir)
                                       pkg-dir)))
--- 913,929 ----
           (backup-inhibited t)
           (version-control 'never))
      (package-autoload-ensure-default-file generated-autoload-file)
!     (apply #'update-directory-autoloads pkg-dir
!   (delq nil (mapcar (lambda (f) (and (file-directory-p f)
!      (not (file-symlink-p f))
!      f))
!     (directory-files pkg-dir t "[a-zA-Z].*" nil))))
      (let ((buf (find-buffer-visiting generated-autoload-file)))
        (when buf (kill-buffer buf)))
      auto-name))

  (defun package--make-autoloads-and-stuff (pkg-desc pkg-dir)
   "Generate autoloads, description file, etc.. for PKG-DESC installed at
PKG-DIR."
    (package-generate-autoloads (package-desc-name pkg-desc) pkg-dir)
    (let ((desc-file (expand-file-name (package--description-file pkg-dir)
                                       pkg-dir)))

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

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

* bug#23607: Please apply this patched function to package.el in Emacs 25.
  2016-07-21  5:02       ` Clément Pit--Claudel
@ 2016-07-24 15:58         ` Phillip Lord
  0 siblings, 0 replies; 8+ messages in thread
From: Phillip Lord @ 2016-07-24 15:58 UTC (permalink / raw)
  To: Clément Pit--Claudel; +Cc: 23607, Stefan Monnier

Clément Pit--Claudel <clement.pit@gmail.com> writes:

> On 2016-07-21 00:40, Stefan Monnier wrote:
>>>> FWIW, I think this will break the dash package which includes
>>>> a dev/ert.el file with autoload cookies in it and those shouldn't be
>>>> placed into the dash-autoloads.el file.
>>> What kind of breakage do you have in mind?
>> 
>> The autoloads for the real ert.el will be overridden by those from
>> dash-autoloads.el which will say that for example that ert-deftest
>> should be autoloaded from "dev/ert.el".
>
> I see; I didn't realize dash had their own copy of ert... I wonder why they do.
> But you're right, this is definitely an issue.

Dash isn't the only package to do this. I've also seen package.el
packaged in other places. Mostly, I think, to support backward
compatability, I think.

Why are dev files being packaged, though? At the moment, I don't think
that they should be.

Phil





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

* bug#23607: Please apply this patched function to package.el in Emacs 25.
  2016-07-21  4:40     ` Stefan Monnier
  2016-07-21  5:02       ` Clément Pit--Claudel
@ 2020-09-15 15:56       ` Lars Ingebrigtsen
  1 sibling, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-15 15:56 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 23607, Clément Pit--Claudel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> FWIW, I think this will break the dash package which includes
>>> a dev/ert.el file with autoload cookies in it and those shouldn't be
>>> placed into the dash-autoloads.el file.
>> What kind of breakage do you have in mind?
>
> The autoloads for the real ert.el will be overridden by those from
> dash-autoloads.el which will say that for example that ert-deftest
> should be autoloaded from "dev/ert.el".

It seems like the proposed patch would introduce breaking changes, and
the bug report stalled at that point.  So it seem unlikely that there'll
be further progress in this bug report, and I'm closing it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2020-09-15 15:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-23 23:11 Please apply this patched function to package.el in Emacs 25 Robert Weiner
2016-07-21  2:05 ` bug#23607: " Stefan Monnier
2016-07-21  3:50   ` Clément Pit--Claudel
2016-07-21  4:40     ` Stefan Monnier
2016-07-21  5:02       ` Clément Pit--Claudel
2016-07-24 15:58         ` Phillip Lord
2020-09-15 15:56       ` Lars Ingebrigtsen
2016-07-21 15:47   ` Robert Weiner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).