From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jeff Clough Newsgroups: gmane.emacs.help Subject: Re: LISP Questions - random, random elements and memory management Date: Thu, 19 Nov 2009 10:16:14 -0500 (EST) Message-ID: <20091119.101614.37733655.jeff@chaosphere.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1258646119 21771 80.91.229.12 (19 Nov 2009 15:55:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2009 15:55:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 19 16:55:12 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NB9Li-0007UR-Va for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Nov 2009 16:55:11 +0100 Original-Received: from localhost ([127.0.0.1]:45609 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NB9Li-0001uF-Gm for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Nov 2009 10:55:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NB8jY-0008St-OI for help-gnu-emacs@gnu.org; Thu, 19 Nov 2009 10:15:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NB8jW-0008Qg-61 for help-gnu-emacs@gnu.org; Thu, 19 Nov 2009 10:15:43 -0500 Original-Received: from [199.232.76.173] (port=49985 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NB8jW-0008QT-0L for help-gnu-emacs@gnu.org; Thu, 19 Nov 2009 10:15:42 -0500 Original-Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:33831) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NB8jV-0002WF-Hb for help-gnu-emacs@gnu.org; Thu, 19 Nov 2009 10:15:41 -0500 Original-Received: from localhost ([74.70.71.134]) by hrndva-omta02.mail.rr.com with ESMTP id <20091119151540045.ZBM18187@hrndva-omta02.mail.rr.com> for ; Thu, 19 Nov 2009 15:15:40 +0000 X-Mailer: Mew version 6.3rc1 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (1203?) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69927 Archived-At: From: Barry Margolin Date: Thu, 19 Nov 2009 08:44:24 -0500 > How about putting it in a text file that you load into a temporary > buffer when you need it? Then kill the buffer when you're done with it. I was thinking about this. The only real issue is with figuring out a good lifecycle for the buffer that wouldn't leave the user confused ("Hey, where did this buffer come from?") or result in the file being loaded/unloaded frequently enough to cause delays. At this point, after dicking around in the Emacs Lisp manual, I'm going to keep this as a "load" in my .emacs and assume that anyone who wants to use the code will either do the same, or set up an autoload expression if they care about memory usage. When I know more about provide/require, I'll probably revisit it. Thanks for the suggestion, though! Jeff