From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Problem with autoloads Date: Tue, 28 Jun 2011 02:33:45 -0400 Message-ID: <29444.1309242825@alphaville.dokosmarshall.org> References: <877h87xloq.wl%markert.michael@googlemail.com> <20110627105743.15d7f5fd@kuru.homelinux.net> <87zkl29ams.wl%markert.michael@googlemail.com> <18297.1309220005@alphaville.dokosmarshall.org> <20110627180134.661ecfaa@kuru.homelinux.net> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbRrq-0007qk-AK for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 02:33:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbRrp-0002Or-6Q for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 02:33:50 -0400 Received: from vms173011pub.verizon.net ([206.46.173.11]:36559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbRrp-0002Of-35 for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 02:33:49 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173011.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LNH00216M89CNA0@vms173011.mailsrvcs.net> for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 01:33:46 -0500 (CDT) In-reply-to: Message from Suvayu Ali of "Mon, 27 Jun 2011 18:01:34 PDT." <20110627180134.661ecfaa@kuru.homelinux.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Suvayu Ali Cc: Bastien , nicholas.dokos@hp.com, org-mode mailing list , Michael Markert Suvayu Ali wrote: > Hi Nick, > > On Mon, 27 Jun 2011 20:13:25 -0400 > Nick Dokos 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))))' \