From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: Any way to control which articles Gnus summary shows by default? Date: Tue, 10 Apr 2018 09:27:43 -0700 Message-ID: <87po37jabk.fsf@ericabrahamsen.net> References: <86lge3ric2.fsf@zoho.com> <87vad78nh2.fsf@web.de> <87sh8bsa2c.fsf@ericabrahamsen.net> <87in97jkzk.fsf@web.de> <87lge3ryvn.fsf@ericabrahamsen.net> <87sh8bm3u1.fsf@web.de> <874lkogzel.fsf@web.de> <87lge0pdfg.fsf@ericabrahamsen.net> <87efjsdxx0.fsf@ericabrahamsen.net> <87d0z9zss2.fsf@web.de> <87r2npoi40.fsf@ericabrahamsen.net> <878t9xzoot.fsf@web.de> <87woxhmsim.fsf@ericabrahamsen.net> <87h8olmer2.fsf@ericabrahamsen.net> <87k1tgtqny.fsf@web.de> <87muycibgv.fsf@ericabrahamsen.net> <87vad06tin.fsf@web.de> <87po38gmma.fsf@ericabrahamsen.net> <87po376yvq.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1523377760 28452 195.159.176.226 (10 Apr 2018 16:29:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 10 Apr 2018 16:29:20 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 10 18:29:15 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f5w8u-0007FI-J8 for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Apr 2018 18:29:12 +0200 Original-Received: from localhost ([::1]:55611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5wB0-0008MO-BX for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Apr 2018 12:31:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5wAA-0008J1-9O for help-gnu-emacs@gnu.org; Tue, 10 Apr 2018 12:30:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5wA7-0000IA-27 for help-gnu-emacs@gnu.org; Tue, 10 Apr 2018 12:30:30 -0400 Original-Received: from [195.159.176.226] (port=38406 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5wA6-0000HL-Py for help-gnu-emacs@gnu.org; Tue, 10 Apr 2018 12:30:26 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1f5w7y-00067u-M0 for help-gnu-emacs@gnu.org; Tue, 10 Apr 2018 18:28:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:gF3p1bekP0l7GY098TOypt/MH2E= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116443 Archived-At: Michael Heerdegen writes: > Eric Abrahamsen writes: > >> The process as I'd like to have it looks more like (with code for >> backwards compatibility removed): >> >> (defun eieio-persistent-fix-value (value) >> (let (result) >> (when (consp value) >> (if (class-p (car value)) >> (setq result >> (eieio-persistent-make-instance (car value) (cdr value)) >> value nil) >> (while (consp value) >> (push (eieio-persistent-fix-value (car value)) result) >> (setq value (cdr value))))) >> (if (eieio-object-p result) >> result >> (nconc (nreverse result) >> (if (stringp value) >> (substring-no-properties value) >> value))))) > > There must be something missing: VALUEs that are not consp are never > handled by this. If VALUE isn't a consp, it falls through to the equivalent of: (nconc (nreverse nil) value) It might not be the most efficient (I'd really like to work on making this whole process more efficient), but it comes out correctly. This entire process shouldn't do anything but reconstruct objects, and strip properties from strings. > A minor problem with that approach is that `eieio-persistent-fix-value' > (I would rather call it "eieio-persistent-restore-value") can't > distinguish between objects and data that looks like an object. That's the current state of the debate! There is a thread on emacs.devel (or maybe a bug report, now I can't find it) from a while back where I was discussing this with Stefan and others. We got as far as "there should be no ambiguity/collisions about what's an object constructor and what's a list." Then I got sidetracked by the continuing breakage of the Gnus registry. If you've got some ideas about this (very welcome!), maybe we should move the discussion there. Eric