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: Wed, 31 Oct 2018 09:11:52 +0100 Message-ID: <5BD963C8.9090905@gmx.at> References: <87efdnsp2k.fsf@mail.linkov.net> <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> <5BCD934D.4070906@gmx.at> <878t2owo8i.fsf@mail.linkov.net> <5BD03F4D.1000900@gmx.at> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.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 1540973470 13289 195.159.176.226 (31 Oct 2018 08:11:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 31 Oct 2018 08:11:10 +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 Wed Oct 31 09:11:06 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 1gHlak-0003Ns-1F for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Oct 2018 09:11:06 +0100 Original-Received: from localhost ([::1]:57932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHlcq-0004yj-IK for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Oct 2018 04:13:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHlcj-0004yN-DY for bug-gnu-emacs@gnu.org; Wed, 31 Oct 2018 04:13:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHlce-0006dC-4P for bug-gnu-emacs@gnu.org; Wed, 31 Oct 2018 04:13:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51977) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHlcc-0006cN-DW for bug-gnu-emacs@gnu.org; Wed, 31 Oct 2018 04:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gHlcc-00038d-7W for bug-gnu-emacs@gnu.org; Wed, 31 Oct 2018 04:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Oct 2018 08:13:02 +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.154097352912004 (code B ref 32790); Wed, 31 Oct 2018 08:13:02 +0000 Original-Received: (at 32790) by debbugs.gnu.org; 31 Oct 2018 08:12:09 +0000 Original-Received: from localhost ([127.0.0.1]:56235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHlbl-00037X-8q for submit@debbugs.gnu.org; Wed, 31 Oct 2018 04:12:09 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:59947) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHlbj-000374-Uk for 32790@debbugs.gnu.org; Wed, 31 Oct 2018 04:12:08 -0400 Original-Received: from [192.168.1.101] ([213.162.73.82]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lp3Lw-1ffQZw0XCe-00es5T; Wed, 31 Oct 2018 09:12:00 +0100 Original-Received: from [192.168.1.101] ([213.162.73.82]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lp3Lw-1ffQZw0XCe-00es5T; Wed, 31 Oct 2018 09:12:00 +0100 In-Reply-To: <87bm7bru1c.fsf@mail.linkov.net> X-Provags-ID: V03:K1:elkrpoxZKcq99RcNfkc3rdeja/+v5Nn37mnSLt7eCsmkpxZ4abl SxAA1I2IlMaTR8vvXOXBAwxAgSST3z77p0CZ5vwQJbOjl5+dT0s52YkKrgdPG3NnkfhqRkW e5w4YyK/ZZI5Ta9TuWXiY56arsG/FLcldtfqxf4e0bqH+gLHn009XJYbRdBJ06mSHPwio3/ DYsyWxX2PS64/vrKAH04A== X-UI-Out-Filterresults: notjunk:1;V01:K0:8qr4FCzZPl4=:Ax/x6BPfV+1fgl4hn6sYeE pJ08c/OVGYf3nk1CdmULjX3XOnx3Wn5wef6Ek+Mf7sBGObutDsQAF1JfjOMf1BUqYwUKq7bcj GPO3l2512oRwDwfrpTZudC5nIy7Hf29LWIEsza8mmbAGA2VSZ4jK4xrkPMzh0MzLWWeGWSffG lmlesKQOPOf7l5ZvouhHJ41EpPnbjrYdG5C7Im3IoBNk/MVaSK7duYQF9yIjShCnGzSB+Y4Yf kUvvmEjc1avb3zrcty+x6BL8gJlc9H5iGQkIdiDr8z4u4jNwkAGeHJs08HbzY141EmUmBG8Ba NYYyCgLvDNZM6GyAP61uswXl/OBBke406joEs5raKtTKUztLhDXKKtXWUZ16Deqob5kNoTIHJ x+zGD461r97usdo9FqFAO0A7jp8HGu+nv3A+Y6u9FSyL9dH8luzNeGlSxJnn0vyFN9kf9SOlW mMJDE1FCBELHEy24lZ10gxYAApV9yQ/3TnyOKTFYJAhMMtedmsQNQZaJAZotB2ev8yKLzRgNa scTGXlkFDV00NLPRdllylWQF75Ib4Sdr7iNjqQgrqh395WC1gJsw8gBpB0ciHdUoSrlKwUKfw VtwoGCMeOiHUHlH8sUEuKM0NbcKuFe6nn++faeTxrBuUIE+YRy2BoXLL7DOGged9X3UvtfS3P cV+QFPEdBzBkyCfNeEGN6FbD4ZgC/OUyW0yx85ZrsnimnK0QLCHQxDFK1EOHEUkUxif97Ppum 8zekjDz8BSlJMLMezsuCHW9f9YvNiV3HujiZEbLVhW0k1zsLPQItw1xaYYNaeHlU3+CgbdsK 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:151859 Archived-At: > Ok, after a small change it handles also C-g: I forgot (or never learned) how to use it. Can you please include an example so people can try it. > (defun display-buffer-directionally () > "Specify in which direction the buffer should be displayed. > Arrows show the direction. Mod-0 forces to display in the same window." > (interactive) > (let* ((dir (event-basic-type (aref (this-command-keys) 0))) > (win (if (eq dir ?0) > (selected-window) > (or (window-in-direction dir) > (split-window nil nil dir))))) > (let ((hook (list 'lambda))) > (setcdr hook `(() > (unless (or > ;; Remove the hook immediately > ;; after exiting the minibuffer. > (> (minibuffer-depth) 0) > ;; But don't remove immediately after > ;; adding the hook by the same command. > (eq this-command ',this-command)) Can you give the rationale for the latter? I don't grok it. > (setq display-buffer-overriding-action > ',display-buffer-overriding-action) > (remove-hook 'post-command-hook ',hook)))) > (add-hook 'post-command-hook hook)) > (setq display-buffer-overriding-action > `((lambda (buffer alist) > (unless (> (minibuffer-depth) 0) > (window--display-buffer buffer ,win 'reuse alist))))))) 'reuse' holds only for the ?0 case. When we split, the third argument should be 'window'. martin