From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#36894: Stability issues in frameset sorting Date: Fri, 02 Aug 2019 00:34:57 +0300 Organization: LINKOV.NET Message-ID: <878sscwovy.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="200864"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) To: 36894@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 01 23:47:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1htIuk-000q81-QM for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Aug 2019 23:47:11 +0200 Original-Received: from localhost ([::1]:59358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htIuj-0003QI-Pe for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Aug 2019 17:47:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59125) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htIue-0003Pv-DT for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:47:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htIud-0005uu-Al for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:47:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46727) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htIud-0005uW-6t for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:47:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1htIud-0003j4-2p for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:47:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Aug 2019 21:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36894 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156469598312429 (code B ref -1); Thu, 01 Aug 2019 21:47:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Aug 2019 21:46:23 +0000 Original-Received: from localhost ([127.0.0.1]:55546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htItx-0003C5-7c for submit@debbugs.gnu.org; Thu, 01 Aug 2019 17:46:21 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:35004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htItu-00039L-5V for submit@debbugs.gnu.org; Thu, 01 Aug 2019 17:46:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58564) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htIts-0002iN-SV for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:46:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htItr-00055I-UY for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:46:16 -0400 Original-Received: from chocolate.birch.relay.mailchannels.net ([23.83.209.35]:51034) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1htItp-00052L-VL for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:46:15 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 6981C502182 for ; Thu, 1 Aug 2019 21:46:09 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a12.g.dreamhost.com (100-96-4-69.trex.outbound.svc.cluster.local [100.96.4.69]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id CD65E502706 for ; Thu, 1 Aug 2019 21:46:08 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a12.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.5); Thu, 01 Aug 2019 21:46:09 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Whistle-Well-Made: 4653f9387ee2707f_1564695969112_2096735568 X-MC-Loop-Signature: 1564695969112:731911815 X-MC-Ingress-Time: 1564695969112 Original-Received: from pdx1-sub0-mail-a12.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a12.g.dreamhost.com (Postfix) with ESMTP id 35CAD83B1D for ; Thu, 1 Aug 2019 14:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:date:message-id:mime-version:content-type; s= linkov.net; bh=gIeOlmFvhPkMVWA36EuxwlyJy/A=; b=rSIJ8FuQhmv39FwkC ZYFbJP7F7vABIyRY4U5iTG6kjIbZawHuc9Bx4m27GUkYydQfGx3n+gpKKLil68j1 +5UnmKUhXEDxvFjAeWr6euPlcnuCmCWGnlV7LcDSpTxBBR+uzp5Bave/3pIrluV/ NiFoEJyKX6yidz6Q1yskz9vOjU= Original-Received: from mail.jurta.org (m91-129-103-76.cust.tele2.ee [91.129.103.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a12.g.dreamhost.com (Postfix) with ESMTPSA id EF01383B16 for ; Thu, 1 Aug 2019 14:46:02 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a12 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrleekgddtgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofffkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrdejieenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdejiedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164286 Archived-At: --=-=-= Content-Type: text/plain 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: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=frameset--minibufferless-last-p.patch 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)) --=-=-=--