GNU bug report logs -
#32790
27.0.50; point jumps unexpectedly after delete-window
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Thu, 20 Sep 2018 23:57:01 UTC
Severity: minor
Found in version 27.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> 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
This bug report was last modified 5 years and 235 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.