From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#14978: 24.3.50; `savehist-printable' implementation question for strings Date: Tue, 30 Jul 2013 22:31:17 -0400 Message-ID: References: <14cad2c9-96ba-4ab8-9151-04ae23d5ea61@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375237943 4779 80.91.229.3 (31 Jul 2013 02:32:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2013 02:32:23 +0000 (UTC) Cc: 14978@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 31 04:32:24 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V4MDA-0004yQ-1p for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Jul 2013 04:32:24 +0200 Original-Received: from localhost ([::1]:49167 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4MD9-0007hV-Li for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Jul 2013 22:32:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4MCx-0007gC-GZ for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 22:32:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4MCp-00007W-L2 for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 22:32:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4MCp-00007M-HY for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 22:32:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V4MCo-0002Ez-GU for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 22:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Jul 2013 02:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14978 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14978-submit@debbugs.gnu.org id=B14978.13752378878536 (code B ref 14978); Wed, 31 Jul 2013 02:32:02 +0000 Original-Received: (at 14978) by debbugs.gnu.org; 31 Jul 2013 02:31:27 +0000 Original-Received: from localhost ([127.0.0.1]:59523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4MCE-0002DX-Eo for submit@debbugs.gnu.org; Tue, 30 Jul 2013 22:31:26 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:46329) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4MCB-0002D0-US for 14978@debbugs.gnu.org; Tue, 30 Jul 2013 22:31:24 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFpZvt/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgaxH5AOkQoDklqSIIFegxM X-IPAS-Result: Av8EABK/CFFFpZvt/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgaxH5AOkQoDklqSIIFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="20221104" Original-Received: from 69-165-155-237.dsl.teksavvy.com (HELO pastel.home) ([69.165.155.237]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Jul 2013 22:31:11 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 8911466E5D; Tue, 30 Jul 2013 22:31:17 -0400 (EDT) In-Reply-To: <14cad2c9-96ba-4ab8-9151-04ae23d5ea61@default> (Drew Adams's message of "Sun, 28 Jul 2013 16:37:10 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76838 Archived-At: > 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