From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Quit and Close Emacs Special Windows Date: Mon, 29 Jun 2020 18:45:24 +0200 Message-ID: <20200629164524.y74lx5xgdomfj25b@ergus> References: <87ftaej5pp.fsf.ref@ergus.i-did-not-set--mail-host-address--so-tickle-me> <87ftaej5pp.fsf@ergus.i-did-not-set--mail-host-address--so-tickle-me> <3c578050-2a23-411e-bad0-c26a7c7ed5ee@default> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="104238"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: NeoMutt/20180716 Cc: emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 29 18:48:55 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jpwxj-000R1o-HH for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Jun 2020 18:48:55 +0200 Original-Received: from localhost ([::1]:38362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpwxi-0002j0-Jd for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Jun 2020 12:48:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpwuT-0007gl-Hk for emacs-devel@gnu.org; Mon, 29 Jun 2020 12:45:33 -0400 Original-Received: from sonic316-11.consmr.mail.bf2.yahoo.com ([74.6.130.121]:42648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jpwuQ-0008J3-7D for emacs-devel@gnu.org; Mon, 29 Jun 2020 12:45:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1593449127; bh=zXV7jpO4Jw5m8nrPzUNUxFMf+JFb7EtinSp3LGjheVQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=kVI+no7mx5hm24ekoKug2d8jNMoOiOcN5fDsDDFG+R0TLqyUu12OW6PudqN3oxfpxLz4dBhKSw2CsfkSBaGXdvv52PTDNj3jaFB6a9dWK9dt8mjKxrtPEPfmaZJ7LE5quCwovO74KYeiBZpMTm7k2q9ckJ4WMN6DK/ZmTcpFN7x3sNG3cvUcHhtM5iSotzN14+LSq8lSb77zAYL3OcY6cMDuY46CwcV1uKFCxnfT4oTz7jR42J+5jt2ykjztqJViIgB2JZQ1eN66xd2iAcL+ttIaaQDpnEx79dbgQViqWdzkAA7xm1J2mOmMNPIlFvIFotH3T/VWxKGGUBMmTnS33A== X-YMail-OSG: 8cMmSRkVM1lqA5nCni36Q2BaZB45yYSgrIZeccHNbFr2q8VmrEVHqV7SKhHeRk. IG1QwGQKobAIoo.7NeO11Mqp3g6ufIvpsVHNJ3qPDamahj2a0plZVJxj0C9L9.UObpU8xv8y0vCk 6.TPkwYLgaBUC78d4.5Ccgn8QM3UjivbWdcvbC9LN4gaC_GkgxrSRqOkLECbvOr9xCyZpWIHDd9X pNqsPwVNPwCrvs8C1JybQfZ0UeHm8b9HXR6OvXORvbjPVPr6VWr_g4GOOrMeoPT50BGND1.ALG0F ceZK.6LAMVulCGMR3LizzqjM5s7HsjWm9cZZneyeneK9UPS39wp41ye1oOCEgLGjje1JhzR9Xhv7 wssp6ZrNjhy.1jQyQ_bmaSH9FbaA8DQA31KceGWn4bvAmPOHniFreVuVx8MauqyxRMnoTq83aC_k ENY_HCbvsqtOHDm7zso5k2lYWbPXZCt0kQI2TUnpLH2g7sDIIWksOmR915Osmo3mGka5DqBWZ3rm W_hrM7NZDSgpAfCvNbekab2tljoYLKfsHPeXF9EA9FqaRbvDnx_7CTucu.Jcbxn3IGnN7XMEFxJk 3fGqSQH9JMvF.iBn3U2aduYm2XyDtWPhUcSMToXPyu6FG2EoTToo_.bmTJtFLmpffb_2f9s__7OE yra6rodiICy8NIwQU4H2GhFR9cYzXETWRyFRKoNSb9sQXsAAG2zgcSL3xt6D9NGNJASenyAZjGpY InS.HdJ55P3XPfsST211h2C.NQWqaNc1pmA2RnQT24I7YMGSjD0WxXOMBdHMJAs4Du53pA0QT6tK WTJamfZJxtjKABRfNfm11KQqTM16eTy_sQhcW6N.ij Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.bf2.yahoo.com with HTTP; Mon, 29 Jun 2020 16:45:27 +0000 Original-Received: by smtp411.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 04cc0e57c80fe5da582ee94ab7f62590; Mon, 29 Jun 2020 16:45:26 +0000 (UTC) Content-Disposition: inline In-Reply-To: <3c578050-2a23-411e-bad0-c26a7c7ed5ee@default> X-Mailer: WebService/1.1.16138 hermes_aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) Received-SPF: pass client-ip=74.6.130.121; envelope-from=spacibba@aol.com; helo=sonic316-11.consmr.mail.bf2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/29 12:45:27 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252569 Archived-At: On Mon, Jun 29, 2020 at 03:09:59PM +0000, Drew Adams wrote: Hi Drew: 1) Should we provide a custom variable to conditionally enable the set-window-parameter part of your code within quit-window? 2) I am not very trained in lisp, so I must ask if you think that this changes is general enough for all the buffers like: Help, man, Compile, magit etc?? and won't conflict with others? if 1 && 2): as this is your code, could you please add the changes if nobody has any concern about it? Best and thanks, Ergus > >FWIW, I do 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))) > >(global-set-key [remap quit-window] 'quit-window-delete) > >I also use dedicated windows for buffers with names `*...*', >and I make frame "hiding" delete frames rather than iconify. > >(setq special-display-regexps '("[ ]?[*][^*]+[*]")) >(setq frame-auto-hide-function 'delete-frame) > >