GNU bug report logs - #30786
Save text properties in desktop

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Mon, 12 Mar 2018 22:00:02 UTC

Severity: normal

Fixed in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 30786 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 30786 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#30786: Save text properties in desktop
Date: Mon, 02 Apr 2018 17:48:09 -0400
Juri Linkov <juri <at> linkov.net> writes:

> Even when the print syntax becomes readable in later versions, we still
> can't write such syntax because earlier Emacs versions should be able
> to read the same desktop file.

> 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.




This bug report was last modified 7 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.