[Top][All Lists]

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

bug#30786: Save text properties in desktop

From: Juri Linkov
Subject: bug#30786: Save text properties in desktop
Date: Tue, 03 Apr 2018 23:11:46 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> Do you think this patch covers all possible unreadable cases on writing?
>> +     ;; Get rid of unreadable text properties.
>> +     (if (ignore-errors (read (format "%S" value)))
>> +         (cons 'may value)
>> +       (let ((copy (copy-sequence value)))
>> +         (set-text-properties 0 (length copy) nil copy)
>> +         (cons 'may copy))))
> I think it won't cover the case where an object's print syntax is only
> readable by the current Emacs version, and not an earlier one.  To
> handle that you'll need to call desktop--v2s recursively, like in the
> vectorp and consp branches.

I don't understand how calling desktop--v2s recursively will ensure its
readability in earlier versions?  For example, if Emacs 27 will write to
the desktop file ‘#("foo" 0 3 (bar 42))’ how Emacs 19 can read it?

reply via email to

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