From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] emacs-25 bc55a57: * lisp/menu-bar.el (kill-this-buffer): Doc fix. (Bug#26466) Date: Mon, 17 Apr 2017 19:52:39 +0300 Message-ID: <8337d7dlig.fsf@gnu.org> References: <20170412194437.19648.75020@vcs0.savannah.gnu.org> <20170412194438.934FD22EE8@vcs0.savannah.gnu.org> <87shldl1v8.fsf@localhost> <83h91sizcn.fsf@gnu.org> <87vaq79903.fsf@localhost> <83r30vh2k3.fsf@gnu.org> <83bmrwfg43.fsf@gnu.org> <8360i4f756.fsf@gnu.org> <8337d7fv9k.fsf@gnu.org> <83fuh7drut.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1492447935 28142 195.159.176.226 (17 Apr 2017 16:52:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Apr 2017 16:52:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 17 18:52:12 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d09sp-0007DU-Jp for ged-emacs-devel@m.gmane.org; Mon, 17 Apr 2017 18:52:11 +0200 Original-Received: from localhost ([::1]:37830 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d09sv-0001mx-BG for ged-emacs-devel@m.gmane.org; Mon, 17 Apr 2017 12:52:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d09sp-0001me-Me for emacs-devel@gnu.org; Mon, 17 Apr 2017 12:52:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d09sl-0000IS-Qu for emacs-devel@gnu.org; Mon, 17 Apr 2017 12:52:11 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d09sl-0000IO-NR; Mon, 17 Apr 2017 12:52:07 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1791 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d09sl-0006PL-3B; Mon, 17 Apr 2017 12:52:07 -0400 In-reply-to: (message from Stefan Monnier on Mon, 17 Apr 2017 12:05:02 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214077 Archived-At: > From: Stefan Monnier > Date: Mon, 17 Apr 2017 12:05:02 -0400 > > > The request for documenting the subtlety was voiced more than once > > over the years, > > IOW, people have complained about that buggy behavior. They used the function outside its domain, because its domain wasn't documented. > The difference is that we know how to fix the bug rather than document it. No, we _think_ we know how to fix the "bug", and we _think_ the fix won't cause other problems. > > And I see no ugliness here, so if it exists, it must be minor. > > The ugliness is that the kill-this-buffer code uses > menu-bar-non-minibuffer-window-p and > menu-bar-menu-frame-live-and-visible-p both of which consult > menu-updating-frame because they are designed to be used in menu > attributes (as in :enable, :active, ...). There's no ugliness: this function was designed to be used from a menu bar. It took several iterations over several years to get it right with all the various GUI variants we support. It wasn't easy. Since its last change, it worked without any complaints, except about its being inappropriate outside of menus. And yet you still want to make these changes, in the very same place which took us years to get right. What makes you think we are now any wiser than we were back then, and won't be making the same kinds of mistakes we did then? The master branch now has a new kill-current-buffer function that doesn't refer to menus, under a different name. New code should use it in preference to kill-this-buffer. With luck, uses of kill-this-buffer outside of the menus will stop now. And we already know kill-this-buffer is okay when invoked from menus. So I think this particular bike shed has the right color, and we can move on to more serious issues. > It's a plain bug. Minor, but a bug nonetheless. What can I say? I disagree. From my POV, it's a minor issue not worth the risk of breaking users of this function.