From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [RFC] Getting rid of selected_window Date: Fri, 29 Nov 2013 21:42:35 +0200 Message-ID: <837gbr6llg.fsf@gnu.org> References: <5298804A.5040405@yandex.ru> <83fvqf6xrp.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1385754174 30296 80.91.229.3 (29 Nov 2013 19:42:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Nov 2013 19:42:54 +0000 (UTC) Cc: dmantipov@yandex.ru, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 29 20:42:59 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VmTxr-0007D4-0z for ged-emacs-devel@m.gmane.org; Fri, 29 Nov 2013 20:42:59 +0100 Original-Received: from localhost ([::1]:49158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmTxq-0005XH-FR for ged-emacs-devel@m.gmane.org; Fri, 29 Nov 2013 14:42:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmTxj-0005X9-UB for emacs-devel@gnu.org; Fri, 29 Nov 2013 14:42:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmTxe-0002O1-Jm for emacs-devel@gnu.org; Fri, 29 Nov 2013 14:42:51 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:50014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmTxe-0002Nm-BV for emacs-devel@gnu.org; Fri, 29 Nov 2013 14:42:46 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MX100M00IKVUN00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Fri, 29 Nov 2013 21:42:45 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MX100MOHIR8V200@a-mtaout22.012.net.il>; Fri, 29 Nov 2013 21:42:44 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:165895 Archived-At: > From: Stefan Monnier > Cc: Dmitry Antipov , emacs-devel@gnu.org > Date: Fri, 29 Nov 2013 11:54:13 -0500 > > > What for? I don't think you can get rid of the need to synchronize > > those, because of features like focus redirection and minibuffer-only > > frames. > > AFAIK these don't interact at all. IOW they're unrelated. Sorry, I'm unconvinced. > > So now we have SELECTED_BUFFER and current_buffer, which are > > different in unspecified ways. > > Yes, we now have it, and this patch won't change that, other than giving > a name to the concept of "selected buffer". But that's exactly the problem: that we now give a catchy name to that other thing. As long as it is unnamed, the chances of it being used by uninitiated are slim. But once you name it, it's very easy to become confused between them, and use the wrong one. > > What do you think is the probability that someone will use the wrong > > one of that pair? I think it's 100%. > > That's already a risk and such errors already happen. See above: I don't think so. > This said, I think that instead of selected_buffer, we should use > the name selected_window_buffer, to make things more clear. I suggest buffer_of_selected_window, if we must name this thing. I'd prefer to leave it without a name.