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: Fri, 7 Jan 2022 18:11:49 +0000 Message-ID: References: <20220107180521.7zgkfxro7c7tkdi7.ref@Ergus> <20220107180521.7zgkfxro7c7tkdi7@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="16324"; mail-complaints-to="usenet@ciao.gmane.io" To: Ergus , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 07 19:14:18 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 1n5tkn-0003z1-GY for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 07 Jan 2022 19:14:17 +0100 Original-Received: from localhost ([::1]:41808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5tki-0006e3-FS for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 07 Jan 2022 13:14:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5tia-0006dt-HO for help-gnu-emacs@gnu.org; Fri, 07 Jan 2022 13:12:00 -0500 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:57048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5tiY-0007mV-27 for help-gnu-emacs@gnu.org; Fri, 07 Jan 2022 13:12:00 -0500 Original-Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 207Hb7Tu020019; Fri, 7 Jan 2022 18:11:54 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-2021-07-09; bh=OPc9rTyq430SeHK3WJ6AzUezJ8rNFaCsJo03SpPHIqQ=; b=GKVyf/ANX4ZJlZUTu+pHyTbGn55YwmjFxlb0GMIYrirNqmXoVHBoJbYnXV1TRm6tk+sP Ducnjxo9LGyHggOWlRm5TuFmsLui15/qqC1tobc2a5z4NdMP8o2Xs6KWOhjFKXa1vpl3 M/HIl6wDssZhIUv7B0oCnZ/iP8MpVMb43LYkVb4BeeHXVZzqrXV+id/1ab8dbdIcExb1 kTMTyEh7O6pMCjzrQsBM9/JZo5XVQN4HGa6vTPutVhNQumPrzXDWDG1ztAIlvXFew1qR iyWvFmOAqWOJekpGciWnxsjCRHH0VDqGM4csgdOolQFmi59i8sSLUDVDgnAwvCkcMa/d Gg== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3de4v8anus-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 Jan 2022 18:11:53 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 207I1QNb116705; Fri, 7 Jan 2022 18:11:52 GMT Original-Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1anam02lp2049.outbound.protection.outlook.com [104.47.57.49]) by userp3020.oracle.com with ESMTP id 3de4vp1tr6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 Jan 2022 18:11:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oNi9Bb5JZXt0UZ8vvf0Bpg+XJZ70/Pq4R8O3y9gXaRiczxDBXv9OUNnG9u8NTFJfc7zYoGfCQgRk1iMukhO2hVPwYB55lixoZVymz78NhZAZR8lxoXtOwh71tPN4CcQVrk31A9crT9HBHWPTKs5W4qvU6En2bup3ZDRtHMs0uAyzpOfL5xJXZ2HJV7kkvtOMcdLFtOIt/8gGsOPiZBib5KTP2cKczp6GnPfFrYbh/7hxGJxxS9zAi8WbLIe0WOTD8/ABjGM5+/5KlvMFhqyHN8zWi36oJyo/B/lpJ391S3fdcBDhLRjffsZB0JS3QK8Z/xrpAARWz7fx3EMytG+wiQ== 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=OPc9rTyq430SeHK3WJ6AzUezJ8rNFaCsJo03SpPHIqQ=; b=NCln/1k+z+JIr/hbaHI/ZLlpplRt5PWdb6vwPhSNIjK/tRbF/TFqplPcl2/wbp3jQg53HO/genTUeq75/PrDlplrnnmzMcQWFsCviVl6gzEUZTTOwtYZzKMI9xExuyofksgoRZKb29mgawDGdX3AweGZx/L2u2Y8DdirC9Gku2upY4qww9bKR7CTKSm/o9e2EoR5gu67EN+dF/EndwFvumOuRGDzrqk9H8y4rsMNxqVg5nOzyd/rAwp+L+aSUGliXmM23oeH+72QpowUNDP675JM3lwJkPbQa8FVMx3MCYyNxb0h5pdIplePAKBcUr7Ad/HWMU+GdkTkwITIgYszPw== 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=OPc9rTyq430SeHK3WJ6AzUezJ8rNFaCsJo03SpPHIqQ=; b=NcQhEj1lxgKDGe7kBjkzge9odmsMlLYWgCzEl5qOSzeX6r3VaiAlNJHn2h1grqWidCx/Fetb6zPrbJ15go/yZW0qRAwN/1IwHvJg094BaRyC2qs86UP6FkniixXgSd1QtJLI76POegGgWrz6uWy4IejbYQBqCSrWD86ttFx5LR4= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BYAPR10MB3720.namprd10.prod.outlook.com (2603:10b6:a03:11d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.15; Fri, 7 Jan 2022 18:11:50 +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; Fri, 7 Jan 2022 18:11:50 +0000 Thread-Topic: [External] : Custom for quit-window? Thread-Index: AQHYA/FHO1yg8MSXE0+mrJhJu1ka+6xX20LQ In-Reply-To: <20220107180521.7zgkfxro7c7tkdi7@Ergus> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ea175a9b-5d53-42a0-0606-08d9d2092cf1 x-ms-traffictypediagnostic: BYAPR10MB3720:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1079; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dEeg/tXvSDmlg8zZvT/R3z9r58bimoveEG3MYVG02wDOVrDbRXAiBu7u+EOcAKLkzNFF9dEw1ONkWegWAJ+T9pkntkVnYfOXsqjteJpfiIOygZsrWOJxZXDlmSHYFVF8SOSTStjY0TJ99HNo9a+b9t7fvNYQuRQutLj3Gd3cwDYcZBqRM6pgOfCmHYntBtabp9dsq1HTmakvEHzMRx94sf0yhPiVhGC481vFrT09Hj2cmcAPco2ZR3p3REMvIQVpgS5GrslP0dCHSKa//2ZrToiBdsg+nVlY+4B2H9XIA7wZMfgbaksjwBUY51Tv6zgf3LYOE1Pon/Q1/KvDtBFeyTOw20C/e7QVs+T/PEeqAejGSduCzfvbfdYvg5JM3ArzYVHKudllgHm/R/z6disC3cUQ9XLz8+o0R6D0pQAwcKnRlbxvKhpxIHV+gcf3bqq/PrE1/ooyH3JWWcVqx13Dn+YGsn1JzitrTWQqrg4y8cOEx2Ds/9oqn9cQqOuSc+h3Z2ewS71+lrKLUr2Rr3B+12P6BrWhYCPWXqs0YmOlG+A7/odoYTaCFJkFGfosFeOHd6TCqx4VdCc5GdMKTov2fa/zig055fcmz1K85p6jRRYtjcVu30lccykyB67BToOYXcJpN2P/cckh/TuokweLw/OF1bDvsGwYBTu3CPzwSgpRRakFDrUim9rwGs5zC4NxubfmaoG7XRYzmQB8HGn3wg== 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)(86362001)(66446008)(66946007)(508600001)(186003)(38070700005)(26005)(2906002)(122000001)(44832011)(7696005)(9686003)(110136005)(6506007)(71200400001)(64756008)(66476007)(66556008)(83380400001)(33656002)(316002)(38100700002)(52536014)(5660300002)(8936002)(8676002)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?lHWznkFOnblBdjGIzr1gwUkTaRTcoIjYZoFsQR3UFkV4kLD9DkgIbueWkbgI?= =?us-ascii?Q?+coHIFE1+TNNsUGlpvuLtPJZXZpvJ2AYbYotAjCnRBlXgtHK2W22djpLuOy1?= =?us-ascii?Q?cYRwFu9crAgX/lUbDNORLZto+gUPFwRpoawr7UDnFlKEL2ryPxLdJCrIrP92?= =?us-ascii?Q?IcemuOZHFQVMWKSR5yo32KwqX2po9t53AIuTF9aWNdLZ1kfzZ1auoQNMeHld?= =?us-ascii?Q?Fo/LQ7fULLJ5P7msUPq6jqKzLvTBTgnI9gJzjiTocoKE+lfrEAqEttt6cpJB?= =?us-ascii?Q?qvAcLcp9zY46VteLfHIEsUgQlH9ab8O1m1W9aWFzwS71a9nncoaQthAhbJ1M?= =?us-ascii?Q?YdN2O7hqMSDZvsKS3w8yQiHe8UGVI8A84HU00JkMErtaACbeLf8vz8BU/+uU?= =?us-ascii?Q?Pw+4dg32ImX/hH8+1YF6xLFaUvFs9WHD5yTaijwsqwi9k1fsCC80bWh+ZsC0?= =?us-ascii?Q?x4NEBUVNO2/k6d0CUvp0eN6wzFdpIg7+yqxRS0FTH6ZGWb8+qwyjtGOeTiGZ?= =?us-ascii?Q?ZEGS0E+STICYMLFyVgqClrt7TQJdqkdim0K4uvg8soYXlap6DxQJLy8CQtxK?= =?us-ascii?Q?qGE/wsodYGxV5v0qCUWLLoXJZvrkSOuHSthUY8YYpZ6lSwldzsp+Gk85mtM0?= =?us-ascii?Q?Hs 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: ea175a9b-5d53-42a0-0606-08d9d2092cf1 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jan 2022 18:11:49.9824 (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: Hhk5NwMx1wZK208+UZ69SJ3UHn2fCvRovwyip5+KMFPQfwU4YNjWUQKc+NCsYZdsFMoGXk+nBQKYYumS/iUjXw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3720 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10220 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 malwarescore=0 mlxlogscore=800 adultscore=0 suspectscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201070116 X-Proofpoint-ORIG-GUID: 9ti6u5Z3ViyJFuNsaYxtzRh384ougXLa X-Proofpoint-GUID: 9ti6u5Z3ViyJFuNsaYxtzRh384ougXLa 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, 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:135124 Archived-At: > Is it there a "simple method" to make quit-window to kill the buffer > without needing a prefix? >=20 > When working with 10 files and using dired, help and some other > special-mode derived buffers it becomes awkward to have 10 working files > and 15 random noisy buffers that makes "C-x "" navigation > useless and "C-x b" harder to read. >=20 > Such simple custom option I am pretty sure has been deserved by someone > before, and a simple approach may be to remap quit-window to something > like: >=20 > (defun my/quit-window (&optional kill window) > (interactive "P") > (quit-window t window)) >=20 > But I am wondering if it is so simple why isn't there an option for > that. Is there any very bad side effect on this? >=20 > Another alternative is to hide/filter buffers using a regex or so, but > IMHO it is like hiding the real issue under the carpet. 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)