GNU bug report logs - #14978
24.3.50; `savehist-printable' implementation question for strings

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 28 Jul 2013 23:38:02 UTC

Severity: minor

Found in version 24.3.50

Done: Drew Adams <drew.adams <at> oracle.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 14978 <at> debbugs.gnu.org
Subject: bug#14978: 24.3.50; `savehist-printable' implementation question for strings
Date: Tue, 30 Jul 2013 22:31:17 -0400
> 1. Doesn't this do the same thing as that `equal-including-properties'
>    test:

>    (and (null (text-properties-at 0 value))
>         (= 0 (next-property-change 0 value)))

I think so, yes.

>    If it does do the same thing, is it more efficient or less?

Yours might be more efficient because it avoids memory allocation.
But they probably each are more efficient in some circumstances.

> 2. Is it really necessary to exclude all text properties from a printed
>    string in order for it to be Lisp-readable?  If not, can we improve
>    this code so it is not unnecessarily restrictive?

You'd have to make sure all the properties are themselves readable.

> I'm guessing that for #2 the answer is yes, it is necessary, because a
> text property can have any Lisp value,

That's right.

> including a circular list value,

Actually circular values should be handled fine; problems come when you
bump into objects like markers, buffers, windows, processes, ...


        Stefan




This bug report was last modified 12 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.