GNU bug report logs - #11939
24.1; `save-buffers-kill-emacs' loses minibuffer focus when it calls `list-processes'

Previous Next

Package: emacs;

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

Date: Fri, 13 Jul 2012 18:07:01 UTC

Severity: normal

Found in version 24.1

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

Bug is archived. No further changes may be made.

Full log


Message #389 received at 11939 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 11939 <at> debbugs.gnu.org
Subject: Re: bug#11939: 24.1; `save-buffers-kill-emacs'
	losesminibufferfocuswhenitcalls`list-processes'
Date: Sat, 11 Aug 2012 11:31:18 +0200
> BTW: Do you not think that there should be a call to `raise-frame' in `s-d-p-f'
> before returning the WINDOW in the case where ARGS is a list (FUNCTION .
> FN-ARGS)?
>
> Should it not _always_ be the case that `special-display-popup-frame' pops up
> the buffer in a frame, i.e., ensures that its display is clearly visible?

Its doc-string says: "If ARGS is a list whose car is a symbol, use (car
ARGS) as a function to do the work."  I suppose that "do the work" means
that function is entirely responsible for doing what you want.  In any
other case, `special-display-popup-frame' should do what you want.

> Even if the buffer is already displayed somewhere, shouldn't a frame that it is
> displayed in be raised?

`special-display-popup-frame' does that when it finds a window
displaying the buffer.

> In particular, the frame that is the `window-frame' of
> the window returned by FUNCTION applied to its args?

I suppose FUNCTION should be held responsible for raising the frame if
needed.

> NOTE: If the frame fitting did not need to be done in two different cases (ARGS
> with FUNCTION and otherwise), hence in two different places in the
> `special-display-popup-frame' code, then I might just use `defadvice'.  Or if
> `s-d-p-f' provided a hook in those two places then I would just do the frame
> fitting on that hook.  I do not especially _like_ redefinining vanilla
> functions...
>
> I do not need to redefine `s-d-p-f' in prior Emacs versions.  That is presumably
> because I already have frame-fitting on existing hooks.  Something in the
> vanilla changes for Emacs 24 made it so that frame fitting was no longer
> occurring in all cases, which led me to redefine `s-d-p-f'.  I'm not sure which
> hooks were sufficient before.  I use, e.g., `after-make-frame-functions' and
> `temp-buffer-show-hook'.
>
> I also redefine `switch-to-buffer' so that if the selected window is dedicated
> (`window-dedicated-p') then it uses another window, regardless of argument
> FORCE-SAME-WINDOW.  (If it is not dedicated then the vanilla `s-to-b' code is
> invoked.)

I don't understand why you insist on using, advising, or redefining
`special-display-popup-frame'.  Customizing `display-buffer-base-action'
should be all you want.

BTW: With with-temp-buffer-window.el it's possible to customize
`temp-buffer-resize-frames' and automatically resize temporary frames.

martin




This bug report was last modified 12 years and 289 days ago.

Previous Next


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