From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Markert Subject: Re: Problem with autoloads Date: Tue, 28 Jun 2011 08:56:59 +0200 Message-ID: <87y60m8mv8.wl%markert.michael@googlemail.com> 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> <29444.1309242825@alphaville.dokosmarshall.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Tue_Jun_28_08:56:59_2011-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbSEQ-0002K8-Pz for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 02:57:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbSEP-0006db-6k for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 02:57:10 -0400 Received: from mail-fx0-f52.google.com ([209.85.161.52]:51069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbSEO-0006dX-M2 for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 02:57:09 -0400 Received: by fxd18 with SMTP id 18so2252970fxd.39 for ; Mon, 27 Jun 2011 23:57:07 -0700 (PDT) In-Reply-To: <29444.1309242825@alphaville.dokosmarshall.org> 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: nicholas.dokos@hp.com Cc: Bastien , org-mode mailing list --pgp-sign-Multipart_Tue_Jun_28_08:56:59_2011-1 Content-Type: text/plain; charset=US-ASCII On 28 Jun 2011, Nick Dokos wrote: > > > 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? Hi Nick, thanks for looking into it. But the patch doesn't work. I think that stems from the fact, that the first thing `generate-file-autoloads' does is to bind it new: ,---- | (defun generate-file-autoloads (file) | "Insert at point a loaddefs autoload section for FILE. | Autoloads are generated for defuns and defmacros in FILE | marked by `generate-autoload-cookie' (which see). | If FILE is being visited in a buffer, the contents of the buffer | are used. | Return non-nil in the case where no autoloads were added at point." | (interactive "fGenerate autoloads for file: ") | (let ((generated-autoload-file buffer-file-name)) | (autoload-generate-file-autoloads file (current-buffer)))) `---- And because we feed it a relative file name it's bound to a relative file name. Michael --pgp-sign-Multipart_Tue_Jun_28_08:56:59_2011-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJOCXs7AAoJEHHMVUK0UjKVn3kP/R2XKEHhvuVK1gYlyaX+BqED rl0KnA6MRxIdyEfm+igBiwwan42sHImYPkz/tdM9yfZO9TFcE+XNufabaYMbO9K2 lRxWW56mPov66rRh/auALYnjvBXia0SPM5wtpUjrARLVyOqCXMYdJh7G1W+3pNwI bng8hX4jHMZ2IYREKq5u7ouTW1YdEXqqeSzZODfdppOQa5R3BEFNN79bhEdcmU8y i+zedVGWJ+P6b7fkMYjYy/EZM8Mo3w9G+KQ6Wxli45NadNFCqCgI+20qxOWPE4x6 cOpzGYeowdPKwEdahw5Eugnw8oKnrXII/U0NgVNezBMJNc2b78iJuDDekVlIniro MHC8YMt2EBZkB2SxYi61tWaq+DdAH289bstCJJY2xa0VJkfSrqc+HbCfnTlI3slN CxIV1aOB2LUUcG2TIueKG7hSy8g6c36RzG1cUAi08wcJSeUzwMyf7znXIEXf2QEw jhno2jUT+2H1XoBjbbzc7OJMEJaOBm8jm0aOaiVefOsQ3Qy4sVcJAB23/9/eqBot 4vXKWAeOp2UVwF9FI2cGe+KOtxvJb1BG1CGxOjbINrYCxysVM1JaFsJ4MYtdG9aG sTRZidQwuJ2+HjwsZfRoRhIQJbtbWRvN/II5eqdwXMh7J1eIfh60axDYWwohOJHH z0/HC+pt4O9p1KRnBBr6 =u6iz -----END PGP SIGNATURE----- --pgp-sign-Multipart_Tue_Jun_28_08:56:59_2011-1--