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: Sun, 21 Oct 2018 21:17:28 +0300 Organization: LINKOV.NET Message-ID: <87bm7njk2f.fsf@mail.linkov.net> References: <87efdnsp2k.fsf@mail.linkov.net> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <87sh1ybyo6.fsf@mail.linkov.net> <5BA9E390.8030506@gmx.at> <87pnx1h1op.fsf@mail.linkov.net> <5BAB489E.5090002@gmx.at> <87h8ibvrs2.fsf@mail.linkov.net> <5BAD2507.6040605@gmx.at> <87a7nedidg.fsf@mail.linkov.net> <5BC5A558.9010401@gmx.at> <87zhvd7mg9.fsf@mail.linkov.net> <5BC6E52F.2070209@gmx.at> <87woqgw9a7.fsf@mail.linkov.net> <5BC83EC9.1090808@gmx.at> <877eiena58.fsf@mail.linkov.net> <5BC98A26.1030901@gmx.at> <87woqcnwas.fsf@mail.linkov.net> <5BCC3757.9020204@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1540150519 26759 195.159.176.226 (21 Oct 2018 19:35:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 21 Oct 2018 19:35:19 +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 Sun Oct 21 21:35:15 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 1gEJVJ-0006nx-92 for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Oct 2018 21:35:13 +0200 Original-Received: from localhost ([::1]:60012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEJXM-0006j2-FQ for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Oct 2018 15:37:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEJRA-0001hz-0E for bug-gnu-emacs@gnu.org; Sun, 21 Oct 2018 15:31:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEJGd-0004oW-EA for bug-gnu-emacs@gnu.org; Sun, 21 Oct 2018 15:20:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58564) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEJGd-0004oN-9h for bug-gnu-emacs@gnu.org; Sun, 21 Oct 2018 15:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gEJGd-0004IS-56 for bug-gnu-emacs@gnu.org; Sun, 21 Oct 2018 15:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Oct 2018 19:20:03 +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.154014954516425 (code B ref 32790); Sun, 21 Oct 2018 19:20:03 +0000 Original-Received: (at 32790) by debbugs.gnu.org; 21 Oct 2018 19:19:05 +0000 Original-Received: from localhost ([127.0.0.1]:34585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEJFg-0004Gr-Qh for submit@debbugs.gnu.org; Sun, 21 Oct 2018 15:19:05 -0400 Original-Received: from pop.dreamhost.com ([64.90.62.162]:57554 helo=pdx1-sub0-mail-a61.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEJFf-0004Gi-2q for 32790@debbugs.gnu.org; Sun, 21 Oct 2018 15:19:03 -0400 Original-Received: from pdx1-sub0-mail-a61.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a61.g.dreamhost.com (Postfix) with ESMTP id 9FEE380007; Sun, 21 Oct 2018 12:19:02 -0700 (PDT) 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=pk+aDl4oTA/Lc/Km10M8DmTUcxc=; b= Y6CGduhMwizkw2sdbqi3mkFsiIV2550hqohTnFL8JKXtzAJ/y5658Vn5MpYZrDD/ /t6tfDXUoBD0YHuDYcBDQE1uy7U4ozgrJhKU+qNP/ZiIzsgl627XKfZ/yqqNaHAE 7iUMTaNG3TlLGqtv48ZR8UPMA5FHV1SBzSSbar5CRgg= Original-Received: from mail.jurta.org (m91-129-96-249.cust.tele2.ee [91.129.96.249]) (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-a61.g.dreamhost.com (Postfix) with ESMTPSA id 2601580005; Sun, 21 Oct 2018 12:19:00 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a61 In-Reply-To: <5BCC3757.9020204@gmx.at> (martin rudalics's message of "Sun, 21 Oct 2018 10:22:47 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrgedtgddufeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrvdegleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrvdegledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud 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:151488 Archived-At: >> Using arrow keys as a prefix will allow to tell Emacs explicitly >> where do you want to display the buffer, e.g. >> >> H-up RET will display grep results in the above window after creating it >> >> H-left C-h f will display the *Help* buffer in the left window >> >> H-right C-x v d will display the vc-dir buffer in the right window >> >> H-down C-x C-b will display the buffer list in the bottom window >> >> The possibilities are limitless. > > I fail to see the connection between hyper key bindings and the way to > display a buffer. If at all, isn't that something Stephen Leake's > 'other-frame-window' package is supposed to provide? other-frame-window is limited to the coarse choice, i.e. to display the buffer in a random window on the same frame, or in another frame. Whereas the needed feature is to allow the user to point out exactly in which window the buffer should be displayed. This can be achieved with something like this: (let ((modifiers '(hyper))) (dolist (key '(left right up down)) (define-key global-map (vector (append modifiers (list key))) 'display-buffer-directionally))) (defun display-buffer-directionally () "Specify in which direction the buffer should be displayed." (interactive "P") (let* ((dir (event-basic-type (aref (this-command-keys) 0))) (win (window-in-direction dir))) (unless win (setq win (split-window nil nil dir))) (let ((hook (list 'lambda))) (setcdr hook `((window) (when (eq window ,win) ;; When a new buffer was displayed in that window, ;; we can restore a previous value. (setq display-buffer-overriding-action ',display-buffer-overriding-action) (remove-hook 'window-state-change-functions ',hook)))) (add-hook 'window-state-change-functions hook)) (setq display-buffer-overriding-action `((lambda (buffer alist) (window--display-buffer buffer ,win 'reuse alist)))))) Do you think conceptually this is the right direction of development?