GNU bug report logs - #32790
27.0.50; point jumps unexpectedly after delete-window

Previous Next

Package: emacs;

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

From: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> linkov.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 32790 <at> debbugs.gnu.org
Subject: bug#32790: 27.0.50; point jumps unexpectedly after delete-window
Date: Wed, 28 Nov 2018 09:33:16 +0100
> +  "If non-nil, have `switch-to-buffer' run `pop-to-buffer-same-window'.
> +This means that when switching the buffer it respects display actions
> +specified for `display-buffer'.  So `switch-to-buffer' will display the
> +buffer in the window specified by the ACTION argument of `display-buffer',
> +or by the rules in `display-buffer-alist' and other related variables."

I don't think this is right because 'switch-to-buffer' does not have a
display action it can pass to 'display-buffer'.  The behavior is
subject to 'display-buffer-overriding-action', 'display-buffer-alist'
and other related variables alone IIUC.

Furthermore, the doc-string of 'switch-to-buffer' should be amended
like:

If the option 'switch-to-buffer-obey-display-actions' is non-nil, run
the function 'pop-to-buffer-same-window' instead.  This may display
the buffer in an arbitrary window as specified by
'display-buffer-overriding-action', 'display-buffer-alist' and other
display related variables.  If this results in displaying the buffer
in the selected window, window start and point are adjusted as
prescribed by the option `switch-to-buffer-preserve-window-point'.
Otherwise, these are left alone.

And the following part of the doc-string

  If optional argument FORCE-SAME-WINDOW is non-nil, the buffer
  must be displayed in the selected window when called
  non-interactively; if that is impossible, signal an error rather
  than calling `pop-to-buffer'.

is presumably invalid when 'switch-to-buffer-obey-display-actions' is
non-nil.  Right?

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.