From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Easior Newsgroups: gmane.emacs.help Subject: Re: elpa package loading problem? Date: Thu, 29 Nov 2012 15:09:52 +0800 Message-ID: <87k3t47um7.fsf@noah.localdomain> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1354247757 18275 80.91.229.3 (30 Nov 2012 03:55:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Nov 2012 03:55:57 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Xah Lee Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 30 04:56:09 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TeHhv-0003p7-Un for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Nov 2012 04:56:08 +0100 Original-Received: from localhost ([::1]:39353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeHhk-0000jA-OE for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2012 22:55:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeGoi-0004Cy-PI for help-gnu-emacs@gnu.org; Thu, 29 Nov 2012 21:59:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TeGoh-00059g-B3 for help-gnu-emacs@gnu.org; Thu, 29 Nov 2012 21:59:04 -0500 Original-Received: from m50-111.126.com ([123.125.50.111]:60195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeGog-00059O-Gr for help-gnu-emacs@gnu.org; Thu, 29 Nov 2012 21:59:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=Received:From:To:Cc:Subject:In-Reply-To:Date: Message-ID:References:User-Agent:Face:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=2KViixeRcRKRnnEULRsWgxF8H7m4+CrXVL 9HoP5FYys=; b=em7+Tn594iWUAbm5JJq2Ic7D9WQW4EuNkSjAHmRrVhvtBf/fRt CRA893kUyns6OcY9Xin8A9p85C0sWlGh5zQbryocUvSPJyUSgO/2cib1e7EIi1gx 0yLXeeV3RgYBoZxFlB8HnjHFziBOJkvr1F3Y5mn5CbRiDpwuXEgmKZOsk= Original-Received: from noah.localdomain (unknown [27.115.42.253]) by smtp5 (Coremail) with SMTP id jtKowECZLkvjILhQOVcNBQ--.141S3; Fri, 30 Nov 2012 10:58:44 +0800 (CST) In-Reply-To: (Xah Lee's message of "Sat, 2 Jun 2012 09:44:29 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAAK/INwWK6QAAABl0 RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAMUExURe/v7y8pJ5UdEpuRfs3NYikA AAE9SURBVHjaxJRbbsUgDEQ9nv3vuWAI2ASoo34URcrVzRz8GIPI/y3q+MUUgAGopgIAE2AO4JNb FoCiSIs+BZQabNkr16S5kAGUNfeGMeeCGZHVF7NoRqRL1tIlFUA/APoF6O1sKxWgEPgC0AWgfPIN lDyArMvNL8DKyDW1ZPKMHn/PxQ4Psz2ipdLTyWREIBC3abPNEAHc93X6u2suj0iUm6AGbofJ3U84 AbUDVQl7ZAEYIw056uHAJoLwFYqme1aIIBbzBZT/aMMbgS62bN8hetPDnTyjRr1d3dw3tgMhhG2+ BxrhR2kA5DGEhCKaa2d9/zzkzS7iQDxFcvazwQc9F6+Ve8OO00fgJp96LjbvATrJIublNNA1aVUv 6fn6pn7Y7yWvUx0babPXR7C/dm7Mfdpw3Rp8LPMP60eAAQAtmgbkuFBEMwAAAABJRU5ErkJgggo= X-CM-TRANSID: jtKowECZLkvjILhQOVcNBQ--.141S3 X-Coremail-Antispam: 1Uf129KBjvJXoWxWrW7Jw1DGF4kCr43ZF1DKFg_yoWrGr4Dpr ZxWFnFyr1DWF4rAF1UJr18uayrCwn5AryaqF1rXr9Yvw1Duw1jvr4jqr4fAFyUZrZrGw1a yw1DGr4UWryUX3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UtKs8UUUUU= X-CM-SenderInfo: 5hdvx0bu6rjloofrz/1tbiIR93aU4f9jTkCAAAsf X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 123.125.50.111 X-Mailman-Approved-At: Thu, 29 Nov 2012 22:55:48 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87965 >>>>> "XL" =3D=3D Xah Lee writes: XL> does anyone have problems with emacs package system? XL> recently, installed several packages with it: {=E2=80=9Crainbow-mod= e=E2=80=9D, XL> =E2=80=9Cbookmark+=E2=80=9D, =E2=80=9Csmex=E2=80=9D, =E2=80=9Cexpan= d-region=E2=80=9D}. XL> But they all have a similar problem related to autoload. For exampl= e, XL> let's say rainbow-mode. When in css, it's not loaded. You have to XL> manually call it. So, if you want it to load automatically when in XL> css, you have to add stuff to your init file. Then, this means the XL> package system does not really automatically manage things. You sti= ll XL> have know some elisp, and manually add things to your init file. (we XL> talking about basic activation, not advanced customization) XL> The issue is more pronounced with modes such as bookmark+, smex, XL> expand-region. For example, in bookmark+, when i start my emacs, ca= ll XL> bookmark =E3=80=90Ctrl+x r l=E3=80=91, it gives a error about some = current-bookmark- XL> file var not defined. Apparently, the problem is that bookmark+ must XL> be properly initialized before i start my bookmark. (when calling XL> bookmark-bmenu-list, it does automatically load bookmark+, but isn't XL> properly initialized) Here, i've spent some 20 min but haven't XL> succeeded in making it work. (i suppose i'll need to take time to XL> understand how elpa loading mechanism works.) XL> Similar things happen with smex, expand-region. For example, smex XL> requires you to define a key for M-x. So i added (global-set-key (k= bd XL> "") 'smex) in my init. But after starting emacs, i press the XL> apps key, i get: =E2=80=9CSymbol's function definition is void: sme= x=E2=80=9D. If i XL> put (require 'smex), restart, i get =E2=80=9CDebugger entered--Lisp= error: XL> (file-error "Cannot open load file" "smex")=E2=80=9D. Next step is = to add the XL> load path, which i haven't tried yet. But that seems to defeat half= of XL> goodness of package system. XL> Any insight on this? XL> for emacs 24, is this the way things are? It's just my question.=20 However, I also found something strange with package.el in emacs 24. I installed command-frequency.el, info+.el, maxfame.el etc, by elpa. Those package couldn't load properly if I add the following lines: ,------------------------------------------------ | (require 'command-frequency) | (eval-after-load "info" '(require 'info+)) | (require 'maxframe) | (add-hook 'window-setup-hook 'maximize-frame t) `------------------------------------------------ to the file ~/.emacs. The *Bugtrace* reports that If I adjust my dotemacs file as follows ,------------------------------------------------ | ;; (require 'command-frequency) | ;; (eval-after-load "info" '(require 'info+)) | ;; (require 'maxframe) | (add-hook 'window-setup-hook 'maximize-frame t) `------------------------------------------------ then the maxframe.el works well while command-frequency.el and info+.el didn't take any effects. I found those files named -.el when I entered into the elpa directory. Based on these facts, I understand that=20 * packages installed by elpa couldn't required in ~/.emacs since they would be autoloaded through the autoloads files. Furthermore, the autoloads files are generated from the ;;##autoload lines in package sources. * maxfame.el works since the function, maximize-frame, is in the autoloads file. * command-frequency.el doesn't work because there is nothing in its autoloads file.=20 Is it right?=20 Question:=20 Is there a way to make info+.el, command-frequency.el run by elpa? What can I do? Thanks in advance. Best regards, Easior ----- Ich bin von heute und ehedam, aber etwas ist in mir, das ist vor morgen und =C3=BCbermorgen und einstmal.=EF=BB=BF Friedrich Wilhelm Nietzsche