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.help Subject: RE: [External] : view-remove-frame-by-deleting ignored? Date: Sun, 9 Oct 2022 02:16:31 +0000 Message-ID: References: <874jwevyx8.fsf@post.rwth-aachen.de> <87sfjx6frd.fsf@web.de> 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="4834"; mail-complaints-to="usenet@ciao.gmane.io" To: Michael Heerdegen , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 09 04:17:26 2022 Return-path: Envelope-to: geh-help-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 1ohLsb-00012i-Jd for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 09 Oct 2022 04:17:26 +0200 Original-Received: from localhost ([::1]:46968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohLsZ-00010V-SZ for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 08 Oct 2022 22:17:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohLry-00010J-4N for help-gnu-emacs@gnu.org; Sat, 08 Oct 2022 22:16:46 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:57358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohLru-0004ZS-1l for help-gnu-emacs@gnu.org; Sat, 08 Oct 2022 22:16:45 -0400 Original-Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 298FukUu012169; Sun, 9 Oct 2022 02:16:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=BEUSyzEeHsj2O+EQn36lP9jBG5O/Ck+JB2UItq6fWJ0=; b=wYGwE2REjl4R9FLrBBOT+B/K9udeWdiBRDOZt7z/l3IdfFJoq6JbEljv2O+hXILNIhsT QEgtZkY6ObvJxlA8JQJ+JZhQroRwLyVxWY7XO6B7VTGRnSd88fxG0Txqw9B7exe8WXd+ /rk8vs217IgImWQil7OxaNbcWotl8g+6z09zTU14K+K5dJbwQk/O7apeiRsiE/a7S98q rimTF0LPG+VytbAVNnmLHU8kGxTvr//EjqmPG+2DgXmV68WToB/jPDkzEdiJNMFpNoAV UBOlkz0uO5lo/R7S402WqhAtVFmbfExv1doXADLZ+bLFr3yZ8/3jmYUuT6yfclOUvB29 1g== Original-Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3k31rt93cp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 09 Oct 2022 02:16:34 +0000 Original-Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 298HoRiJ032906; Sun, 9 Oct 2022 02:16:33 GMT Original-Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2046.outbound.protection.outlook.com [104.47.74.46]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3k2yn21a2v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 09 Oct 2022 02:16:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lcTK5KhPZkQ25RjbDld+X1kTj0YNp8EJOLeDgIn8MAHVixLoZbC/WP6PTunAO7nhP6GMaFdUxEIFPX5O11kn1eAMUs9lpS5Gs+urwQsp2wa1w4agfCLwQl9UcXE2L6ESGw75IIkVuKD6UemJ8pAiAXBu+CSECbiFAV/w9jzyPhxrB/CQqP3IIFdVT3DRG1mS0EApDnNjcS1QojHUBNlaLd9iFVT67B8n3ywnSEbtkqgo32EqrhidGi5ecaISKdsKpRg9wO9JcL2ChMvXEy4OzzCBnvsazbWUVNZ3npoMrlXMYVTiylO8bp7odDt8v7zE1wXNKBYJQz/Y3PSOvFUtHg== 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=BEUSyzEeHsj2O+EQn36lP9jBG5O/Ck+JB2UItq6fWJ0=; b=Adzh5fgMt+Krou+FeaTvseZqKN1VYzKX8QLhiaOiXoZgENfpQK3ulOMSPlfI3zYgRqgVJyITvziNP27AjknGLGShkpi/D+XEs3olv4T2dCI4HsntE/MAE+9GRWBtiu1Yvj9rULlua9S4pNOBKyxCNNTjB+ZhKdGJA7dIunJgVo2YSiLTxkrG6utb09I9O6NlA7Jjrzz/ujH+1phaFyQbAGpxzNq6pg1HbrETFkg3/pnOlFPKR5aUgmWeqt6fuRLtpXmlPo9wvIrHV04AwyfTfgsUuIVOH8G2XQ5C4FoeyMcR8tuoIvGn9s1p8t+wzxTCCns/weRp+19bLdS0tv9KZQ== 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=BEUSyzEeHsj2O+EQn36lP9jBG5O/Ck+JB2UItq6fWJ0=; b=eVgwVIrs3XSSDXGoIrKcetaBhyQQytnj9RxKJRrns+UJOQdrh46x0CIREDvZZBiHCdAVMzo+V9UqlIOIXqudCqyUDR8CjoCIUOr9MkQohTFi3imF58PC/kHvG1iHuE4NALVhLDZVhEWfC4Iei/j2i3B1eG4nK3WUSluJ3+vA55w= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by CY5PR10MB5937.namprd10.prod.outlook.com (2603:10b6:930:2e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Sun, 9 Oct 2022 02:16:31 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::f319:dced:1a48:779a]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::f319:dced:1a48:779a%3]) with mapi id 15.20.5709.015; Sun, 9 Oct 2022 02:16:31 +0000 Thread-Topic: [External] : view-remove-frame-by-deleting ignored? Thread-Index: AQHY23Aze5xgcN0BKE2HykxAgbMm6q4FTGbw In-Reply-To: <87sfjx6frd.fsf@web.de> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|CY5PR10MB5937:EE_ x-ms-office365-filtering-correlation-id: 10e2abb8-537f-4b7c-d722-08daa99c47f7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5NG5Y+cyWv8groiHPdoVdKr7HfSfZCLZXq8OvuYqRJjmpYD+BA5qo7v9Cwtql+/VggjMIi66BaXE1jdMWWtY9Nk2ZMy4eewv4/fqP/YB+0UCCs0esQxbmwtQ26wzdPBDge2xIUUjuBABpKVAO1MBtaWaC2pjIEHLzzwhTGPpDioX8/1Gj8uOW5Io+1l82jciGTJcpw/QCAooflNx11VVAgDmjUO9spxSIOxhdwsBm5OMnuetojpzlv+Zz9d9gFpCg0GKs66NqAGJ798gQ/YtGHmz8LzMpsqGWLWUTpYuEiHg+Woo1uOrb77CMaWP3BHU+1xN0P0tseEr9GKZBJ2HvPL9umj5Y/d/Cw7KejvMPHTL+qRbOX9xh8OzvuV4hlAnF8Bw7gKuwDk2uIB64qSybECYyawyF99GdMFVTf+jMkH2HfuNiylwMLUJhUPfA0R0vf0LEO7Fzr+c9DL8n3QijkZccKjAI/cw3oOHOJTeCzNFK4GhWhUJ1z4cOOTp1J5hl4JknLXa1XuXoVI+Sf0smlQRZLtXdj7D3s825x8DbmcUIM0AtWbnr11liqdApJYLcNIGDNagfxTScpB6baUxgR+RFmbbNc+hCcmODFtLdE5iEInro7AuI9Gq2LzUnwcgq8EuFv4g8JGzIosqWf1Tq5mEiclKzfK1u+czPS95CLqkBfltaTdj1WIEOu7apLS6rr/sIoK8LNmneI8hfVVZoQ9U+jitW+K6N8cGTXxdnWgKUPN5lq3qseNNZIDlR HXK6gAaHm3Fupwk5Nzvhm2e2w== 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:(13230022)(396003)(376002)(39860400002)(346002)(366004)(136003)(451199015)(83380400001)(2906002)(186003)(38070700005)(55016003)(86362001)(33656002)(122000001)(38100700002)(76116006)(478600001)(316002)(110136005)(8936002)(52536014)(71200400001)(66446008)(44832011)(9686003)(5660300002)(66946007)(26005)(66556008)(66476007)(8676002)(64756008)(41300700001)(7696005)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?O0WnDcgocVcdp27kKVjfACcSkdcxrhygp5p7IAaUG3MYbvIoCY4PhSZaNEj7?= =?us-ascii?Q?+aWVhy4B9hvpNtboEXqyIuDuV8mbOH73lhKp5DfP4Zmyif9jaiRCp70/jHtW?= =?us-ascii?Q?g+xGo6FpRk7kEz7Qxgx1TP0XE5oRYYvMGcPS8dt50EkJTZ2U/pNzLBKCic0Z?= =?us-ascii?Q?wYPxdhRos7hzXL3h18pCvJNAwAtSW5K9eGbXstTcdFwVt7CJ09zmUEHZyqic?= =?us-ascii?Q?uD9NBOmy0XFNVStBuyHlapA3KcysET8tc82vQWRSmZRlJkPDDj3y0TI/dTTa?= =?us-ascii?Q?DmzT3y0Tg9PTcA10Qa920M+LhQtXalIZ1GeXMnDsMU1OkiRpUIFvR+Db/0h9?= =?us-ascii?Q?/d1M2KIeobyZhKNiBV8sXuL29jHLZ7GFl93RfbCBYCLg+N3AI7A5eH2JxMwt?= =?us-ascii?Q?pqU7Rt6EnZI4seXAeT0q2/kSSQYevZ1mW4wbpBuZ9QJXRplmG5MQ15ZgPd1q?= =?us-ascii?Q?nA9KE2kDzav1ZoIExMTsu9ybdovLnF7uW/V9CC6lH24HbEphUZnptGXITuWu?= =?us-ascii?Q?vs8IwL+tl0Pydq0LAJ7tjEaNs+b0AbrlP3t6H6F2Z3Z1SZ1DD3Zz0Bf74+ma?= =?us-ascii?Q?fdpxVwrj+kllfWwARgyry7yGPPZzFG3+Jx7qj4Q+uWFCFjEtblrFdg3ipGEp?= =?us-ascii?Q?B8 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: 10e2abb8-537f-4b7c-d722-08daa99c47f7 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2022 02:16:31.3450 (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: Np/lr2ZmNokTbfGfoXx2Mf4MILAQxxFH9FI73UAde/UBEC/MDykb62f0LE9YKtbhvaG8zf7uxOE2rXVR8yxfwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB5937 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-07_04,2022-10-07_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 bulkscore=0 phishscore=0 mlxlogscore=727 mlxscore=0 spamscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210090014 X-Proofpoint-GUID: Lvi_q1DvQtFMuq8bAa4AdmqWqKAzorad X-Proofpoint-ORIG-GUID: Lvi_q1DvQtFMuq8bAa4AdmqWqKAzorad Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:139773 Archived-At: > > Try customizing option `frame-auto-hide-function' > > to `delete-frame' instead of the default value > > of `iconify-frame'. > > ... > > It's `quit-restore-window' that uses the option, > > and so ends up deleting the frame. And that's > > called by `quit-window', which is called by > > `View-quit'. >=20 > Where? >=20 > I don't seem to be able to find any place where this > variable is referenced in the Emacs sources. Toggling > the option also doesn't seem to have any effect. > Or am I too tired (could be)? Hadn't try to find exactly where it's done (but see below). I see this, e.g., in Emacs 28.1 (and earlier): emacs -Q M-x debug-on-entry quit-restore-window M-x view-file-other-frame foo.el Step through and you'll see something like this: Debugger entered--entering a function: * iconify-frame(#) * window--delete(# nil nil) * #(nil bury) * apply(# (nil bury)) * quit-restore-window(nil bury) quit-window() view-mode-exit(nil kill-buffer-if-not-modified) View-quit() funcall-interactively(View-quit) command-execute(View-quit) Get rid of the frame and buffer for foo.el, to start over. Use `M-x customize-option frame-auto-hide-function' to set the option to `delete-frame' (instead of the default, `iconify-frame'). M-x view-file-other-frame foo.el Step through and you'll see something like this: Debugger entered--entering a function: * delete-frame(#) * window--delete(# nil nil) * #(nil bury) * apply(# (nil bury)) * quit-restore-window(nil bury) quit-window() view-mode-exit(nil kill-buffer-if-not-modified) View-quit() funcall-interactively(View-quit) command-execute(View-quit) In more detail, it comes from this return value from `window-deletable': Debugger entered--returning value: frame window-deletable-p(#) * #(# nil nil) * apply(# (# nil nil)) * window--delete(# nil nil) quit-restore-window(nil bury) quit-window() view-mode-exit(nil kill-buffer-if-not-modified) View-quit() funcall-interactively(View-quit) command-execute(View-quit) And that's from this code in `window-deletable-p': (cond ((frame-root-window-p window) ;; WINDOW's frame can be deleted only if there are other frames ;; on the same terminal, and it does not contain the active ;; minibuffer. (unless (or (eq frame (next-frame frame 0)) ;; We can delete our frame only if no other frame ;; currently uses our minibuffer window. (catch 'other (dolist (other (frame-list)) (when (and (not (eq other frame)) (eq (window-frame (minibuffer-window other)) frame)) (throw 'other t)))) (let ((minibuf (active-minibuffer-window))) (and minibuf (eq frame (window-frame minibuf)) (not (eq (default-toplevel-value 'minibuffer-follows-selected-frame) t))))) 'frame))