all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Drew Adams <drew.adams@oracle.com>
Cc: 14978@debbugs.gnu.org
Subject: bug#14978: 24.3.50; `savehist-printable' implementation question for strings
Date: Tue, 30 Jul 2013 22:31:17 -0400	[thread overview]
Message-ID: <jwvpptztqfj.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <14cad2c9-96ba-4ab8-9151-04ae23d5ea61@default> (Drew Adams's message of "Sun, 28 Jul 2013 16:37:10 -0700 (PDT)")

> 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





  reply	other threads:[~2013-07-31  2:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-28 23:37 bug#14978: 24.3.50; `savehist-printable' implementation question for strings Drew Adams
2013-07-31  2:31 ` Stefan Monnier [this message]
2013-07-31  4:56   ` Drew Adams
2013-07-31 13:59     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvpptztqfj.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=14978@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.