unofficial mirror of bug-gnu-emacs@gnu.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: Fri, 02 Aug 2019 00:34:57 +0300	[thread overview]
Message-ID: <878sscwovy.fsf@mail.linkov.net> (raw)

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

Tags: patch

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:


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

diff --git a/lisp/frameset.el b/lisp/frameset.el
index 73b2071a5a..0d921421ad 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -1102,8 +1104,8 @@ frameset--minibufferless-last-p
   "Predicate to sort frame states in an order suitable for creating frames.
 It sorts minibuffer-owning frames before minibufferless ones.
 Internal use only."
-  (pcase-let ((`(,hasmini1 ,id-def1) (assq 'frameset--mini (car state1)))
-	      (`(,hasmini2 ,id-def2) (assq 'frameset--mini (car state2))))
+  (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)
 	  ((eq id-def2 t) nil)
 	  ((not (eq hasmini1 hasmini2)) (eq hasmini1 t))

             reply	other threads:[~2019-08-01 21:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 21:34 Juri Linkov [this message]
2019-08-05 21:17 ` bug#36894: Stability issues in frameset sorting Juri Linkov
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=878sscwovy.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).