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: [Released] Re: 23.0.50; savehist save invalid syntax Date: Tue, 11 Sep 2007 17:29:44 -0400 Message-ID: References: <25364.128.165.0.81.1189472104.squirrel@webmail.lanl.gov> <40804.128.165.123.18.1189544766.squirrel@webmail.lanl.gov> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1189546220 8974 80.91.229.12 (11 Sep 2007 21:30:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Sep 2007 21:30:20 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Drew Adams To: herring@lanl.gov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 11 23:30:17 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IVDJ6-0001EO-R9 for ged-emacs-devel@m.gmane.org; Tue, 11 Sep 2007 23:30:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVDJ6-0004rt-P9 for ged-emacs-devel@m.gmane.org; Tue, 11 Sep 2007 17:30:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IVDJ2-0004qI-Qa for emacs-devel@gnu.org; Tue, 11 Sep 2007 17:30:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IVDJ2-0004px-Dq for emacs-devel@gnu.org; Tue, 11 Sep 2007 17:30:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVDJ2-0004po-3Y for emacs-devel@gnu.org; Tue, 11 Sep 2007 17:30:00 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IVDJ1-0002Mh-SX for emacs-devel@gnu.org; Tue, 11 Sep 2007 17:29:59 -0400 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IVDId-0003x3-6k for emacs-pretest-bug@gnu.org; Tue, 11 Sep 2007 17:29:35 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1IVDIz-0002Lt-27 for emacs-pretest-bug@gnu.org; Tue, 11 Sep 2007 17:29:59 -0400 Original-Received: from vpn-132-204-232-94.acd.umontreal.ca ([132.204.232.94] helo=ceviche.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IVDIy-0002Ll-Po for emacs-pretest-bug@gnu.org; Tue, 11 Sep 2007 17:29:56 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id E79FAB4098; Tue, 11 Sep 2007 17:29:44 -0400 (EDT) In-Reply-To: <40804.128.165.123.18.1189544766.squirrel@webmail.lanl.gov> (Davis Herring's message of "Tue\, 11 Sep 2007 14\:06\:06 -0700 \(PDT\)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Linux 2.6 (newer, 3) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) 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:78608 gmane.emacs.pretest.bugs:19851 Archived-At: >> I think this special case of print-unreadable-function being bound to t is >> rather unnecessary. > It seemed to me that without that option, each package that used the > feature would quickly end up writing the same function: > (defun package-unreadable-function (obj) > "Signal that OBJ would be unreadable." > (error "%S can't be printed readably" obj)) That's OK. We can even provide this function in subr.el so they can replace (let ((print-unreadable-function t)) with (let ((print-unreadable-function 'signal-print-unreadable-error)) [ But I do think that signalling `error' would be wrong: it needs to be more precise. I'm sure you agree with me since that's already what t does right now in your code IIUC. ] > (This of course loses the specific error symbol.) I know when I was > testing it (before it supported t) I immediately felt silly writing a > function that just redirected to `error'. It seems to me that "print this I'd personally write (let ((print-unreadable-function (lambda (obj) (signal 'the-error obj)))) or (let ((print-unreadable-function (lambda (obj) (throw 'the-error obj)))) and I don't feel silly about it at all. > Of course, while thinking about this it occurs to me that while (4 5 ...) > (produced with a finite `print-length' or `print-level') is actually > readable, it certainly does not read as what was written. Should this > trigger the unreadable-handling as well? I'd prefer that setting print-unreadable-function automatically overrides any print-length or print-level limit. Stefan