GNU bug report logs - #11567
24.0.97; WTF? ROFL! (hilarious bug)

Previous Next

Package: emacs;

Reported by: Tobias Bading <tbading <at> web.de>

Date: Sun, 27 May 2012 15:01:01 UTC

Severity: normal

Found in version 24.0.97

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Troels Nielsen <bn.troels <at> gmail.com>
To: Tobias Bading <tbading <at> web.de>
Cc: 11567 <at> debbugs.gnu.org
Subject: Re: bug#11567: 24.0.97; WTF? ROFL! (hilarious bug)
Date: Mon, 28 May 2012 00:33:14 +0200
On Sun, May 27, 2012 at 4:59 PM, Tobias Bading <tbading <at> web.de> wrote:
> Boys & girls, please *do* try this at home! (Or whereever your Emacs is :-). Works with r108017 of the emacs-24 branch on GNU/Linux as well as Mac OS for me.)
>
> emacs -Q:
> C-h v TAB C-x o C-x 0
>
> Your Emacs frame should now contain a single window with a completion list of variables.
> Take your pick: Select any variable either with your mouse, trackpad or keyboard.... Oooops! :-D

Well, it looks as though the *Completions* buffer only wants to be a
little thorough when hiding itself.

I don't really know the origin of the behavior, but I think it's
natural if there had been opened a special frame just for the
*Completions* buffer, so I suppose that's why it has been put there.

I propose the following patch, which does a little more checking if
it's likely that emacs has been opening a special frame for the
*Completions*-buffer. With some effort you could probably still get
emacs to iconify an unexpecting frame, but I don't think many people
would, if not for playing hide and seek that is... ;)

Regards
Troels

=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-05-27 01:06:44 +0000
+++ lisp/ChangeLog	2012-05-27 22:18:53 +0000
@@ -1,3 +1,8 @@
+2012-05-27  Troels Nielsen <bn.troels <at> gmail.com>
+
+	* simple.el (choose-completion): Be a little more particular
+	before iconifying a frame, when a completion has been chosen.
+
 2012-05-27  Eli Zaretskii  <eliz <at> gnu.org>

 	* mail/sendmail.el (mail-yank-region): Recognize

=== modified file 'lisp/simple.el'
--- lisp/simple.el	2012-05-04 23:16:47 +0000
+++ lisp/simple.el	2012-05-27 22:15:15 +0000
@@ -6214,7 +6215,11 @@
         (error "Destination buffer is dead"))
       (select-window (posn-window (event-start event)))
       (if (and (one-window-p t 'selected-frame)
-	       (window-dedicated-p (selected-window)))
+               (window-dedicated-p (selected-window))
+               (let ((buffer-name (buffer-name
+                                   (window-buffer (selected-window)))))
+                 (and (not (same-window-p buffer-name))
+                      (special-display-p buffer-name))))
 	  ;; This is a special buffer's frame
 	  (iconify-frame (selected-frame))
 	(or (window-dedicated-p (selected-window))




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

Previous Next


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