From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#53432: [PATCH] Avoid losing keyboard input when inotify is too busy [and 1 more messages] Date: Mon, 24 Jan 2022 19:25:00 +0200 Message-ID: <83a6fljbbn.fsf@gnu.org> References: <25067.17249.604070.872185@chiark.greenend.org.uk> <838rv8nua8.fsf@gnu.org> <87r190wqo1.fsf@yahoo.com> <25068.23625.512978.147194@chiark.greenend.org.uk> <87a6fntgfh.fsf@yahoo.com> <25069.23134.887206.241281@chiark.greenend.org.uk> <877daqtnkw.fsf@gmx.de> <25069.40682.688423.883151@chiark.greenend.org.uk> <87lez5ry92.fsf@gmx.de> <83k0epji6b.fsf@gnu.org> <87h79trvt6.fsf@gmx.de> <83fspdjcu3.fsf@gnu.org> <877daprrbn.fsf@gmx.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20374"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 53432@debbugs.gnu.org, ijackson@chiark.greenend.org.uk To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 24 18:56:58 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nC3aL-0005AI-Oy for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Jan 2022 18:56:57 +0100 Original-Received: from localhost ([::1]:48726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nC3aK-0006Mp-OF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Jan 2022 12:56:56 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nC36R-0008V0-MA for bug-gnu-emacs@gnu.org; Mon, 24 Jan 2022 12:26:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nC36Q-0000cg-Fy for bug-gnu-emacs@gnu.org; Mon, 24 Jan 2022 12:26:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nC36Q-0006Bz-DI for bug-gnu-emacs@gnu.org; Mon, 24 Jan 2022 12:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jan 2022 17:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53432 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 53432-submit@debbugs.gnu.org id=B53432.164304514823783 (code B ref 53432); Mon, 24 Jan 2022 17:26:02 +0000 Original-Received: (at 53432) by debbugs.gnu.org; 24 Jan 2022 17:25:48 +0000 Original-Received: from localhost ([127.0.0.1]:45632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nC36C-0006BX-1f for submit@debbugs.gnu.org; Mon, 24 Jan 2022 12:25:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nC368-0006BA-H8 for 53432@debbugs.gnu.org; Mon, 24 Jan 2022 12:25:46 -0500 Original-Received: from [2001:470:142:3::e] (port=42290 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nC361-0000am-Ao; Mon, 24 Jan 2022 12:25:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+uXlwTttGl8oMwZ9VqaUOhckCLj5s6wlJo8kcPYG2Co=; b=KiHnMgb+dXop mf8D+a0HxZlt/5t/Q3dRnNUrYkRJsQPVnwRzoxSy6PKOK98P9cy1uiaCAZL1ZigX5L3x57w6gqvnY gTdhVuj6Osd2tdWScUNTAi/Wz5Ef3T89K1Rf5xkRbqCgJs1vXJauTIafaQ4b4BxHIAr0FOgi/Mqjb pA3gRVtEpqD2NKCXfXPjPp8Wl+b2f7lk4a1R/q5uX+7C2iq7qZ27hfYKFbX7gjszjkREjT2AGZiP/ P7Z6mrzIuziZ31eZvNSCqZnUh9mhpaJW9LRTH0D8NsR2VvEmauc9a6ppKy2clodRbiKrH0wAEriRT dm/0U6o/SPQpTh4Aj9t/rw==; Original-Received: from [87.69.77.57] (port=2829 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nC35e-0002Nu-BG; Mon, 24 Jan 2022 12:25:35 -0500 In-Reply-To: <877daprrbn.fsf@gmx.de> (message from Michael Albinus on Mon, 24 Jan 2022 18:12:12 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:225083 Archived-At: > From: Michael Albinus > Cc: ijackson@chiark.greenend.org.uk, luangruo@yahoo.com, > 53432@debbugs.gnu.org > Date: Mon, 24 Jan 2022 18:12:12 +0100 > > >> "Key strokes first!" :-) > > > > But it isn't only the key strokes, it's also all the events sent to us > > by the window-system. Now tell me why, say, an expose event should be > > more important than a file-notification event, and not the other way > > around? > > After all, Emacs is still a text editor, isn't it? Key strokes and mouse > events are the most important events, I believe. I agree, but since window-system events come from the same source as keys and mouse, we don't have a good way of processing "keys and mouse first", do we? We can only process everything that comes from the read_socket_hook before file notification (which would mean "keys, mouse, and window-system events first"), or the other way around. So the question whether a window-system event is more or less important than a file-notification event still stands, and has no easy solution if we start reading events from two queues instead of just one. > As rule of thumb, I would discriminate all events, which can aarive as > burst, and which are already known to be lost sometimes. D-Bus and file > notification events. If we classify other events into this category - no > problem. That's okay (and note that w32notify already does drop excess events on the floor).