GNU bug report logs - #19012
25.0.50; `help-window-select'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Mon, 10 Nov 2014 16:43:03 UTC

Severity: minor

Found in version 25.0.50

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: martin rudalics <rudalics <at> gmx.at>, 19012 <at> debbugs.gnu.org
Subject: bug#19012: 25.0.50; `help-window-select'
Date: Tue, 11 Nov 2014 11:01:24 -0800 (PST)
> This one is at least dubious
>  >      (setq return-window  (select-window
>  >                            ^^^^^^^^^^^^^
>  >                            (funcall special-display-function buf args)))
> According to its doc-string `display-buffer' should
> 
>    Display BUFFER-OR-NAME in some window, without selecting it.
> 
> As a rule, `display-buffer' should not select the window used.
> Otherwise, `with-help-window' cannot determine the correct window to
> select when quitting help.

That is a new restriction (beginning with `display-buffer-alist'), if it
is one.  `display-buffer' should, as it did prior to `display-buffer-alist',
respect `special-display-buffer-names' and `special-display-function',
which has no such restriction wrt its value's behavior, AFAIK.

And there should be *no reason* for such a restriction.  The addition
of the zillion things that complicated `display-buffer' was supposed to
make it *more* flexible, not less, letting users get more and finer
control over the behavior - not losing the ability to use an arbitrary
display function.

If `display-buffer' with default values for everything does not want
to select the displayed buffer, fine.  But `display-buffer' trying to
prohibit a user-defined display function from selecting (or doing
anything else) would be unnecessarily restrictive: it is not
`display-buffer's business what a user-defined "display" function
might do.

Besides which, "according to its doc-string `display-buffer'..." is
not a reason.  Its doc string can say nothing about what user-defined
display function `special-display-function' does, beyond what the doc
for that variable says.  It says (and should say) nothing about not
selecting the displayed buffer's window in such a case.

> However, with the current release and trunk, emacs -Q and
> (defun 1on1-display-*Help*-frame (buf &optional args) ...
> (add-to-list 'special-display-buffer-names...
> the *Help* window is always selected here after C-h f, C-h v, ...

Well, there is also non-nil `pop-up-frames' etc.  But I see that from
`emacs -Q', with only the above and non-nil `pop-up-frames', what you
say is true, so there must be something else involved as well.  I will
take a look when I get some time.




This bug report was last modified 10 years and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.