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


View this message in rfc822 format

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: bug#30786: Save text properties in desktop
Date: Sat, 07 Apr 2018 21:54:52 -0400
Juri Linkov <juri <at> linkov.net> writes:

>>>>>>> +     ;; 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))))
>>
>>> If we can afford continuing incrementing the desktop file version in
>>> ‘desktop-file-version’ doing this every time when support for reading more
>>> syntaxes is added, thus preventing incompatibilities, then the patch above
>>> would be the most reliable solution.
>>
>> You would also have to strip text properties according to the value of
>> desktop-file-version, right?
>
> This won't help for the counterexample that you demonstrated earlier with
> (put-text-property 1 2 'foo (point-marker)).  Whereas this patch does.

Sorry, I don't think I explained my point very well above.

Using `read' to check readability can only test which objects are
readable in the current Emacs version.  So if we rely on that, then we
can only reliably produce desktop files compatible with the current
version.  Which means the only thing that desktop-file-version helps
with is giving a slightly better error message, yes?

(I don't think this is necessarily a deal-breaker, as long as it's well
documented)




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

Previous Next


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