From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.help Subject: Re: eieio persistent, plus autoloads Date: Sat, 17 Aug 2013 09:21:54 +0200 Message-ID: <874naopyst.fsf@arcor.de> References: <87siybjkpy.fsf@ericabrahamsen.net> <87vc37os66.fsf@arcor.de> <87ppteie8a.fsf@ericabrahamsen.net> <87fvu9psu8.fsf@arcor.de> <87haepez2c.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1376724156 18561 80.91.229.3 (17 Aug 2013 07:22:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Aug 2013 07:22:36 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 17 09:22:38 2013 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 1VAaqL-0006Zw-0I for geh-help-gnu-emacs@m.gmane.org; Sat, 17 Aug 2013 09:22:37 +0200 Original-Received: from localhost ([::1]:34807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAaqK-000166-F2 for geh-help-gnu-emacs@m.gmane.org; Sat, 17 Aug 2013 03:22:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAaq1-000155-Mv for help-gnu-emacs@gnu.org; Sat, 17 Aug 2013 03:22:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VAapu-0000Fl-3v for help-gnu-emacs@gnu.org; Sat, 17 Aug 2013 03:22:17 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:37590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAapt-0000FZ-Ta for help-gnu-emacs@gnu.org; Sat, 17 Aug 2013 03:22:10 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VAaps-0006CR-ML for help-gnu-emacs@gnu.org; Sat, 17 Aug 2013 09:22:08 +0200 Original-Received: from dslc-082-083-054-038.pools.arcor-ip.net ([82.83.54.38]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 17 Aug 2013 09:22:08 +0200 Original-Received: from deng by dslc-082-083-054-038.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 17 Aug 2013 09:22:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dslc-082-083-054-038.pools.arcor-ip.net User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:2rDBXjUj94JoW/zxlQD9t7VFPNs= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:92949 Archived-At: Eric Abrahamsen writes: > Okay, I guess I get it. I was thinking of eieio-persistent as a slightly > unusual case just because object constructors are being written to a > file, and the potential for breakage seems a little more dramatic. But > perhaps some nice error handling and reporting is all that's necessary. `eieio-defclass-autoload' only creates a mock class; this is necessary so that EIEIO already knows about it, but that class is not yet functional. It then creates a plain `autoload' for the actual constructor function. So far this has worked very well, at least for CEDET, which autoloads a lot of classes. > Just out of curiosity, how do you create an autoload file for your > smaller packages? With an emacs script like this: #!emacs --script (setq my-base-path (expand-file-name "~/emacs-packages/")) (setq dirs '("smallstuff" "speck" "minimap" "magit")) (let ((generated-autoload-file (concat my-base-path "loaddefs.el"))) (cd my-base-path) (dolist (dir dirs) (update-directory-autoloads dir))) -David