From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Date: Fri, 23 Nov 2018 00:39:50 +0200 Organization: LINKOV.NET Message-ID: <874lc8g2ix.fsf@mail.linkov.net> References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87y39m9f8b.fsf@mail.linkov.net> <5BF65D7F.2090805@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1542927014 11611 195.159.176.226 (22 Nov 2018 22:50:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 22 Nov 2018 22:50:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 32790@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 22 23:50:09 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPxnU-0002sw-U7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Nov 2018 23:50:09 +0100 Original-Received: from localhost ([::1]:49627 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPxpb-0005EQ-1v for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Nov 2018 17:52:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPxpS-0005EE-VD for bug-gnu-emacs@gnu.org; Thu, 22 Nov 2018 17:52:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPxpP-00056B-Qz for bug-gnu-emacs@gnu.org; Thu, 22 Nov 2018 17:52:10 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38535) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gPxpP-00055t-Av for bug-gnu-emacs@gnu.org; Thu, 22 Nov 2018 17:52:07 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gPxpO-0006Vc-Te for bug-gnu-emacs@gnu.org; Thu, 22 Nov 2018 17:52:06 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Nov 2018 22:52:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32790 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32790-submit@debbugs.gnu.org id=B32790.154292711624893 (code B ref 32790); Thu, 22 Nov 2018 22:52:06 +0000 Original-Received: (at 32790) by debbugs.gnu.org; 22 Nov 2018 22:51:56 +0000 Original-Received: from localhost ([127.0.0.1]:42792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPxpC-0006T7-3i for submit@debbugs.gnu.org; Thu, 22 Nov 2018 17:51:55 -0500 Original-Received: from palegreen.birch.relay.mailchannels.net ([23.83.209.140]:32396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPxp7-0006Ry-HN for 32790@debbugs.gnu.org; Thu, 22 Nov 2018 17:51:51 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0E96843430; Thu, 22 Nov 2018 22:51:48 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a37.g.dreamhost.com (unknown [100.96.20.98]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id C837241F0F; Thu, 22 Nov 2018 22:51:47 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a37.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Thu, 22 Nov 2018 22:51:48 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Bottle-Grain: 5a142678183a5574_1542927107912_2419178463 X-MC-Loop-Signature: 1542927107912:3883580106 X-MC-Ingress-Time: 1542927107911 Original-Received: from pdx1-sub0-mail-a37.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a37.g.dreamhost.com (Postfix) with ESMTP id 81A9D7FE7C; Thu, 22 Nov 2018 14:51:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=IGf1QGNu6RN5FgTBgjNffyY9jxQ=; b= GRXaHL9YAz1JCUdEAaPEByACWYr5FchJIXQLbuswo0M5jmLLvBx3D9In33QUqZ6e n03FAjaCx2+CiTIXzjNcYIvbKe9w0yZYopNjlByZzOAJFdY4TvYRivHBkzBqhe1+ nJremOvdyFmBEfAB1XCyjlLqr+o4xG4d9Kv8Zr3AZKU= Original-Received: from mail.jurta.org (m91-129-105-252.cust.tele2.ee [91.129.105.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a37.g.dreamhost.com (Postfix) with ESMTPSA id 12BC67FE77; Thu, 22 Nov 2018 14:51:45 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a37 In-Reply-To: <5BF65D7F.2090805@gmx.at> (martin rudalics's message of "Thu, 22 Nov 2018 08:40:47 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddutddgtdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrddvhedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrvdehvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd 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: 208.118.235.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:152692 Archived-At: >> +;;; Directional window deletion >> + >> +(defun windmove-delete-in-direction (dir &optional arg) >> + "Delete the window at direction DIR. >> +If prefix ARG is `C-u', delete the selected window and >> +select the window at direction DIR." >> + (let ((other-window (window-in-direction dir nil nil arg >> + windmove-wrap-around t))) > > So 'windmove-wrap-around' non-nil means that the other window could be > the selected one and we try to delete ourselves. Right? Fortunately, 'windmove-wrap-around' doesn't wrap to the same window when there is only one window in that direction. >> + ((and (window-minibuffer-p other-window) >> + (not (minibuffer-window-active-p other-window))) >> + (user-error "Minibuffer is inactive")) > > Should we try to delete the active minibuffer window? Interesting question. Do you think it's worth the trouble to implement special handling of the minibuffer: 1. when a window in the below direction is requested to be deleted from the bottom window, and the minibuffer is active, then call (abort-recursive-edit) 2. when the selected bottom window is requested to be deleted and selection is requested to be moved in the below direction, then the minibuffer's window should be selected.