all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: 36894@debbugs.gnu.org
Subject: bug#36894: Stability issues in frameset sorting
Date: Tue, 06 Aug 2019 00:17:32 +0300	[thread overview]
Message-ID: <877e7rwbv7.fsf@mail.linkov.net> (raw)
In-Reply-To: <878sscwovy.fsf@mail.linkov.net> (Juri Linkov's message of "Fri,  02 Aug 2019 00:34:57 +0300")

[-- Attachment #1: Type: text/plain, Size: 590 bytes --]

> Currently frameset sorting is not stable.  It changes the sorting order of equal
> minibuffer-owning frames.  On closer inspection it becomes clear that
> frameset--mini parameters are messed up in 'frameset--minibufferless-last-p'.
> This patch should fix it:

Pushed to master.

Now one problem still remains: the desktop file doesn't restore the
selected frame, i.e. after restoring frames from the desktop file,
the selected frame is not the same as was before saving the desktop.
This patch ensures that the previously selected frame is restored last,
thus becoming selected again:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: frameset--minibufferless-last-p.last-focus-update.patch --]
[-- Type: text/x-diff, Size: 759 bytes --]

diff --git a/lisp/frameset.el b/lisp/frameset.el
index a8b16706c2..8e69bfb499 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -1104,7 +1106,9 @@ frameset--minibufferless-last-p
 Internal use only."
   (pcase-let ((`(,hasmini1 . ,id-def1) (cdr (assq 'frameset--mini (car state1))))
 	      (`(,hasmini2 . ,id-def2) (cdr (assq 'frameset--mini (car state2)))))
-    (cond ((eq id-def1 t) t)
+    (cond ((and (eq hasmini1 t) (eq hasmini2 t) (eq (cdr (assq 'last-focus-update (car state1))) t)) nil)
+          ((and (eq hasmini1 t) (eq hasmini2 t) (eq (cdr (assq 'last-focus-update (car state2))) t)) t)
+          ((eq id-def1 t) t)
 	  ((eq id-def2 t) nil)
 	  ((not (eq hasmini1 hasmini2)) (eq hasmini1 t))
 	  ((eq hasmini1 nil) (or id-def1 id-def2))

  reply	other threads:[~2019-08-05 21:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 21:34 bug#36894: Stability issues in frameset sorting Juri Linkov
2019-08-05 21:17 ` Juri Linkov [this message]
2019-08-06 15:14   ` Eli Zaretskii
2019-08-06 22:09     ` Juri Linkov
2019-08-07  2:29       ` Eli Zaretskii
2019-08-09 18:09         ` Juri Linkov
2019-08-09 19:04           ` Eli Zaretskii
2019-08-11 20:51             ` bug#36894: Restore frameset focus and selectedness Juri Linkov
2019-08-12 15:00               ` Eli Zaretskii
2019-08-13 21:29                 ` Juri Linkov
2019-08-14  8:58                   ` martin rudalics
2019-08-14 14:25                     ` Eli Zaretskii
2019-08-14 20:50                       ` Juri Linkov
2019-08-15  8:12                       ` martin rudalics
2019-08-15 18:36                         ` Juri Linkov
2019-08-15 19:37                           ` Eli Zaretskii
2019-08-16  7:29                           ` martin rudalics
2019-08-17  7:19                         ` Eli Zaretskii
2019-08-17  8:24                           ` martin rudalics
2019-08-17 10:12                             ` Eli Zaretskii
2019-08-17 22:40                               ` Juri Linkov
2019-08-19  7:38                               ` martin rudalics
2019-08-14 20:49                     ` Juri Linkov

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=877e7rwbv7.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=36894@debbugs.gnu.org \
    /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.