From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Severe lossage from unread-command-events Date: Wed, 05 Aug 2015 17:46:50 +0200 Message-ID: <87egjh4u1h.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1438789653 4019 80.91.229.3 (5 Aug 2015 15:47:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Aug 2015 15:47:33 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 05 17:47:33 2015 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 1ZN0uh-0001RW-FV for ged-emacs-devel@m.gmane.org; Wed, 05 Aug 2015 17:47:31 +0200 Original-Received: from localhost ([::1]:40984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN0ug-0001Rs-Rm for ged-emacs-devel@m.gmane.org; Wed, 05 Aug 2015 11:47:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN0ub-0001Nv-2Q for emacs-devel@gnu.org; Wed, 05 Aug 2015 11:47:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZN0uW-00076j-Ml for emacs-devel@gnu.org; Wed, 05 Aug 2015 11:47:25 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN0uW-00076d-Ip for emacs-devel@gnu.org; Wed, 05 Aug 2015 11:47:20 -0400 Original-Received: from localhost ([127.0.0.1]:42521 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1ZN0uV-0002fD-TM for emacs-devel@gnu.org; Wed, 05 Aug 2015 11:47:20 -0400 Original-Received: by lola (Postfix, from userid 1000) id 2582ADF410; Wed, 5 Aug 2015 17:46:50 +0200 (CEST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:188450 Archived-At: --=-=-= Content-Type: text/plain Hi, run the included test file using emacs -Q -l timer-test.el and then open the generated dribble file /tmp/mydrib. On my computer, it looks something like 0000000000000000001111111111111111111222222222222222222223333333333333333444444444444444444555555555555555556666666666666666667777777777777777778888888888888888899999999999999999 which means that of 4000 events having an effect in the scratch buffer, about 5% (a non-deterministic amount) are actually recorded in the dribble file. In particular, it looks like only the first of several events placed into unread-command-events at one point of time will ever see the dribble file. While I am only moderately interested in actually generating a useful dribble file, the same holds for macro recording. And I have an actual application which is severely impacted here. Note that _all_ of the events (usually) are actually processed as input in the *scratch* buffer. It is only the recording of them which falls really, really flat on its face. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=timer-test.el Content-Transfer-Encoding: quoted-printable ;;-*- lexical-binding: t -*- (require 'timer) (open-dribble-file "/tmp/mydrib") (let* ((n 0) (timer (run-with-timer nil 0.0001 (lambda () (setq unread-command-events (nconc unread-command-events (mapcar (lambda (c) (cons t c)) (format "%03d " n))) n (1+ n)) (when (> n 999) (cancel-timer timer) (open-dribble-file nil)))))) (switch-to-buffer "*scratch*")) --=-=-= Content-Type: text/plain -- David Kastrup --=-=-=--