all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* package.el autoload extra directories
@ 2012-05-24  0:51 Daniel Hackney
  2012-05-24  1:48 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Hackney @ 2012-05-24  0:51 UTC (permalink / raw)
  To: emacs-devel

I am working to help package-ize ESS (Emacs Speaks Statistics) and one
of the problems I've run into is that ESS has its elisp files in the
"lisp" subdirectory, rather than at the root of the project. As it
stands now, package.el will not generate autoloads for the files in
subdirectories of the archive root. A simple solution is to move all of
the elisp files in ESS to the root of the distribution, but this is not
preferable for them. The source of the problem is that
`update-directory-autoloads' does not recurse into subdirectories to
find other elisp files for which to generate autoloads.

I propose one of the following:

  1. Make `update-directory-autoloads' look for a dynamic variable which
     tells it to work recursively. There could be a variable like
     `update-directory-autoloads-recursive' which, when non-nil, would
     cause `update-directory-autoloads' to dive into subdirectories.

  2. Add an option to `define-package' which lists extra elisp source
     directories for which to generate autoloads. This might look like

     (define-package "example" "1.2.3" "Example package" '()
:extra-src '("lisp"))

`update-directory-autoloads' is smart enough to figure out the
appropriate load path relative to `generated-autoload-file', so all that
would need to be done would be to add additional arguments to the call
to `update-directory-autoloads' in `package-generate-autoloads'.

I can write a proof-of-concept for package.el if people think it is
worth exploring. I'm not familiar with the autoload.el code, so it
wouldn't be as easy for me to patch that.

--
Daniel M. Hackney



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

* Re: package.el autoload extra directories
  2012-05-24  0:51 package.el autoload extra directories Daniel Hackney
@ 2012-05-24  1:48 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2012-05-24  1:48 UTC (permalink / raw)
  To: Daniel Hackney; +Cc: emacs-devel

>   1. Make `update-directory-autoloads' look for a dynamic variable which
>      tells it to work recursively. There could be a variable like
>      `update-directory-autoloads-recursive' which, when non-nil, would
>      cause `update-directory-autoloads' to dive into subdirectories.

An alternative would be to add a new function that works recursively.

>   2. Add an option to `define-package' which lists extra elisp source
>      directories for which to generate autoloads. This might look like

That makes more sense to me.  Especially since most likely you wouldn't
want the top-level to be added to the load-path.  So rather than
`extra-src' you'd just want to list the source directories to use (with
"." being the default).

> I can write a proof-of-concept for package.el if people think it is
> worth exploring.

Please do,


        Stefan



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

end of thread, other threads:[~2012-05-24  1:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-24  0:51 package.el autoload extra directories Daniel Hackney
2012-05-24  1:48 ` Stefan Monnier

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.