GNU bug report logs -
#15382
desktop restores buffers in wrong order
Previous Next
Full log
View this message in rfc822 format
>> Maybe buffers should be saved in the desktop in reverse order?
>> This will restore the original order of the global buffer list.
>
> You could try it with and without desktop-restore-frames and report back.
I tried to replace
(dolist (l (mapcar 'desktop-buffer-info (buffer-list)))
with
(dolist (l (mapcar 'desktop-buffer-info (nreverse (buffer-list))))
but it breaks the desktop saving by inserting the desktop file
to the current buffer. Then I tried to replace it with
(dolist (l (nreverse (mapcar 'desktop-buffer-info (buffer-list))))
and it saves the desktop in the natural order that could be replayed back
when restoring the desktop to get the buffer list in the same order.
But more code prevents from restoring in the same order, e.g.
;; Restore buffer list order with new buffer at end. Don't change
;; the order for old desktop files (old desktop module behavior).
(unless (< desktop-file-version 206)
(mapc 'bury-buffer buffer-list)
(when result (bury-buffer result)))
I'm afraid that changing the order of buffers in the desktop file
might require incrementing the version number in desktop-file-version.
This bug report was last modified 8 years and 295 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.