From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: Loading an output from prin1 (savehist bug). Date: Thu, 25 May 2006 10:23:20 -0400 Message-ID: References: <874q07xfm5.fsf@lrde.org> <87odxoslsr.fsf@lrde.org> <8764jubadb.fsf@lrde.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1148567114 4884 80.91.229.2 (25 May 2006 14:25:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 25 May 2006 14:25:14 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 25 16:25:11 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FjGlm-0006bk-JZ for ged-emacs-devel@m.gmane.org; Thu, 25 May 2006 16:24:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjGlm-00017q-1Z for ged-emacs-devel@m.gmane.org; Thu, 25 May 2006 10:24:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FjGkI-0000g5-RD for emacs-devel@gnu.org; Thu, 25 May 2006 10:23:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FjGkH-0000f2-6H for emacs-devel@gnu.org; Thu, 25 May 2006 10:23:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjGkG-0000ew-Vj; Thu, 25 May 2006 10:23:25 -0400 Original-Received: from [209.226.175.110] (helo=tomts43-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FjGow-00050n-DK; Thu, 25 May 2006 10:28:14 -0400 Original-Received: from localhost ([70.53.193.49]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060525142322.JEDC1543.tomts43-srv.bellnexxia.net@localhost>; Thu, 25 May 2006 10:23:22 -0400 Original-Received: by localhost (Postfix, from userid 20848) id 27C2F8258; Thu, 25 May 2006 10:23:20 -0400 (EDT) Original-To: michael.cadilhac@lrde.org (=?iso-8859-1?Q?Micha=EBl?= Cadilhac) In-Reply-To: <8764jubadb.fsf@lrde.org> (=?iso-8859-1?Q?Micha=EBl?= Cadilhac's message of "Thu, 25 May 2006 13:40:48 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:55275 gmane.emacs.pretest.bugs:12175 Archived-At: >> > If some code output command-history with prin1 then try to load it >> > back, the # things will cause parse errors. >> We can't alter that. I see a few possible solutions: >> >> 1. Don't put markers into arguments to interactive commands, >> except thru the specific functions (point), (mark), etc., >> which go into command-history as calls to those functions. >> >> 2. Fix programs such as bbdb-create and savehist to find >> such markers and replace them with nil. >> >> 3. Create a more general mechanism for commands to specify >> how to record calls to them in command-history. >> >> Solution #1 seems simplest; is there any reason why you need to put >> these markers in args to commands? I think those uses of prin1 really call for some way to reliably print data in a lisp-readable form. I.e. a variant of prin1 (or a way to tell prin1) that ignores print-depth and friends and which signals an error when it encounters an element that it can't print readably (e.g. a marker, a hash table, ...). Stefan