GNU bug report logs -
#8865
24.0.50; `display-buffer' does not respect `pop-up-frames'
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Tue, 14 Jun 2011 18:15:02 UTC
Severity: normal
Found in version 24.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
> How about looking at the Emacs sources before you made your changes? ;-) If you
> grep the Emacs 20, 21, 22, or 23 Lisp source code for `pop-up-frames' you will
> see lots of hits, some of which are tests of its value. For example (Emacs
> 23.3):
>
>>From help.el:
> (cond ((or pop-up-frames...)...)
> ...
All these tests will be removed/replaced in due time because these
variables are obsolete now.
> I use such tests in only a couple of places. They are of course based on the
> (original) meaning of `pop-up-frames': non-nil means `display-buffer' uses a
> separate frame.
And that was incorrect already in Emacs 23. The value 'graphic-only
should have been dealt with separately.
> Nothing special.
>
> So the question is how to test that user intention using the latest Emacs
> design. From my code:
>
> ;; If non-nil `pop-up-frames' then inhibit showing annotation.
> (let ((bookmark-automatically-show-annotations
> (and bookmark-automatically-show-annotations
> (not pop-up-frames))))
>
> ;; Use separate frames instead of windows if `pop-up-frames'
> ;; is non-nil or if prefix arg is negative.
> (cond (...)
> ((or pop-up-frames option)
> (while file-list (find-file-other-frame...
Code shouldn't try to guess the user's intentions in the first place:
The strategy, in increasing priority, is
- users express their intentions in `display-buffer-alist',
- the code can suggest a better solution by passing a second argument to
the buffer display function,
- users can override the code by setting the override specifier in
`display-buffer-alist'.
Code should only express suggestions in the sense that "displaying the
buffer in this or that way is best to my knowledge". The user can
accept that suggestion or override it. In most cases, however, code
should not suggest anything and leave the decision to the user.
Obviously, if your code is targeted only at users not customizing
`display-buffer-alist', you can test `pop-up-frames' as before, taking
care of the special values 'unset (which means the user doesn't bother)
and 'graphic-only. One benefit of this is that if `pop-up-frames' is
nil, the user has explicitly delared that she doesn't want to pop up new
frames with your code.
martin
This bug report was last modified 14 years and 33 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.