[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any way to control which articles Gnus summary shows by default?

From: Eric Abrahamsen
Subject: Re: Any way to control which articles Gnus summary shows by default?
Date: Tue, 10 Apr 2018 09:27:43 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Michael Heerdegen <address@hidden> writes:

> Eric Abrahamsen <address@hidden> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]