From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#63967: 28.2; switch-to-buffer in normal window fails if minibuffer window is active Date: Sun, 11 Jun 2023 14:35:59 +0000 Message-ID: References: <83o7lo28e6.fsf@gnu.org> <83fs701uts.fsf@gnu.org> <83a5x81m33.fsf@gnu.org> <83a5x6zj38.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31828"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "al@petrofsky.org" , "rudalics@gmx.at" , "monnier@iro.umontreal.ca" , "63967@debbugs.gnu.org" <63967@debbugs.gnu.org> To: Alan Mackenzie , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 11 16:37:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q8MBu-00080n-5v for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Jun 2023 16:37:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q8MBk-0002Aj-VB; Sun, 11 Jun 2023 10:37:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q8MBi-0002AW-LW for bug-gnu-emacs@gnu.org; Sun, 11 Jun 2023 10:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q8MBi-0003Te-DV for bug-gnu-emacs@gnu.org; Sun, 11 Jun 2023 10:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q8MBi-0005ER-5e for bug-gnu-emacs@gnu.org; Sun, 11 Jun 2023 10:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Jun 2023 14:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63967 X-GNU-PR-Package: emacs Original-Received: via spool by 63967-submit@debbugs.gnu.org id=B63967.168649416920031 (code B ref 63967); Sun, 11 Jun 2023 14:37:02 +0000 Original-Received: (at 63967) by debbugs.gnu.org; 11 Jun 2023 14:36:09 +0000 Original-Received: from localhost ([127.0.0.1]:37599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8MAq-0005D1-Jb for submit@debbugs.gnu.org; Sun, 11 Jun 2023 10:36:08 -0400 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:20050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8MAm-0005Cr-TB for 63967@debbugs.gnu.org; Sun, 11 Jun 2023 10:36:06 -0400 Original-Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35BA8YOo004078; Sun, 11 Jun 2023 14:36:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=r0E7LS4IuvneTX4VjxeL4tjR6Z54NuBJ6i1FB6NCXFc=; b=RZaDGKxtkFgPoyD/ZAU3/hud4ecUIc1MLm+WLJEmsV+TwKIkDidO5YixxnDY05RJgpE3 Tz0KnXDAINdW+Wm4Maj2h8tsv6PZ9wVVnDEsDkBv02/5dSTyG+/Hc+S/MNLzTOTRsj9I sz33j8Cm46ILn6Bpr+TCPAV4hqgV6EGdM2hhhDQFy4XmnCY0el5fo3CCQ7Sib88ffy9Q qY5uytfA3GGbFVCjbKHS9cd1nPLegmtReqiHSSP+I7446IBuTFsMafO+VEqmK0fd86b3 sBZNtRc/5Jmyg1+aeuS4PWRts1ZWoPLMzZwmNIoxq+lJiks7v0DrIeWrbxW+75E3pfeW HA== Original-Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r4gstsbk5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Jun 2023 14:36:03 +0000 Original-Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 35BD2P4Z016215; Sun, 11 Jun 2023 14:36:03 GMT Original-Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam04lp2175.outbound.protection.outlook.com [104.47.73.175]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r4fm1wvrp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Jun 2023 14:36:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I0z4RUiKNQv/8hL0CdbG4Sm1IZAaKSxEYzXVMNbnD6Mg1jaQzbGhZ9FVB/kl+Kp59et0oaqANnx/XrJUfXSM2oBEOW5a2NdvR3oX3d+pA8xZMeQOyjnN8+5JxVrVRqiVQzMY5A+71vzHhYkYrt9ok1L2jHFmQtEGwjfejScBhgU7dH/0+nXTMK0ZCeZFPvimRTZQwnz03Ad37R8we3s0d6lKbGmFenWWmLR2rlL2/+4C5uDXFCx7MNghZVwGNj8t+bhzbCsFdTMquVYn8Z89MeTqHJ6toRKo8rEQ1PDCYkuJmtMtK9SelVljuWv2HQ59rZQtzzgsPzUEFWeQQTDhFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r0E7LS4IuvneTX4VjxeL4tjR6Z54NuBJ6i1FB6NCXFc=; b=Y7Qx7Y/TTdtfp2Xc9jjUf2HkfOznRB9QZomJnlEJUwn37nJJmZV25gNcR2YbIg/DrAzEUqMhveQX4Ns7AiSuZdiXPNDxYz4iv9oKTKUYruuMOIJuRY3E5APiNrViWRy64wwCMQuBVheUKOtCGtdkSm21Z8qdyB1jXV0s1FI4xbGLzwQEe+sXcRTbuYYF4gnrmLfw1puNwYN+6Ne0e0vYBM94IusYTy2B5J0SRAtzMEGnAPgKhmZuBHttF0vxfKkc/YVv7xSeDVmb/7K3OWTRC8HKATHz005cJtsUnfXl7ZIHLWxcOA4KN0Uq6gFiLKc5GqIBVd/Nx967bbSZd/bheQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r0E7LS4IuvneTX4VjxeL4tjR6Z54NuBJ6i1FB6NCXFc=; b=pO2vhPv6+C2UA0ih4bfHSmUZpuUekVVHwWCOf8szU8tVdjFcq8s/FB/g9XExLuWN7kWpVEF0gCQlAUnVY63GVOOU0xnRVWOiS1TIVqWZMIOSkq8VrJYOk0bc1PBTyEGY0cmAKZuUTYhDCVCfe74o2mpf0i/kqt4wNOqJtGBEB9o= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by PH0PR10MB5705.namprd10.prod.outlook.com (2603:10b6:510:146::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Sun, 11 Jun 2023 14:36:00 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::dc5:6c42:cd71:3909]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::dc5:6c42:cd71:3909%4]) with mapi id 15.20.6455.037; Sun, 11 Jun 2023 14:35:59 +0000 Thread-Topic: [External] : bug#63967: 28.2; switch-to-buffer in normal window fails if minibuffer window is active Thread-Index: AQHZnGqMSGVoT80BOUWG+K7vhRRqy6+FnNCQ In-Reply-To: Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|PH0PR10MB5705:EE_ x-ms-office365-filtering-correlation-id: b484d44c-dcdd-43b5-f3e5-08db6a892ca4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MiFkAfBKQ+CPbjLoGBHdcrM+GYBZkzCGMbqSiDKMtfVuAKFzH18BKjTg/4sunIN00B6ltJR2m60P8V9aLml/ZwZo3HPnQeh5mv4v6zo6Itia09+vXSpJRDYURBn/5/z2uBqwt4xrUBoo/2491KcpFkq95oBBYPgz1YKqJrVHkdHM5G4ot0hzWtH0FCop25H/d6XTxgE7lSzx3p0lNuc6J42hrkNIHq4WMkJF4qpXm/mzEa+F3lnFMBX0J+vQFQgFD5Gn8kC4pYN9qJmbaUDRa9h5+XcOsEvPC+0NaJe7iivt6TqacN1lJfCC6zxQSz4XI7wxWASfioyPnxtZiziEnBRzbX53HN2y/6k2jzyRkBg13MJFyFBPWvy61IVEUVTXC391iF0jMJS8h/86O2rxwI7C4UfV8UNkydpTFJLEqHJer91WDv0RLfKs1Ka6lkHztPkRdIpZjNxX30sjyvrObT4H/kKG1wyKlBE/eRBWz+l+d6dCA70XwLvvMg/0uievS2sX8ASsI7bj9J+Rc8sXDgoh8FPLFMlxwCvyxi1tmek4RTxQRQejy12Y/16e4eM3rry2c2R0HN7KmF0WEJHZ6vestmxVbOnwxURnkqSEgFqGPbJJiRSECt7Vxqb9x62V x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(86362001)(7696005)(316002)(8676002)(41300700001)(38070700005)(5660300002)(26005)(55016003)(38100700002)(9686003)(6506007)(52536014)(33656002)(71200400001)(122000001)(8936002)(44832011)(66446008)(66476007)(66556008)(64756008)(4326008)(66946007)(76116006)(478600001)(186003)(2906002)(54906003)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: RTSghBOIG6VyX978IyxxzzCthE5eip7yRXpllCbBK9JzcV78xrRXa8n+42pDYxQPoDq+3JE/Wip5tg0Zw0m+v2x+Dwc2kdOp7UfsJKrvUdC953+XV0Mtx9dziPVKsn3HH/Mdx21y4296NftyEdEmOK0/6LkwBHMpdpV0IdKssft0b45jDNqZPTFqnbCX3s7HCM02FDvlXWmvDE1GuZEXbOHuEbDXZWPrhDqP0o8i2SxojYcvztKx+YpZafXtEhUxF1RHvEbl56YtoTEx/rUgjN2YH3Tj2fyHTZod5ZAfc+iXgeZf5oNPQpb6Pb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58IRqSVYmjAb1mspLcMkFI8qbXBWFnnmNAWnrp1bAcC0GfRN+zx3lSsH8gLm08wh/CumhjdFFPzDBs78VkG3A+xMdgR1jHz8IaCcKbSS1uV0pZ48bKXfrW88zhBC9TQ7UbLK9Z0Gy81O0lzIu/3DwzLPzepbu0b7Dk4vSrUDdgLR1I/7qN6YWqeWzoY6bXqX8jpyzmi23W+99BTknOccpMqJRMGi1Lb9tX7YBAN+q1aGxr80X214GTOIM/Q8mo0W55KRzHaFVQapedywPdNVON4fyrHGntpvP ueoWPmCdbKWRjmu+b4ITvb/dM8wRe3f0Lbku834fHwKdDCbdEUWxTTBzdNlrt6xRvxobcgIJedE4uLGGPtqN2eWYjMsPW/KWGB X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b484d44c-dcdd-43b5-f3e5-08db6a892ca4 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jun 2023 14:35:59.4910 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Jwwfabgzinsgz6tI0XHKxnGFJI5nQHS3/zPhLChvIG7eP++PYurXaCDE5ISF/MmJV54H6C/KnQLo59QL5RkCrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5705 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-11_10,2023-06-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=803 bulkscore=0 mlxscore=0 spamscore=0 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306110135 X-Proofpoint-GUID: fPQzdfGUpDeNIXgoePlxfHeVQ4Dap1J8 X-Proofpoint-ORIG-GUID: fPQzdfGUpDeNIXgoePlxfHeVQ4Dap1J8 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263248 Archived-At: > > > Perhaps we should modify the minibuffer code > > > to note which window should be current after > > > the completion or abortion of the minibuffer > > > read action. >=20 > > Isn't that simply "the window which was selected > > before entering the minibuffer"? >=20 > Most of the time, yes. If that window no longer > exists on termination of the minibuffer, or we've > moved to a different frame, things aren't so simple. You can and will ignore this, but IMO _all_ of the above is misguided and short-sighted. "Isn't that simply...?" is just plain wrong - both the question and any single answer. It isn't "simply" _anything_ you can preconceive. It's _whichever window ended up_ selected after using the minibuffer. Nothing more, nothing less. Let's-hard-code-which-window-should-be-selected is maybe related to the fact that I can no longer use Emacs > 26.3. What's wrong with attempts to predetermine which window should be selected after a minibuffer read? It's the presumption that a minibuffer's only purpose is to return something read, and that the state of Emacs, including which windows exist and which should be selected, should be the same as before the minibuffer was entered - or should be any other predefined state. The selected window here shouldn't be determined formulaically. This completely prevents or interferes with code that _does things_ while the minibuffer is active with the intent of changing such state, e.g., the intent to change the selected window, and not just till minibuffer reading is finished. There. I've said it again. And clearly Emacs won't be going back to its former freedom in this regard - 1000 ships have sailed. But IMO this is a great loss. And it comes, I think, from assuming that others use existing behavior only the way you do. My use of Emacs relies on doing lots of things while a minibuffer is active - including things that you might do only when it's inactive. And the changes I make while its active shouldn't be overridden when a minibuffer is exited. And yes, this can include changing the selected window and focused frame. I want to be able to do that myself, interactively or by definition from the function that invoked the minibuffer. To my mind you've hobbled Emacs - specifically its minibuffer, just as much as if you'd poked out its eyes or cut off its legs. If you'd really wanted to provide only some _default_ behavior wrt choosing the window to select here, then you'd have done that. You'd have provided some way (e.g., a variable) for code to _prevent_ force-selecting the window you've predetermined to be the "chosen one". The Emacs minibuffer was "simply" better before you simply "fixed" it.