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
Message #203 received at 32790 <at> debbugs.gnu.org (full text, mbox):
> Shouldn't xref support a shorter and easier to type key sequence
> ‘S-M-<right> M-.’ with the following patch:
>
> diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
> index 6b1421a6f7..6aab174bcf 100644
> --- a/lisp/progmodes/xref.el
> +++ b/lisp/progmodes/xref.el
> @@ -425,7 +425,7 @@ xref--pop-to-location
> (xref-location-marker (xref-item-location item))))
> (buf (marker-buffer marker)))
> (cl-ecase action
> - ((nil) (switch-to-buffer buf))
> + ((nil) (pop-to-buffer-same-window buf))
> (window (pop-to-buffer buf t))
> (frame (let ((pop-up-frames t)) (pop-to-buffer buf t))))
> (xref--goto-char marker))
I think so. In particular because 'xref--goto-char' does not cohabit
well with 'switch-to-buffer-preserve-window-point' in the first place.
Dmitry should consent, though.
> Then maybe all unused code should be removed including
> windmove-other-window-loc, windmove-reference-loc,
> windmove-wrap-loc-for-movement, windmove-constrain-loc-for-movement,
> etc.
Citing from a discussion with Dmitry:
> I thought you might go ahead and just port windmove to use
> `window-in-direction'.
windmove has an extra ARG to distinguish the upper left corner of a
window and its position of point as reference points. I can't easily
dismiss that.
I'm not sure whether it's still relevant but if so we'd have to include
it in 'window-in-direction'.
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.