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] : Custom for quit-window? Date: Sun, 9 Jan 2022 00:26:54 +0000 Message-ID: References: <20220107180521.7zgkfxro7c7tkdi7.ref@Ergus> <20220107180521.7zgkfxro7c7tkdi7@Ergus> <20220108182341.4asnh7b7ukiyzxpj@Ergus> 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="29782"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "help-gnu-emacs@gnu.org" To: Ergus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 09 01:27:55 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 1n6M3v-0007YE-8S for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 09 Jan 2022 01:27:55 +0100 Original-Received: from localhost ([::1]:36300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6M3t-00038e-6g for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 08 Jan 2022 19:27:53 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6M36-00038H-Vi for help-gnu-emacs@gnu.org; Sat, 08 Jan 2022 19:27:04 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:3762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6M34-0004uI-AT for help-gnu-emacs@gnu.org; Sat, 08 Jan 2022 19:27:04 -0500 Original-Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 208JXMdC030604; Sun, 9 Jan 2022 00:26:57 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-2021-07-09; bh=fsYQoIUWoc1iGetpU2KtPXn3MccXkrSdzHvZUJVtjrQ=; b=z68HrvHfIrbdxZdrzQgZy8hEJBjWuqnwybMJoKwRL7Mi0XUbrQBkS7d898Uk6R3h5AZ+ 8iVwMRY5bPsn6lxoEHidpIGHekFuWlmvr5nxr2hscNbgOMVRlhvQr2cz6NzKOxEiJT38 uE1gKhve1mbJKL5XULVRwzfdQkscSeQK5Lilm3h+z89JM/FmzTFhHvwO5Qk+PDMU7WKY rKGUYp96C4pLt76Xe1qxepHm6DXpoAOFbZaKimvPZf/WwS5XGCPI6/y1TGB57nrHHXmc kT4i6aVagyYMeNv9x//Yx0w/LaAC7u0IgbESBuWu6HcDIpUB5pXrrx5ZOgSEa0VruDWy Gg== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3df27t8typ-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 09 Jan 2022 00:26:57 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 2090FsD2038929; Sun, 9 Jan 2022 00:26:56 GMT Original-Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2176.outbound.protection.outlook.com [104.47.59.176]) by aserp3020.oracle.com with ESMTP id 3df2e1x7c5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 09 Jan 2022 00:26:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dzrRQauXSy/5EoiXrAOEl7qKVwcrlt7m1gzl25lKgcvHnPU/ngofrhYO6ZPQ7zmZ6Imw1RQyfuc7cH67N4TCBdKsqMb9jccQoLJv1aRchnCo6FjMAAW1sUs6JJduz+XRiS732JZMGiINtDTAvVvxpABTwFy9vfp/0Uplb1d7pvGbW3EStPrcNY6lsOSe1gdzzexTuGymcAAOIF/L5Gc8FgZ4eeGgrZ0ZzbFZRZTT3Yiiu7rNFvdxbUf6aAKF8MeCOjZa9/Jhk91CkqrWhy9wolX9bmfaqHQAcNdHv0O8gZuiF4ulMfbuPhGFJrQpv+bTMx6EUz2oOKLD5ncUCNLw7g== 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=fsYQoIUWoc1iGetpU2KtPXn3MccXkrSdzHvZUJVtjrQ=; b=OyLURTinfZMRdpSXvdIZ53t1z9XYpM9CotwffmLExtn0kzA7oltfQ6kpzeelYp0SpYxi5ANmub8beAzvgcZ4NaFjWrBJ3AG+UZzTAE3mgHmt5gWTXNUO5c+wAWVuk3z+bhdOjNCZA0h80MHt7p0gzI/xYV/hoLttBxkNQu2lp/kO6pc8O9zKpiCaCJMBbFl3mMZyC7sPklV8kTUnNiCsi0ZF9N22g+SvgCE7ZphFQp9sRqQAYYfmPfc/TiknBfIIbdlF70NqXpE/r1HyyQCDfWyj01Yd2GuE5QfzTpVXLXlnwpQMKZnirHuXBzVtvDv1usDdsyLjjvYoV0N5AVpJKg== 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=fsYQoIUWoc1iGetpU2KtPXn3MccXkrSdzHvZUJVtjrQ=; b=XRLGRY8UfDZI+rKRxquaOISBbUcJnbQ5dSfv5M/ft2JTvC/NuecW/tpGA7XOWfzoKPI5JzUGX9DB+/I3HIzdGOnVKNhJCmamTF/4pfa43V/ebaLoH1KDlOL+PhV7IROzNGpIhlUNqbsIovueGMTC15KQInPwbicdy5RzEB7UE6I= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BYAPR10MB2693.namprd10.prod.outlook.com (2603:10b6:a02:b6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.11; Sun, 9 Jan 2022 00:26:54 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::99a4:696f:5f30:36b3]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::99a4:696f:5f30:36b3%7]) with mapi id 15.20.4867.011; Sun, 9 Jan 2022 00:26:54 +0000 Thread-Topic: [External] : Custom for quit-window? Thread-Index: AQHYBLz1NiCTR6g4l0+EXfUarttNV6xZ0vlA In-Reply-To: <20220108182341.4asnh7b7ukiyzxpj@Ergus> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 082cd2e3-1aab-4a17-7ae5-08d9d306bce3 x-ms-traffictypediagnostic: BYAPR10MB2693:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:309; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kHD/Lr1xHdDkMLxfLYC7cxQ2JceUZBRKHEgqstaaPo64Mh/IPwFob+25XIQhpqShcRT3ROTZ2uKHhkfmjXoEM7y4NvLt433hrKBf85FdSiT4ZfT9pBXx8eBcNHj7sL5HOZc7DnGmlte7fsYHUwLQJ8i1d0RiN3mw90vZoB17g+kmCh8WFWA3UBEb3V3b5A3Wk5DkPKeC6XSj2pB38XsTndpMJ6cWqe0hQstrX3lc+ULtJtWvD10B45yF7yCDnLIYX62XtEo+tjpmjPqkTjVzQ6SZSKn9veSUxSuQ2IDjoSQZM+9zqmWkNlmP2VRI/lahkWxeeDrNZSndA7yleUdowOWRsYhCBv5ppjg9c8a4xzXSJCU57LqbucinsoPTaELQrglrNHdmt70WWZzGaA7niviDDlPGbmn1DYLYk/GGjT5rPdOqm8Hgcq9BqKvnB9JX3z5k7/qUhaKsK09TFqXHNIUZ/IN4HlIiloP/9xd7rjF43wdujgFVOXe6f/FrzRRi8wCPR83aZpw2aAZn4nvAVjNQ8gznmF8Bg20/U00yrgL17Ew038iXkyteOB+H1xQQ3qfUJniF9xQ2H3ws6qSKSp2ftNOIHdmXSKNXVb4/N1z4hi4vn/gUwHdY/wBuhr7AZH19crxlANlxtuP1rCOwAufwNw6IxcajD4doeI3z3CGSZEYFB2KQyrhncgYcVSLPLLo4lb+Gx06pdPGjEZ8sVg== 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:(366004)(76116006)(122000001)(2906002)(66946007)(66556008)(66446008)(38100700002)(66476007)(508600001)(64756008)(5660300002)(52536014)(33656002)(8936002)(7696005)(83380400001)(38070700005)(186003)(26005)(86362001)(6506007)(55016003)(9686003)(8676002)(316002)(71200400001)(44832011)(4326008)(6916009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?rBXkNGAieJ08EHOMPnucl3Nt8XRsqe8XsMsWYoYPobm9RZbizZljvjxo4D2n?= =?us-ascii?Q?1PKNJoGpEaQ9mbJMXqDEvo8/b0HY3SFbjGGLZc+WBrCATPSQxDGCIjfd2d6/?= =?us-ascii?Q?zXPUXhqsg0+EyRELVNY2iahXFZZU1oDeUFWvWId6cAvWTMUn8luuLC7MI4AC?= =?us-ascii?Q?5Xf3u5KDj0CDq28Ty+P51GLzlNFqqKNaGSbIWPP/m6cAeOzq2zevLVsDTi9B?= =?us-ascii?Q?UhffKNxFLD4Kq9d19hFXQKReY15ypPIQ5mDtY/29d49HuR9gRJToMHXMcL7r?= =?us-ascii?Q?EwON3GjUGoJGlA690bv0Ne35iC77Ldgdn/gwRVKH78ay9oHJNqoLzgu+J7xo?= =?us-ascii?Q?Fyt0WVqxewPy0e2hzD/LBOCwMvVcMUVXfoU9qsNNswft6Qeg+PT+tcKNdeF0?= =?us-ascii?Q?2wAH8bmppZch36ooEao4FJhegXPwv7Ug4OwUsUBRMDDG5gQ9JfO93G4mG64c?= =?us-ascii?Q?sENhNosu+i04S/IFORfdBhtLGDkc4RSR+c6Chu0zZ8S4pkXb4TyYu3TIA+3N?= =?us-ascii?Q?VE/+aHBz8jox2Oo6WjoDPaFX6+AZKJpDyNgo3OY8IeYcBALil6N2Wgkc/KCw?= =?us-ascii?Q?msOh1s30XzUTovwHLRWnHuD3yB8xPBZ9BcdPVx/z+Vh6xNqjqfRNr2uQ7KdH?= =?us-ascii?Q?cu 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: 082cd2e3-1aab-4a17-7ae5-08d9d306bce3 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2022 00:26:54.1299 (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: lzxIXxlHk6n6Bu27K0t+6mrIITeNbS5ff9XxF8JTpLW2pVFSTAYMP8amz4VfSVVvNVEZREFpn2MWO5oJl/JJVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB2693 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10221 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201090000 X-Proofpoint-GUID: xyh3EjHDr1nXeW8PdzKVPg8jinmPjvmX X-Proofpoint-ORIG-GUID: xyh3EjHDr1nXeW8PdzKVPg8jinmPjvmX Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-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:135135 Archived-At: > >I use this: > > > >(defun quit-window-delete (&optional kill window) > > "Quit WINDOW, deleting it, and bury its buffer. > >WINDOW must be a live window and defaults to the selected one. > >With prefix argument KILL non-nil, kill the buffer instead of > >burying it. > > > >This is similar to the version of `quit-window' that Emacs had before > >the introduction of `quit-restore-window'. It ignores the information > >stored in WINDOW's `quit-restore' window parameter. > > > >It deletes the WINDOW more often, rather than switching to another > >buffer in it. If WINDOW is alone in its frame then the frame is > >deleted or iconified, according to option `frame-auto-hide-function'." > > (interactive "P") > > (set-window-parameter > > window 'quit-restore `(frame frame nil ,(current-buffer))) > > (quit-restore-window window (if kill 'kill 'bury))) > > > >And I do this: > > > >(global-set-key [remap quit-window] ' quit-window-delete) >=20 > I just tried your suggestion and I don't get any difference... You don't get any difference from what? I didn't try your code. I was just passing along the info that this is what I use. (It's in my little library `misc-cmds.el'.) > I saw that you had a package called window+ that is supposed to do more o= r > less what I want, is it right? So actually kill the buffer like with > "C-u q". The (re)definition of `quit-window' in `window+.el' is only for Emacs versions prior to 24. That code is conditionalized with: (when (< emacs-major-version 24)...). You don't need it for Emacs 24+. You can, I assume still use it with Emacs 24+, though, if you like. Part of what I was passing along was to say that you can remap all keys that are normally bound to `quit-window' to some other command.=20 > But I am still not sure why this is not an currently an option and the > implementation not simpler, or if there are some "bad" side effects in > the implementation suggested in my initial email. I can't speak to either of those things. The code I use was, IIRC, suggested by Martin Rudalics after I complained about Emacs having changed the behavior of `quit-window'. The code I use, on his suggestion, provides behavior like Emacs did before the change. > I mean, to make it less intrusive and only call kill when called > interactively (until I am sure there are not any undesired side effect) > is this fine? To only do it when interactive, don't redefine any original function that's also used noninteractively. Just define your own command, bind it to keys, and don't invoke it noninteractively.