[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Problem with autoloads
From: |
Nick Dokos |
Subject: |
Re: [O] Problem with autoloads |
Date: |
Tue, 28 Jun 2011 02:33:45 -0400 |
Suvayu Ali <address@hidden> wrote:
> Hi Nick,
>
> On Mon, 27 Jun 2011 20:13:25 -0400
> Nick Dokos <address@hidden> wrote:
>
> > The generated org-install.el looks like this:
> >
>
> [...]
>
> > |
> > | (autoload 'org-mode "org" "\
> > | Outline-based notes management and organizer, alias
> > | \"Carsten's outline-mode for keeping track of everything.\"
> > | ...
> > `----
> >
>
> I also run emacs24 and my autoloads look like this. Obviously the
> leading lisp/ is the problem.
>
> (autoload 'org-mode "lisp/org" ...)
>
> This is my setup:
>
> emacs 24 is installed in /opt/emacs-lisp I changed the Makefile to point
> EMACS to /opt/emacs-lisp/bin/emacs and ran make. It still generates the
> same autoloads (with the leading lisp/).
>
> I setup org by evaluating the following lines in an emacs session
> started as emacs -Q:
>
> (add-to-list 'load-path (expand-file-name "~/build/org-mode/lisp"))
> (add-to-list 'load-path (expand-file-name "~/build/org-mode/contrib/lisp"))
>
> ;; activate org
> (require 'org-install)
>
> I get the same error again, its trying to load lisp/org instead of org.
> I tried this with a fresh clone of the org-mode repository. I can't see
> where I could have gone wrong here.
>
Suvayu and I worked on this in an email exchange: it turns out that
Michael was right in that (recent) emacs 24 is indeed the culprit. In
particular, the variable generated-autoload-file is now initialized to
nil:
,----
| (defvar generated-autoload-file nil
| "File into which to write autoload definitions.
| A Lisp file can set this in its local variables section to make
| its autoloads go somewhere else.
|
| If this is a relative file name, the directory is determined as
| follows:
| - If a Lisp file defined `generated-autoload-file' as a
| file-local variable, use its containing directory.
| - Otherwise use the \"lisp\" subdirectory of `source-directory'.
|
| The autoload file is assumed to contain a trailer starting with a
| FormFeed character.")
`----
whereas before (e.g. in the version of emacs 24 that I'm running: GNU
Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of
2011-04-13) it was initialized to "loaddefs.el":
,----
| (defvar generated-autoload-file "loaddefs.el"
| "*File \\[update-file-autoloads] puts autoloads into.
| A `.el' file can set this in its local variables section to make its
| autoloads go somewhere else. The autoload file is assumed to contain a
| trailer starting with a FormFeed character.")
`----
The particular value is not that important: the fact that it was
a relative file name is, as indicated by the comment above.
I think the following patch fixes it and does not break any earlier
versions of org. Suvayu, Michael (and anybody else who cares to try it):
would you mind checking and reporting back?
Thanks,
Nick
diff --git a/Makefile b/Makefile
index 239ab2e..08e3a08 100644
--- a/Makefile
+++ b/Makefile
@@ -230,6 +230,7 @@ autoloads: lisp/org-install.el
lisp/org-install.el: $(LISPFILES0) Makefile
$(BATCH) --eval "(require 'autoload)" \
+ --eval '(setq generated-autoload-file "org-install.el")' \
--eval '(find-file "org-install.el")' \
--eval '(erase-buffer)' \
--eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name
x))) (quote ($(LISPFILES0))))' \
- [O] Problem with autoloads, suvayu ali, 2011/06/26
- Re: [O] Problem with autoloads, Michael Markert, 2011/06/27
- Re: [O] Problem with autoloads, Suvayu Ali, 2011/06/27
- Re: [O] Problem with autoloads, Michael Markert, 2011/06/27
- Re: [O] Problem with autoloads, Nick Dokos, 2011/06/27
- Re: [O] Problem with autoloads, Suvayu Ali, 2011/06/27
- Re: [O] Problem with autoloads,
Nick Dokos <=
- Re: [O] Problem with autoloads, Michael Markert, 2011/06/28
- Re: [O] Problem with autoloads, Suvayu Ali, 2011/06/28
- Re: [O] Problem with autoloads, Nick Dokos, 2011/06/28
- Re: [O] Problem with autoloads, Nick Dokos, 2011/06/28
- Re: [O] Problem with autoloads, Michael Markert, 2011/06/28
- Re: [O] Problem with autoloads, Nick Dokos, 2011/06/28
- Re: [O] Problem with autoloads, Michael Markert, 2011/06/28
- Re: [O] Problem with autoloads, Michael Markert, 2011/06/28
- Re: [O] Problem with autoloads, Suvayu Ali, 2011/06/28
- Re: [O] Problem with autoloads, Eric S Fraga, 2011/06/29