From unknown Sat Jun 21 03:01:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#8184 <8184@debbugs.gnu.org> To: bug#8184 <8184@debbugs.gnu.org> Subject: Status: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer' Reply-To: bug#8184 <8184@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:01:46 +0000 retitle 8184 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to = `kill-this-buffer' reassign 8184 emacs submitter 8184 tlh severity 8184 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 06 00:28:43 2011 Received: (at submit) by debbugs.gnu.org; 6 Mar 2011 05:28:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pw6WI-0003Nf-HY for submit@debbugs.gnu.org; Sun, 06 Mar 2011 00:28:42 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pw6WG-0003NT-EX for submit@debbugs.gnu.org; Sun, 06 Mar 2011 00:28:41 -0500 Received: from eggs.gnu.org ([140.186.70.92]:38515) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Pw6WB-0002n8-2s for emacs-pretest-bug@gnu.org; Sun, 06 Mar 2011 00:28:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pw6W9-0004DI-OJ for emacs-pretest-bug@gnu.org; Sun, 06 Mar 2011 00:28:35 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.1 Received: from cpe-70-115-60-152.hot.res.rr.com ([70.115.60.152]:50633 helo=bine.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pw6W9-0004DE-EG for emacs-pretest-bug@gnu.org; Sun, 06 Mar 2011 00:28:33 -0500 Received: by bine.local (Postfix, from userid 501) id D44BB2A2BE04; Sat, 5 Mar 2011 23:28:31 -0600 (CST) From: tlh To: emacs-pretest-bug@gnu.org Subject: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer' Date: Sat, 05 Mar 2011 23:28:31 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 70.115.60.152 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) `menu-updating-frame' is pointing to a dead frame, causing a `frame-live-p' error in `menu-bar-non-minibuffer-p' when I call `kill-this-buffer'. I don't how it got out of sync, but it seems to me that `kill-this-buffer' shouldn't be in menu-bar.el -- or depend on menu-bar-specific code -- in the first place. Backtrace: Debugger entered--Lisp error: (wrong-type-argument frame-live-p #) frame-selected-window(#) menu-bar-non-minibuffer-window-p() kill-this-buffer() call-interactively(kill-this-buffer nil nil) In GNU Emacs 23.1.90.1 (x86_64-apple-darwin10.4.0, NS apple-appkit-1038.32) of 2010-07-17 on ridley.local Windowing system distributor `Apple', version 10.3.1038 configured using `configure '--with-ns'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: erc-services-mode: t erc-log-mode: t whitespace-mode: t eldoc-mode: t global-undo-tree-mode: t undo-tree-mode: t shell-dirtrack-mode: t kvdb-mode: t recs-mode: t recentf-mode: t show-paren-mode: t workgroups-mode: t erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-track-minor-mode: t erc-match-mode: t erc-netsplit-mode: t erc-highlight-nicknames-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t ido-everywhere: t auto-image-file-mode: t global-auto-revert-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: l l t h i s SPC f u C-a C-H-f C-H-f C-n C-n C-n C-n C-n M-f M-f M-< C-s n o n - m i n i b u f f e r - w i n d o w - p C-s C-s C-s C-s C-s C-s C-s C-a C-n C-n C-n C-n C-n C-n C-n C-p C-e M-b M-f C-c C-e C-H-f C-H-p M-b M-b M-b M-b M-b M-b M-b M-b M-b M-b M-b M-f M-f M-b M-b M-b M-b C-h C-h t h e SPC v a r SPC ` M-f - f r a m e ' M-d M-> I t ' s SPC f u n n y ! C-H-f C-H-f C-H-p H-P H-P H-P H-P H-P H-P H-P H-P H-P H-P H-P H-P H-P M-> C-z C-j C-p H-P H-P M-> H-P H-P M-> H-P H-P H-P M-> C-x RET b u g - r e p o C-g C-x RET r e p o r t C-g C-H-f C-H-k C-z RET C-b C-H-k H-P H-P H-P C-p C-p C-p C-p C-p C-p C-p q C-x b C-l C-l C-l C-l C-l C-p C-l C-a M-f M-f M-f M-f M-f M-f M-f C-c C-e C-H-f C-x RET r e p o r t m e n u - u p d a t i n g - f r a m e SPC c a u s C-h C-h C-h C-h M-b M-b M-b o u t - o f - s y n c C-h C-h C-h y n c SPC C-e c a u s i n g SPC e r r o r s SPC C-h C-h C-h C-h C-h C-h C-h C-g C-H-f C-H-k q C-x RET r e p o r Recent messages: Mark set [5 times] Quit [2 times] menu-bar-non-minibuffer-window-p: Wrong type argument: frame-live-p, # Debug on Error enabled globally Entering debugger... Back to top level. # Quit Entering debugger... Back to top level. Load-path shadows: /Users/luke/emacs/site-lisp/emms/lisp/tq hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/tq Features: (shadow mail-extr emacsbug jka-compr find-func info debug cus-start cus-load warnings compile erc-services erc-log newcomment multi-isearch vc-git whitespace tlh-startup ansi-color em-unix em-script em-ls em-hist em-pred em-glob em-dirs em-basic esh-opt em-alias esh-var esh-io esh-cmd esh-ext esh-proc esh-arg eldoc esh-groups eshell em-banner em-cmpl em-term term disp-table ehelp electric em-prompt esh-module esh-mode esh-util help-mode view tlh-registers tlh-keys tlh-alias tlh-system tlh-osx tlh-mode ascii-table breadcrumb edit-server goto-last-change malyon malyon-mode zone tabify undo-tree yaoddmuse url url-proxy url-privacy url-expand url-methods url-history url-cookie url-util url-parse url-vars skeleton sgml-mode google-define w3m-load clojure-mode slime-fontifying-fu slime-package-fu slime-references slime-scratch slime-presentations slime-fuzzy slime-fancy-inspector slime-parse slime-editing-commands slime-banner slime-asdf slime-repl slime apropos hideshow hyperspec browse-url slime-autoloads diary-lib diary-loaddefs cal-menu calendar cal-loaddefs midnight tramp-imap imap-hash imap message sendmail ecomplete rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util hashcash mail-utils assoc tramp-gw tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp auth-source gnus-util netrc shell password-cache tramp-compat trampver tls kvdb org-table org org-footnote org-src org-list org-faces org-compat org-macs noutline outline pickel epa-file epa derived epg epg-config uniquify recs-mode imenu byte-opt browse-kill-ring advice help-fns advice-preload windmove saveplace recentf tree-widget bbdb-autoloads bbdb timezone paren color-theme-thunk1 color-theme workgroups tlh-notify tlh-sound tlh-erc erc-menu erc-join erc-ring comint ring erc-networks erc-pcomplete time-date pcomplete erc-track erc-match erc-netsplit erc-highlight-nicknames easy-mmode erc-button erc-fill erc-stamp wid-edit erc-goodies erc erc-backend erc-compat format-spec thingatpt pp tlh-emms edmacro kmacro emms-browser sort emms-playlist-sort emms-last-played emms-cache emms-mode-line-icon emms-mode-line emms-info-id3v2 emms-info-ogginfo emms-info-mp3info emms-info later-do emms-playlist-mode emms-player-mplayer emms-player-simple emms-source-playlist emms-source-file dired emms emms-compat tlh-ido ido tlh-init delsel regexp-opt image-file autorevert yow cookie1 server tlh-util cl cl-19 bytecomp byte-compile tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 06 07:46:05 2011 Received: (at 8184) by debbugs.gnu.org; 6 Mar 2011 12:46:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PwDLY-0006Zb-0u for submit@debbugs.gnu.org; Sun, 06 Mar 2011 07:46:04 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PwDLV-0006Z0-Aq for 8184@debbugs.gnu.org; Sun, 06 Mar 2011 07:46:01 -0500 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1PwDLQ-0002mY-0V; Sun, 06 Mar 2011 07:45:56 -0500 Date: Sun, 06 Mar 2011 07:45:56 -0500 Message-Id: From: Eli Zaretskii To: tlh In-reply-to: (message from tlh on Sat, 05 Mar 2011 23:28:31 -0600) Subject: Re: bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer' References: X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8184 Cc: 8184@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > From: tlh > Date: Sat, 05 Mar 2011 23:28:31 -0600 > Cc: > > > `menu-updating-frame' is pointing to a dead frame, causing a > `frame-live-p' error in `menu-bar-non-minibuffer-p' when I call > `kill-this-buffer'. I don't how it got out of sync, but it seems to me > that `kill-this-buffer' shouldn't be in menu-bar.el -- or depend on > menu-bar-specific code -- in the first place. ??? This function is bound to the "Close" item in the "File" menu, so it is definitely related to the menu bar. > Backtrace: > > Debugger entered--Lisp error: (wrong-type-argument frame-live-p #) > frame-selected-window(#) > menu-bar-non-minibuffer-window-p() > kill-this-buffer() > call-interactively(kill-this-buffer nil nil) Did you call kill-this-buffer from the menu bar, or with M-x? From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 06 13:19:24 2011 Received: (at 8184) by debbugs.gnu.org; 6 Mar 2011 18:19:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PwIY8-0007n4-An for submit@debbugs.gnu.org; Sun, 06 Mar 2011 13:19:24 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PwIY5-0007ms-Kb for 8184@debbugs.gnu.org; Sun, 06 Mar 2011 13:19:23 -0500 Received: (qmail invoked by alias); 06 Mar 2011 18:19:15 -0000 Received: from 62-47-44-143.adsl.highway.telekom.at (EHLO [62.47.44.143]) [62.47.44.143] by mail.gmx.net (mp017) with SMTP; 06 Mar 2011 19:19:15 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/X384cngTXl1MmACjGzD6d2p9ZbDHceqliiSrB2M tKGLPpKQZv5JxQ Message-ID: <4D73D021.8070105@gmx.at> Date: Sun, 06 Mar 2011 19:19:13 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer' References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 8184 Cc: 8184@debbugs.gnu.org, tlh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) > ??? This function is bound to the "Close" item in the "File" menu, so > it is definitely related to the menu bar. Am I right that the time for executing `kill-this-buffer-enabled-p' is currently always proportional to the number of live buffers? In that case I'd rewrite his function as (defun kill-this-buffer-enabled-p () (or (not (menu-bar-non-minibuffer-window-p)) (let (found-1) (catch 'found-2 (dolist (buffer (buffer-list)) (unless (string-match-p "^ " (buffer-name buffer)) (if (not found-1) (setq found-1 t) (throw 'found-2 t)))))))) martin From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 06 13:59:44 2011 Received: (at 8184) by debbugs.gnu.org; 6 Mar 2011 18:59:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PwJB9-0000DA-BP for submit@debbugs.gnu.org; Sun, 06 Mar 2011 13:59:43 -0500 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PwJB7-0000Cy-7W for 8184@debbugs.gnu.org; Sun, 06 Mar 2011 13:59:41 -0500 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p26IxXD1022479 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 6 Mar 2011 18:59:34 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p26IlPjn012161; Sun, 6 Mar 2011 18:59:32 GMT Received: from abhmt010.oracle.com by acsmt355.oracle.com with ESMTP id 1112879621299437946; Sun, 06 Mar 2011 10:59:06 -0800 Received: from dradamslap1 (/10.159.53.25) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 06 Mar 2011 10:59:06 -0800 From: "Drew Adams" To: "'martin rudalics'" , "'Eli Zaretskii'" References: <4D73D021.8070105@gmx.at> Subject: RE: bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer' Date: Sun, 6 Mar 2011 10:59:05 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4D73D021.8070105@gmx.at> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 thread-index: AcvcLYOdct7vfZVmSA2MWZjjd+ZpmAAAmSSA X-Source-IP: acsmt355.oracle.com [141.146.40.155] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090203.4D73D995.00CF,ss=1,fgs=0 X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 8184 Cc: 8184@debbugs.gnu.org, 'tlh' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) > Am I right that the time for executing `kill-this-buffer-enabled-p' is > currently always proportional to the number of live buffers? Seems so. > In that case I'd rewrite [t]his function as > > (defun kill-this-buffer-enabled-p () > (or (not (menu-bar-non-minibuffer-window-p)) > (let (found-1) > (catch 'found-2 > (dolist (buffer (buffer-list)) > (unless (string-match-p "^ " (buffer-name buffer)) > (if (not found-1) > (setq found-1 t) > (throw 'found-2 t)))))))) `found-1' is useless here (not used). (defun kill-this-buffer-enabled-p () (or (not (menu-bar-non-minibuffer-window-p)) (catch 'found (dolist (buffer (buffer-list)) (unless (string-match-p "^ " (buffer-name buffer)) (throw 'found t))) nil))) From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 06 14:14:06 2011 Received: (at 8184) by debbugs.gnu.org; 6 Mar 2011 19:14:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PwJP3-0000Xj-Tb for submit@debbugs.gnu.org; Sun, 06 Mar 2011 14:14:06 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PwJP0-0000X9-JF for 8184@debbugs.gnu.org; Sun, 06 Mar 2011 14:14:04 -0500 Received: (qmail invoked by alias); 06 Mar 2011 19:13:55 -0000 Received: from 62-47-44-143.adsl.highway.telekom.at (EHLO [62.47.44.143]) [62.47.44.143] by mail.gmx.net (mp023) with SMTP; 06 Mar 2011 20:13:55 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/YRpxprtPY4qCWHjfrSo8s823YQ+8TNpoudtPAtv cPpnSAv/nRpQbf Message-ID: <4D73DCF0.9080604@gmx.at> Date: Sun, 06 Mar 2011 20:13:52 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Drew Adams Subject: Re: bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer' References: <4D73D021.8070105@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 8184 Cc: 'Eli Zaretskii' , 8184@debbugs.gnu.org, 'tlh' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) >> (defun kill-this-buffer-enabled-p () >> (or (not (menu-bar-non-minibuffer-window-p)) >> (let (found-1) >> (catch 'found-2 >> (dolist (buffer (buffer-list)) >> (unless (string-match-p "^ " (buffer-name buffer)) >> (if (not found-1) >> (setq found-1 t) >> (throw 'found-2 t)))))))) > > `found-1' is useless here (not used). > > (defun kill-this-buffer-enabled-p () > (or (not (menu-bar-non-minibuffer-window-p)) > (catch 'found > (dolist (buffer (buffer-list)) > (unless (string-match-p "^ " (buffer-name buffer)) > (throw 'found t))) > nil))) The idea is that at least _two_ interesting buffers are needed to enable `kill-this-buffer'. found-1 is initially nil and set to t when the first interesting buffer is found. The throw to found-2 occurs when the second interesting buffer has been found. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 06 14:38:22 2011 Received: (at 8184) by debbugs.gnu.org; 6 Mar 2011 19:38:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PwJmY-00015G-3N for submit@debbugs.gnu.org; Sun, 06 Mar 2011 14:38:22 -0500 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PwJmW-000154-BD for 8184@debbugs.gnu.org; Sun, 06 Mar 2011 14:38:20 -0500 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p26JcDGw007560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 6 Mar 2011 19:38:14 GMT Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p26JcCUi010530; Sun, 6 Mar 2011 19:38:12 GMT Received: from abhmt007.oracle.com by acsmt354.oracle.com with ESMTP id 1112909411299440191; Sun, 06 Mar 2011 11:36:31 -0800 Received: from dradamslap1 (/10.159.53.25) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 06 Mar 2011 11:36:31 -0800 From: "Drew Adams" To: "'martin rudalics'" References: <4D73D021.8070105@gmx.at> <4D73DCF0.9080604@gmx.at> Subject: RE: bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer' Date: Sun, 6 Mar 2011 11:36:30 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4D73DCF0.9080604@gmx.at> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 thread-index: AcvcMqVNCfS1iHgjTp+afG4f9nOH6AAAFpWQ X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4D73E2A5.0011,ss=1,fgs=0 X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 8184 Cc: 'Eli Zaretskii' , 8184@debbugs.gnu.org, 'tlh' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) > >> (defun kill-this-buffer-enabled-p () > >> (or (not (menu-bar-non-minibuffer-window-p)) > >> (let (found-1) > >> (catch 'found-2 > >> (dolist (buffer (buffer-list)) > >> (unless (string-match-p "^ " (buffer-name buffer)) > >> (if (not found-1) > >> (setq found-1 t) > >> (throw 'found-2 t)))))))) > > The idea is that at least _two_ interesting buffers are > needed to enable `kill-this-buffer'. Right, that's the existing behavior. But why? Why shouldn't menu item `Close' be available to kill the current buffer even if it is the only "interesting" buffer? I imagine the answer behind this design is that we never want to show an uninteresting buffer - or that we never want to replace an interesting one by an uninteresting one in the same window. I don't think that's a good idea. (I mistakenly thought you were trying to improve this at the same time as improving the performance - see below.) `Close' is about killing the buffer. It is not just or even primarily about replacing it with another in the window. I'd say we should let the user kill the buffer even if it is the only "interesting" one. A user will wonder (bad UI) why `Close' isn't available in this case, and even if s?he correctly guesses why s?he won't necessarily care that there is no other non-interesting buffer to display. We should not prevent the user from killing the buffer (via the menu). Just one opinion. Another alternative could be to let `Close' be enabled in this case but also close (delete) the window if the buffer killed was the last "interesting" one. (But my preference would be to just kill the buffer, even in this case.) > found-1 is initially nil and set to t when the > first interesting buffer is found. The throw to found-2 > occurs when the second interesting buffer has been found. Yes, your indentation threw me off (probably from pasting TAB chars). It looked like you were throwing in any case (outside the `if'). I thus thought you were also proposing the behavior improvement of letting the user kill the last "interesting" buffer. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 06 14:53:40 2011 Received: (at 8184) by debbugs.gnu.org; 6 Mar 2011 19:53:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PwK1L-0001Q7-Vj for submit@debbugs.gnu.org; Sun, 06 Mar 2011 14:53:40 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PwK1J-0001Pw-IG for 8184@debbugs.gnu.org; Sun, 06 Mar 2011 14:53:38 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAK50c03O+Lo//2dsb2JhbACmYHW9b4ViBIUcj3E X-IronPort-AV: E=Sophos;i="4.62,272,1297054800"; d="scan'208";a="94713218" Received: from 206-248-186-63.dsl.teksavvy.com (HELO ceviche.home) ([206.248.186.63]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 06 Mar 2011 14:53:32 -0500 Received: by ceviche.home (Postfix, from userid 20848) id B3F83660D6; Sun, 6 Mar 2011 14:53:31 -0500 (EST) From: Stefan Monnier To: martin rudalics Subject: Re: bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer' Message-ID: References: <4D73D021.8070105@gmx.at> Date: Sun, 06 Mar 2011 14:53:31 -0500 In-Reply-To: <4D73D021.8070105@gmx.at> (martin rudalics's message of "Sun, 06 Mar 2011 19:19:13 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 8184 Cc: Eli Zaretskii , 8184@debbugs.gnu.org, tlh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) >> ??? This function is bound to the "Close" item in the "File" menu, so >> it is definitely related to the menu bar. > Am I right that the time for executing `kill-this-buffer-enabled-p' is > currently always proportional to the number of live buffers? In that > case I'd rewrite his function as > (defun kill-this-buffer-enabled-p () > (or (not (menu-bar-non-minibuffer-window-p)) > (let (found-1) > (catch 'found-2 > (dolist (buffer (buffer-list)) > (unless (string-match-p "^ " (buffer-name buffer)) > (if (not found-1) > (setq found-1 t) > (throw 'found-2 t)))))))) Probably a good change, yes. It'd also be good to add a comment explaining why we do this loop searching for some non-temp buffer. IIUC this function is used to check whether kill-this-buffer can do its job, and if (menu-bar-non-minibuffer-window-p) is nil, then we use abort-recursive-edit, so we need to check if abort-recursive-edit can be used, which seems related to minibuffer-depth rather than to non-temp buffers. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 07 03:07:59 2011 Received: (at 8184) by debbugs.gnu.org; 7 Mar 2011 08:07:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PwVTy-0004Nj-Hb for submit@debbugs.gnu.org; Mon, 07 Mar 2011 03:07:59 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PwVTw-0004NN-D8 for 8184@debbugs.gnu.org; Mon, 07 Mar 2011 03:07:57 -0500 Received: (qmail invoked by alias); 07 Mar 2011 08:07:50 -0000 Received: from 62-47-40-198.adsl.highway.telekom.at (EHLO [62.47.40.198]) [62.47.40.198] by mail.gmx.net (mp031) with SMTP; 07 Mar 2011 09:07:50 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/kfcw7rcbkeUQ51i8zSGqtulzwAeSkGubXAJsl9G ENUSGIg/I+FSb3 Message-ID: <4D749254.4090009@gmx.at> Date: Mon, 07 Mar 2011 09:07:48 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Drew Adams Subject: Re: bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer' References: <4D73D021.8070105@gmx.at> <4D73DCF0.9080604@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 8184 Cc: 'Eli Zaretskii' , 8184@debbugs.gnu.org, 'tlh' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) >> The idea is that at least _two_ interesting buffers are >> needed to enable `kill-this-buffer'. > > Right, that's the existing behavior. > > But why? Why shouldn't menu item `Close' be available to kill the current > buffer even if it is the only "interesting" buffer? I imagine the answer behind > this design is that we never want to show an uninteresting buffer - or that we > never want to replace an interesting one by an uninteresting one in the same > window. We might end up showing the *code-conversion-work* or *Echo Area* buffer in a normal window which doesn't strike me as a good idea in response to invoking a menu item called "Close". > I don't think that's a good idea. (I mistakenly thought you were trying to > improve this at the same time as improving the performance - see below.) > > `Close' is about killing the buffer. It is not just or even primarily about > replacing it with another in the window. I'd say we should let the user kill > the buffer even if it is the only "interesting" one. A user will wonder (bad > UI) why `Close' isn't available in this case, and even if s?he correctly guesses > why s?he won't necessarily care that there is no other non-interesting buffer to > display. We should not prevent the user from killing the buffer (via the menu). I only tried to emulate the current behavior. Usually, at least the *scratch* or *Messages* buffer should be around so I suppose that in practice it's always possible to kill the current buffer. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 07 03:08:08 2011 Received: (at 8184) by debbugs.gnu.org; 7 Mar 2011 08:08:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PwVU7-0004OZ-RS for submit@debbugs.gnu.org; Mon, 07 Mar 2011 03:08:08 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PwVU6-0004Nt-DT for 8184@debbugs.gnu.org; Mon, 07 Mar 2011 03:08:06 -0500 Received: (qmail invoked by alias); 07 Mar 2011 08:07:59 -0000 Received: from 62-47-40-198.adsl.highway.telekom.at (EHLO [62.47.40.198]) [62.47.40.198] by mail.gmx.net (mp039) with SMTP; 07 Mar 2011 09:07:59 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19QXls7CmlQ/oY0Kd6rp1iHknQMjoTS+9SMDb9zYX 5z18W/GJqkkBs1 Message-ID: <4D74925E.7040509@gmx.at> Date: Mon, 07 Mar 2011 09:07:58 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer' References: <4D73D021.8070105@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 8184 Cc: Eli Zaretskii , 8184@debbugs.gnu.org, tlh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) > It'd also be good to add a comment > explaining why we do this loop searching for some non-temp buffer. Indeed, calling (other-buffer nil t) should be sufficient. > IIUC this function is used to check whether kill-this-buffer can do its > job, and if (menu-bar-non-minibuffer-window-p) is nil, then we use > abort-recursive-edit, so we need to check if abort-recursive-edit can be > used, which seems related to minibuffer-depth rather than to > non-temp buffers. To `minibuffer-depth' and `active-minibuffer-window', I suppose. Still wondering whether tth is able to trigger his behavior from the menu bar entry. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 07 10:12:27 2011 Received: (at 8184) by debbugs.gnu.org; 7 Mar 2011 15:12:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pwc6l-0006X0-Hh for submit@debbugs.gnu.org; Mon, 07 Mar 2011 10:12:27 -0500 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pwc6j-0006Wn-PW for 8184@debbugs.gnu.org; Mon, 07 Mar 2011 10:12:26 -0500 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p27FCIAd032370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Mar 2011 15:12:19 GMT Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p27FCBWi006689; Mon, 7 Mar 2011 15:12:16 GMT Received: from abhmt013.oracle.com by acsmt353.oracle.com with ESMTP id 1064232761299510643; Mon, 07 Mar 2011 07:10:43 -0800 Received: from dradamslap1 (/10.159.55.82) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 07 Mar 2011 07:10:00 -0800 From: "Drew Adams" To: "'martin rudalics'" References: <4D73D021.8070105@gmx.at> <4D73DCF0.9080604@gmx.at> <4D749254.4090009@gmx.at> Subject: RE: bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer' Date: Mon, 7 Mar 2011 07:10:03 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4D749254.4090009@gmx.at> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 thread-index: AcvcnsK4IIRoGIWiTP+X2fWhsZSeQgAOr4Yw X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4D74F5D2.004A,ss=1,fgs=0 X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 8184 Cc: 'Eli Zaretskii' , 8184@debbugs.gnu.org, 'tlh' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) > I only tried to emulate the current behavior. Usually, at least the > *scratch* or *Messages* buffer should be around so I suppose that in > practice it's always possible to kill the current buffer. Yes, I think so. And that behavior (always kill) will be less confusing to users, IMO. Keep it simple. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 27 08:22:34 2011 Received: (at 8184) by debbugs.gnu.org; 27 Mar 2011 12:22:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q3ozJ-00026p-6I for submit@debbugs.gnu.org; Sun, 27 Mar 2011 08:22:33 -0400 Received: from smtprelay-b21.telenor.se ([195.54.99.212]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q3ozG-00026c-Jd for 8184@debbugs.gnu.org; Sun, 27 Mar 2011 08:22:31 -0400 Received: from iph2.telenor.se (iph2.telenor.se [195.54.127.133]) by smtprelay-b21.telenor.se (Postfix) with ESMTP id 867924526A for <8184@debbugs.gnu.org>; Sun, 27 Mar 2011 14:22:24 +0200 (CEST) X-SMTPAUTH-B2: [bocjoh] X-SENDER-IP: [85.229.2.199] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As49AEUrj01V5QLHPGdsb2JhbACJDJxUCwEBAQE3MohruAGFaQQ X-IronPort-AV: E=Sophos;i="4.63,251,1299452400"; d="scan'208";a="384939820" Received: from c-c702e555.04-211-6c6b701.cust.bredbandsbolaget.se (HELO muon.localdomain) ([85.229.2.199]) by iph2.telenor.se with ESMTP; 27 Mar 2011 14:22:24 +0200 Received: by muon.localdomain (Postfix, from userid 1000) id 256C84843A4; Sun, 27 Mar 2011 14:22:22 +0200 (CEST) From: =?utf-8?Q?Johan_Bockg=C3=A5rd?= To: martin rudalics Subject: Re: bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer' References: <4D73D021.8070105@gmx.at> <4D73DCF0.9080604@gmx.at> <4D749254.4090009@gmx.at> Mail-Copies-To: never Date: Sun, 27 Mar 2011 14:22:21 +0200 In-Reply-To: <4D749254.4090009@gmx.at> (martin rudalics's message of "Mon, 07 Mar 2011 09:07:48 +0100") Message-ID: <87sju8zrb6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 8184 Cc: 8184@debbugs.gnu.org, 'tlh' , Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) martin rudalics writes: >> But why? Why shouldn't menu item `Close' be available to kill the >> current buffer even if it is the only "interesting" buffer? I imagine >> the answer behind this design is that we never want to show an >> uninteresting buffer - or that we never want to replace an >> interesting one by an uninteresting one in the same window. > > We might end up showing the *code-conversion-work* or *Echo Area* buffer > in a normal window which doesn't strike me as a good idea in response to > invoking a menu item called "Close". That can't happen. The *scratch* buffer is resurrected if all other visible buffers disappear. > I only tried to emulate the current behavior. Usually, at least the > *scratch* or *Messages* buffer should be around so I suppose that in > practice it's always possible to kill the current buffer. It's always possible to kill the current buffer, unless that buffer is *scratch* and no other visible buffers exist. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 29 05:16:05 2011 Received: (at 8184) by debbugs.gnu.org; 29 Mar 2011 09:16:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4V1w-000106-W5 for submit@debbugs.gnu.org; Tue, 29 Mar 2011 05:16:05 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Q4V1s-0000zX-N4 for 8184@debbugs.gnu.org; Tue, 29 Mar 2011 05:16:02 -0400 Received: (qmail invoked by alias); 29 Mar 2011 09:15:53 -0000 Received: from 62-47-60-40.adsl.highway.telekom.at (EHLO [62.47.60.40]) [62.47.60.40] by mail.gmx.net (mp023) with SMTP; 29 Mar 2011 11:15:53 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+LDYwjfDaLrQ+Gp9f5KVAQKAMiwcQfgnStf/h95/ yjQEDsKt/UeRHn Message-ID: <4D9198F8.1060305@gmx.at> Date: Tue, 29 Mar 2011 10:31:52 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: =?ISO-8859-15?Q?Johan_Bockg=E5rd?= Subject: Re: bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer' References: <4D73D021.8070105@gmx.at> <4D73DCF0.9080604@gmx.at> <4D749254.4090009@gmx.at> <87sju8zrb6.fsf@gnu.org> In-Reply-To: <87sju8zrb6.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 8184 Cc: 8184@debbugs.gnu.org, 'tlh' , Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) >> We might end up showing the *code-conversion-work* or *Echo Area* buffer >> in a normal window which doesn't strike me as a good idea in response to >> invoking a menu item called "Close". > > That can't happen. The *scratch* buffer is resurrected if all other > visible buffers disappear. I suppose by "visible buffer" you mean the object mentioned in the comments of `kill-buffer' which is defined as the return value of `other-buffer'. That object is mystically unreliable here. I can easily crash my trunk by repeatedly killing all buffers. But I was never able to provide a presentable scenario so I just went ahead and fixed this in my branch. This said you're right that the scenario I described in the text you cited shouldn't happen because `other-buffer' doesn't return a buffer whose name starts with a space. >> I only tried to emulate the current behavior. Usually, at least the >> *scratch* or *Messages* buffer should be around so I suppose that in >> practice it's always possible to kill the current buffer. > > It's always possible to kill the current buffer, unless that buffer is > *scratch* and no other visible buffers exist. Ideally, yes. martin From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 03 05:13:00 2012 Received: (at 8184-done) by debbugs.gnu.org; 3 Oct 2012 09:13:00 +0000 Received: from localhost ([127.0.0.1]:38601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJL0l-0001nO-Fy for submit@debbugs.gnu.org; Wed, 03 Oct 2012 05:12:59 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:33928) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TJL0j-0001nE-3H for 8184-done@debbugs.gnu.org; Wed, 03 Oct 2012 05:12:57 -0400 Received: (qmail invoked by alias); 03 Oct 2012 09:12:19 -0000 Received: from 62-47-56-28.adsl.highway.telekom.at (EHLO [62.47.56.28]) [62.47.56.28] by mail.gmx.net (mp071) with SMTP; 03 Oct 2012 11:12:19 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+YNfcFLqKYCXVFNG7uSvtIQ1hcMzhHyrdDj3eR+D 5t2jocBgxAN7S0 Message-ID: <506C017B.9030200@gmx.at> Date: Wed, 03 Oct 2012 11:12:27 +0200 From: martin rudalics MIME-Version: 1.0 To: 8184-done@debbugs.gnu.org Subject: Re: bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer' References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 8184-done Cc: tlh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) > Debugger entered--Lisp error: (wrong-type-argument frame-live-p #) > frame-selected-window(#) > menu-bar-non-minibuffer-window-p() > kill-this-buffer() > call-interactively(kill-this-buffer nil nil) Emacs now in this case doesn't do anything when the associated frame is not live or visible. Bug closed. martin From unknown Sat Jun 21 03:01:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 31 Oct 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator