From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#4914: completions - remove window after use? Date: Wed, 18 Nov 2009 09:11:40 +0100 Message-ID: <4B03AC3C.9000300@gmx.at> References: <61C01A08-8FB6-4908-B9F1-B9F1CE3E3D92@gmail.com> <4AFBC50D.1060007@gmx.at> <6B8057CC-08E3-4A6F-BDCC-0A8CBD738365@gmail.com> <4AFC4889.6090707@gmx.at> <22B10138-7AD6-4138-BD23-DA62D9B79BCB@gmail.com> <4AFC6176.3010306@gmx.at> Reply-To: martin rudalics , 4914@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1258532891 30718 80.91.229.12 (18 Nov 2009 08:28:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Nov 2009 08:28:11 +0000 (UTC) Cc: 4914@emacsbugs.donarmstrong.com, David Reitter To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 18 09:28:03 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NAft2-0006IM-52 for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Nov 2009 09:27:36 +0100 Original-Received: from localhost ([127.0.0.1]:52314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAft1-0001fR-Jg for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Nov 2009 03:27:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAfsu-0001ew-T8 for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2009 03:27:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAfsp-0001bD-LJ for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2009 03:27:28 -0500 Original-Received: from [199.232.76.173] (port=46707 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAfsp-0001b3-Ft for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2009 03:27:23 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42587) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NAfsp-0007wg-1T for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2009 03:27:23 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAI8RKQL022004; Wed, 18 Nov 2009 00:27:20 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAI8K4Zx021348; Wed, 18 Nov 2009 00:20:04 -0800 Resent-Date: Wed, 18 Nov 2009 00:20:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 18 Nov 2009 08:20:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4914 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4914-submit@emacsbugs.donarmstrong.com id=B4914.125853191020919 (code B ref 4914); Wed, 18 Nov 2009 08:20:04 +0000 Original-Received: (at 4914) by emacsbugs.donarmstrong.com; 18 Nov 2009 08:11:50 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id nAI8BmvR020915 for <4914@emacsbugs.donarmstrong.com>; Wed, 18 Nov 2009 00:11:49 -0800 Original-Received: (qmail invoked by alias); 18 Nov 2009 08:11:42 -0000 Original-Received: from 62-47-61-175.adsl.highway.telekom.at (EHLO [62.47.61.175]) [62.47.61.175] by mail.gmx.net (mp003) with SMTP; 18 Nov 2009 09:11:42 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19g3fRPtXdgfWHXx00/p0WFNeeDcWo0tcUijxjqyh sA5sXPhCVUBZX0 User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-FuHaFi: 0.68 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 18 Nov 2009 03:27:27 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32682 Archived-At: >> It's practically impossible to find a solution that satisfies all needs >> in this area. Basically, `display-buffer' would set a special slot for >> any window it pops up and `quit-window' would try to delete a window if >> it has that slot set and still shows the argument of `display-buffer'. > > How 'bout the patch below? > > > Stefan "whose .emacs would have > (setq display-buffer-mark-dedicated 'soft)" This reveals a general problem with all `display-buffer' related (and maybe all) options. We really should settle on a policy that strictly separates user provided settings from application provided ones. In particular > + ;; If the *Completions* buffer is shown in a new > + ;; window, mark it as softly-dedicated, so bury-buffer in > + ;; minibuffer-hide-completions will know whether to > + ;; delete the window or not. > + (display-buffer-mark-dedicated 'soft)) > + (with-output-to-temp-buffer "*Completions*" > ;; Remove the base-size tail because `sort' requires a properly > ;; nil-terminated list. > (when last (setcdr last nil)) overrides the intentions of a user who has an explicit (setq display-buffer-mark-dedicated nil) in her .emacs. Also I suppose that with your .emacs `display-buffer' won't be able to reuse a window it popped up earlier for displaying another buffer. In the case at hand this would prevent the Completions window's contents getting overwritten by those of some other buffer which is good. But in general this might be a bad idea leading to "more important" windows getting reused and/or new windows and frames popped up all the time. Also note that the greater problem is still how to "correctly" quit a window that has been reused (instead of popped up) by `display-buffer'. martin