From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Makefile restructuring Date: Mon, 07 Nov 2011 01:55:08 +0530 Message-ID: <8162ixdmmz.fsf@gmail.com> References: <87k4bqwkyw.fsf@gnu.org> <87sjqejvob.fsf@Rainer.invalid> <87k4bqjnwu.fsf@Rainer.invalid> <87fwmdkind.fsf@Rainer.invalid> <874o2t81qu.fsf@gnu.org> <87liw43iys.fsf@Rainer.invalid> <8762n8d4ys.fsf@gnu.org> <87ei1u6u3q.fsf_-_@Rainer.invalid> <87hb6i3z1l.fsf@Rainer.invalid> <87bot1ph9h.fsf@Rainer.invalid> <87ehxvlyrn.fsf@Rainer.invalid> <87k47d6pfn.fsf@Rainer.invalid> <81ehxldpqi.fsf@gmail.com> <87d3d56nyy.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RN9HS-0006qm-Ci for emacs-orgmode@gnu.org; Sun, 06 Nov 2011 15:25:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RN9HR-00025X-5b for emacs-orgmode@gnu.org; Sun, 06 Nov 2011 15:25:26 -0500 Received: from mail-gy0-f169.google.com ([209.85.160.169]:39408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RN9HQ-00025R-Vw for emacs-orgmode@gnu.org; Sun, 06 Nov 2011 15:25:25 -0500 Received: by gyg10 with SMTP id 10so5245709gyg.0 for ; Sun, 06 Nov 2011 12:25:24 -0800 (PST) In-Reply-To: <87d3d56nyy.fsf@Rainer.invalid> (Achim Gratz's message of "Sun, 06 Nov 2011 20:38:13 +0100") 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: Achim Gratz Cc: emacs-orgmode@gnu.org Achim Gratz writes: > Jambunathan K writes: >> FYI, if Org is insalled through the package manager there is no >> org-install.el. Package manager creates autoloads on it's own and names >> it org-autoloads.el. >> >> I believe, for most part, org-install and org-autoloads have the same >> functionality. > > Then maybe they should have the same name, but surely they should be > produced by the same method. Can you point me to a documentation (or > source) that details how the package manager deals with the autoloads? > It shouldn't be too difficult to use the same method in the Makefile > once I understand how it's done. This is what I see in package.el. --8<---------------cut here---------------start------------->8--- (defun package-unpack (name version) (let* ((dirname (concat (symbol-name name) "-" version)) (pkg-dir (expand-file-name dirname package-user-dir))) (make-directory package-user-dir t) ;; FIXME: should we delete PKG-DIR if it exists? (let* ((default-directory (file-name-as-directory package-user-dir))) (package-untar-buffer dirname) (package-generate-autoloads (symbol-name name) pkg-dir) (let ((load-path (cons pkg-dir load-path))) (byte-recompile-directory pkg-dir 0 t))))) (defun package-generate-autoloads (name pkg-dir) (require 'autoload) ;Load before we let-bind generated-autoload-file! (let* ((auto-name (concat name "-autoloads.el")) (ignore-name (concat name "-pkg.el")) (generated-autoload-file (expand-file-name auto-name pkg-dir)) (version-control 'never)) (unless (fboundp 'autoload-ensure-default-file) (package-autoload-ensure-default-file generated-autoload-file)) (update-directory-autoloads pkg-dir))) --8<---------------cut here---------------end--------------->8--- If we reconcile what happens here with what is done in Makefile, may be we can uncover why certain macros in org-macs.el doesn't propagated to some set of files. Note that org-macs.el issue is increasingly reported only with emacs-23 and not with emacs-24. One of the reason could be that emacs-24 *already* has most of the macro definitions in the system path. This is not the case with emacs-23 installations which have (much?) older versions of org. >From what I understand package manager compiles files in alphabetical order. It means that org-macs.el gets compiled after org-agenda.el. Also when eval-when-compile is done of org-macs.el - somewhere it should be done right? - I don't know which of the org-macs.el gets loaded. Is it system-installed one or the one in the distribution tar. These are some of the leading questions that will lead to satisfactory resolution of recently reported issues with package manager. > > Regards, > Achim. --