From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Date: Mon, 22 Oct 2018 11:07:25 +0200 Message-ID: <5BCD934D.4070906@gmx.at> 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> <87bm7njk2f.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1540199523 3978 195.159.176.226 (22 Oct 2018 09:12:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 Oct 2018 09:12:03 +0000 (UTC) Cc: 32790@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 22 11:11:59 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 1gEWFi-0000tV-DF for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Oct 2018 11:11:58 +0200 Original-Received: from localhost ([::1]:33849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEWHo-00066m-La for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Oct 2018 05:14:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEWHe-00066B-2Y for bug-gnu-emacs@gnu.org; Mon, 22 Oct 2018 05:14:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEWBy-0003jq-TE for bug-gnu-emacs@gnu.org; Mon, 22 Oct 2018 05:08:56 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59086) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEWBt-0003d9-Sd for bug-gnu-emacs@gnu.org; Mon, 22 Oct 2018 05:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gEWBt-0007AM-L0 for bug-gnu-emacs@gnu.org; Mon, 22 Oct 2018 05:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Oct 2018 09:08:01 +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.154019926527509 (code B ref 32790); Mon, 22 Oct 2018 09:08:01 +0000 Original-Received: (at 32790) by debbugs.gnu.org; 22 Oct 2018 09:07:45 +0000 Original-Received: from localhost ([127.0.0.1]:35108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEWBa-00079b-VD for submit@debbugs.gnu.org; Mon, 22 Oct 2018 05:07:44 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:55145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEWBX-00079O-1U for 32790@debbugs.gnu.org; Mon, 22 Oct 2018 05:07:39 -0400 Original-Received: from [192.168.1.101] ([213.162.73.34]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0McVns-1fwzIX1d6u-00Hj8x; Mon, 22 Oct 2018 11:07:29 +0200 Original-Received: from [192.168.1.101] ([213.162.73.34]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0McVns-1fwzIX1d6u-00Hj8x; Mon, 22 Oct 2018 11:07:29 +0200 In-Reply-To: <87bm7njk2f.fsf@mail.linkov.net> X-Provags-ID: V03:K1:v7w3y41xN4bKgXkOr2zPzvyGqHu01UEWdU+YwjiLARcOijyS1bf vmlaCHNkS+P2bIHCTUxLz9Cf39F+Lkp9LRr2OWJ0ghT3S3VTCLQd506dm/DiVn4KnJYKey6 6o1P8JBmSVhpCbWCkFxLl7csNyPmOPKGahhrGPXRsPGBDalhoNgCkdb8OKSFv8MvFZlrw6M nptr00ortM8+0Fg4ZtXkQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:rUL6m1WDZIk=:y2xWBnDSpsxRl4qr3Vdkn0 xqp9IxX7ckwvJEkPYM5vwh6XoQE76iWW2KrnFdMfNKLNqVLJEfPZcrUmzCOfzoN28nw2asOPm yTllYo6Fni4cL0uAlgKyWECDolIrvYaB2tOG6aPkocoOwlZpShJh5s5bz5Fwa2/9orTJP2HFK XheWiI6S/M7LUSi4vSF2Nln5g4MZ49ajQT+tO+/KQAp0itAE41MFDk413annd2K+930mQQ0U/ ukwLV7Xy30LaaX/jG7wPd8fgcrGxtsvv8UQnZu8SD+Gmbxs7YjFrhkUdc7n+v9n6a6PvkjJsR p5muW61qjklJ0x14xBmT3EOvjvGmFEp+Yza2EPgxCUtkzS8yMysf5W+Q3kDhZ+782+3LQKLGV 0Vltxl6YK6MHy6+lLrOoDhqnjfgwpOxSbs575xsXl+oZ2pT55EY5jmzmhhJv+zA9D/2a4kEuy w1GsqRI8Zoqh+10Ovz5C++0r7BJoc5EAmILgRCQaSvAiZhyNS9w7uUdF/q6jkEGuhO1vW9C3q 6HIIkcyV/RpE++oQZa/Y3EwC9MYnOqSdpQ8dGhbqgnGsD4McqwXVB023+KirxrR7zfeYFPkg3 NTlFnjF2So/xNGumROg7rAIk0AeTK+PFR60UWlDCP0DrrwSPtIA2nIoOQ4lxnBMMfYrHQJXKX 7puFlmMDNABiV9M4Av3nbXVNI/5y6dSG2UUbGDy/TSGVkYKXgRkhy3dWnk+1F7uC8JHS3VKEG P1jPRRVLTHnpUdoYXe2wozuD5XK/mbJ7dMVRuqyg0iGCAOhGT/fYw3riu5PrD58YevUHHdkH 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:151497 Archived-At: > 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. It would indeed be nice to fix that there in some way. > 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? Good idea. But IIUC we can't use 'hyper' in Emacs because it is not supposed to be generally present and must be bound to a key first. So we'd need some other mechanism. martin