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: BUFFER_SWITCH_EVENT Date: Tue, 25 Sep 2018 20:28:44 +0300 Message-ID: <83tvmd8p0z.fsf@gnu.org> References: <87sh1y535s.fsf@web.de> <8336tyc1ou.fsf@gnu.org> <87mus64wwr.fsf@web.de> <831s9hafl7.fsf@gnu.org> <83wor98t2o.fsf@gnu.org> <83va6t8rts.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1537896450 20491 195.159.176.226 (25 Sep 2018 17:27:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Sep 2018 17:27:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 25 19:27:26 2018 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 1g4r7N-0005CF-If for ged-emacs-devel@m.gmane.org; Tue, 25 Sep 2018 19:27:25 +0200 Original-Received: from localhost ([::1]:54491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4r9T-0000oi-N7 for ged-emacs-devel@m.gmane.org; Tue, 25 Sep 2018 13:29:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4r8q-0000oJ-PO for emacs-devel@gnu.org; Tue, 25 Sep 2018 13:28:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4r8n-00089j-GB for emacs-devel@gnu.org; Tue, 25 Sep 2018 13:28:56 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4r8m-00088q-Di; Tue, 25 Sep 2018 13:28:53 -0400 Original-Received: from [176.228.60.248] (port=1627 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g4r8l-00042Y-La; Tue, 25 Sep 2018 13:28:52 -0400 In-reply-to: (message from Stefan Monnier on Tue, 25 Sep 2018 13:19:34 -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:230067 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Tue, 25 Sep 2018 13:19:34 -0400 > > >> We already look them up presumably in the right place. I don't > >> understand why we'd need to look them up again after running > >> a process filter. > > Because a filter could have switched buffers, I presume. > > I don't follow: > > 1- we enter read-key-sequence > 2- we read the set of keymaps > 3- some process filter is executed, changing the current buffer > 4- the set of keymaps that we need to use is still the same we computed > at 2 and the keymaps themselves are also still the same > > What am I missing? You are asking the wrong guy, but I will try anyway: since the buffer changed, we need to replay the key sequence using the keymaps local to that buffer, not the ones we computed at 2. Right?