all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 15382@debbugs.gnu.org
Subject: bug#15382: desktop restores buffers in wrong order
Date: Wed, 05 Feb 2014 10:07:27 +0200	[thread overview]
Message-ID: <87zjm6kmo0.fsf@mail.jurta.org> (raw)
In-Reply-To: <CAAeL0SQ_GrQhh8ZihaEPFw309nnz61PxUxXZmjz9Kqn3uS05rQ@mail.gmail.com> (Juanma Barranquero's message of "Tue, 17 Dec 2013 22:01:09 +0100")

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





  reply	other threads:[~2014-02-05  8:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-15  8:51 bug#15382: desktop restores buffers in wrong order Juri Linkov
2013-09-15 16:10 ` martin rudalics
2013-09-16 21:17   ` Juri Linkov
2013-09-17  6:45     ` martin rudalics
2013-12-15 21:44 ` Juri Linkov
2013-12-15 21:58   ` Juanma Barranquero
2013-12-16 21:05     ` Juri Linkov
2013-12-17 16:07       ` Juanma Barranquero
2013-12-17 17:31         ` martin rudalics
2013-12-17 19:58         ` Juri Linkov
2013-12-17 21:01           ` Juanma Barranquero
2014-02-05  8:07             ` Juri Linkov [this message]
2013-12-17 17:31       ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zjm6kmo0.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=15382@debbugs.gnu.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.