From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: persistent lisp objects Date: Wed, 7 Oct 2009 09:53:29 -0700 Message-ID: References: <871vlqt9rv.fsf@tux.homenetwork> <87ljjv5y5b.fsf@tux.homenetwork> 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 1254937814 27320 80.91.229.12 (7 Oct 2009 17:50:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Oct 2009 17:50:14 +0000 (UTC) To: "'Thierry Volpiatto'" , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 07 19:50:04 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mvae6-0001nc-KH for ged-emacs-devel@m.gmane.org; Wed, 07 Oct 2009 19:49:50 +0200 Original-Received: from localhost ([127.0.0.1]:58969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mvae6-0001iK-5L for ged-emacs-devel@m.gmane.org; Wed, 07 Oct 2009 13:49:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvZoh-0000oI-2R for emacs-devel@gnu.org; Wed, 07 Oct 2009 12:56:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvZoc-0000mU-FV for emacs-devel@gnu.org; Wed, 07 Oct 2009 12:56:42 -0400 Original-Received: from [199.232.76.173] (port=60326 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvZoc-0000mP-4Q for emacs-devel@gnu.org; Wed, 07 Oct 2009 12:56:38 -0400 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:17020) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MvZob-0007nh-DY for emacs-devel@gnu.org; Wed, 07 Oct 2009 12:56:37 -0400 Original-Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n97GublT028275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 7 Oct 2009 16:56:39 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n97GsTbq001705; Wed, 7 Oct 2009 16:54:29 GMT Original-Received: from abhmt019.oracle.com by acsmt355.oracle.com with ESMTP id 20264126161254934409; Wed, 07 Oct 2009 09:53:29 -0700 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 07 Oct 2009 09:53:29 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87ljjv5y5b.fsf@tux.homenetwork> Thread-Index: AcpCcGV9dTEgHGSiRH+SR7r2RfmJ/gE/BMDw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt353.oracle.com [141.146.40.153] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4ACCC7A8.00F2:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115963 Archived-At: > We can actually save any lisp object in a compiled file: > > This is a feature of `eval-when-compile' that is not documented. > It can be interesting as AFAIK there is no way to save object. Now that the detour about licensing has died down, perhaps we can return to this? ;-) >From what I understand, Thierry says that Emacs now has a general serialization/deserialization feature, in the form of byte-compiling to a file and then reading that file. I haven't tested it, but if true, this is great news, and I'm surprised it isn't mentioned as such (that I can tell) in NEWS. How about adding explicit Lisp functions that capture this feature, as such? IOW, instead of a few people knowing about this as a nice hack that happens to work with the (recent) byte-compiler, how about defining `(de)serialize' functions that make use of this feature, and advertize those functions? If the functions were standalone (even if they borrowed some of the byte-compiler code), then they could perhaps even be used in older Emacs versions. IOW, how about breaking this part of the byte-compiler code out, as separate functions (which would also be used by the byte-compiler, of course). (Dunno if this last part makes sense - maybe it's the whole byte-compiler that would be needed.) Anyway, it sounds to me like Thierry's discovery, if general, could be exploited and made more directly noticeable/usable by users. And at the very least, how about documenting this existing feature, as Thierry requested?