From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#36610: [PATCH] Make finder-exit use quit-window Date: Fri, 12 Jul 2019 09:20:02 +0200 Message-ID: References: <83y3133gnf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="241163"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36610@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 12 09:21:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlprm-0010Tw-2a for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Jul 2019 09:21:14 +0200 Original-Received: from localhost ([::1]:47136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlpre-0004ku-Cc for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Jul 2019 03:21:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35325) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlprb-0004ko-Gk for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2019 03:21:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlpra-0005E9-9y for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2019 03:21:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58589) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hlpra-0005Cm-59 for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2019 03:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hlprZ-0003nN-Vc for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2019 03:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jul 2019 07:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36610 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36610-submit@debbugs.gnu.org id=B36610.156291602214519 (code B ref 36610); Fri, 12 Jul 2019 07:21:01 +0000 Original-Received: (at 36610) by debbugs.gnu.org; 12 Jul 2019 07:20:22 +0000 Original-Received: from localhost ([127.0.0.1]:39177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlpqw-0003m7-Dp for submit@debbugs.gnu.org; Fri, 12 Jul 2019 03:20:22 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:34981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlpqt-0003lu-Cn for 36610@debbugs.gnu.org; Fri, 12 Jul 2019 03:20:20 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id y4so8822780wrm.2 for <36610@debbugs.gnu.org>; Fri, 12 Jul 2019 00:20:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=II1EYmqQ8wTCTbZ7eErvxag8AoftpGHESPt7GeDqIIc=; b=GN9GI/bt6EgkViAV4r5Zrp5CIPARDszLRxEZIp26kzImXLBs3qvhAbWfaJ7cOZgivI PtKAFdAQFOP6ttbVm4/gKrXNXyVJ/2/m3Moq/tBxvI9YDDsRfVL2XqJC+YfOuG8tHKyT x1ycFkq3uwvTnYQaQEeqhSDV9vcN/Ers0F+TZHxQJ7c4sCgjdlqmCNXpUzrNb1gAAqiS pML+F/V45Dae/amJuv5004MzfzusnxWsED4ZgnFN915eXcea39hZOqP1EBh6x6BQxv59 b4C9uSvBHPQDH5RoiO5ACD2ZOnNab04+quW1o2tQNnhWapt/eE3PV2C/faYmzEfQHAQH YEsA== X-Gm-Message-State: APjAAAX92ntCoa7IIjvOalfoTub18gPO0t0zWMGHXid02EDV5fPHmRrv emIeOpO0Bz08gDN4FKVW0p5plSPEH59WR+g5/O8= X-Google-Smtp-Source: APXvYqzczOCI2DNBP9nUulzdJRnDkhyUR3ZXdQSA+GJ5plNSRbVNxhvzM4iJyPrgpSsNweW023KEKrMiowmC4V3HYRU= X-Received: by 2002:a05:6000:14b:: with SMTP id r11mr9825547wrx.196.1562916013559; Fri, 12 Jul 2019 00:20:13 -0700 (PDT) In-Reply-To: <83y3133gnf.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162753 Archived-At: Eli Zaretskii writes: > > > From: Stefan Kangas > > Date: Fri, 12 Jul 2019 00:57:26 +0200 > > > > Stefan Kangas writes: > > > > > When I have two windows open and hit C-h p to open finder, then press= q to exit, > > > the second window is suddenly gone. This is because finder-exit uses > > > kill-window instead of quit-window, and is a minor annoyance. > > > > That should of course be "delete-window instead of quit-window". > > Yes, but please also explain the motivation for the change. In > particular, what do you mean by "gone" in the above description? The behaviour now is this: When I have two windows open and hit C-h p that makes Finder display in the window not currently in focus, and focus moves there. If I hit q, that window gets deleted (is "gone"), and I'm left with only one window. > Doesn't quit-window also make the window go away, and since you call > it with 2nd arg non-nil, also kill the buffer? With the attached patch, if I have two windows and hit C-h p and then q, the display reverts to its previous state. In other words, I'm back with two windows displaying the same buffers as before I hit C-h p. I think this is more intuitive and allows the user to immediately get back to her work. quit-window has heuristics that delete-window lacks. This is how its explained in the doc string of quit-window: According to information stored in WINDOW=E2=80=99s =E2=80=98quit-resto= re=E2=80=99 window parameter either (1) delete WINDOW and its frame, (2) delete WINDOW, (3) restore the buffer previously displayed in WINDOW, or (4) make WINDOW display some other buffer than the present one. If non-nil, reset =E2=80=98quit-restore=E2=80=99 parameter to nil= . Lastly, when we exit Finder, we want to kill the "*Finder*" buffer too. This is why quit-window should get a non-nil second argument. That's the same behaviour as today. > So I'm unsure I > understand the essence of the change and more importantly its > user-visible effects. Does the above clear it up sufficiently? Thanks, Stefan Kangas