[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Loading an output from prin1 (savehist bug).
From: |
Stefan Monnier |
Subject: |
Re: Loading an output from prin1 (savehist bug). |
Date: |
Thu, 25 May 2006 10:23:20 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>> > 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