From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: read-event and unexpected buffer changes Date: Thu, 23 May 2013 13:31:59 -0400 Message-ID: References: <87zjwigzg6.fsf@dex.adm.naquadah.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369330332 24094 80.91.229.3 (23 May 2013 17:32:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 May 2013 17:32:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 23 19:32:11 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 1UfZN3-0001di-UN for ged-emacs-devel@m.gmane.org; Thu, 23 May 2013 19:32:10 +0200 Original-Received: from localhost ([::1]:41699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfZN3-0004EY-I6 for ged-emacs-devel@m.gmane.org; Thu, 23 May 2013 13:32:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfZMy-00047G-6W for emacs-devel@gnu.org; Thu, 23 May 2013 13:32:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfZMu-0001f3-UB for emacs-devel@gnu.org; Thu, 23 May 2013 13:32:04 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:27975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfZMu-0001ei-PT for emacs-devel@gnu.org; Thu, 23 May 2013 13:32:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpZoF/2dsb2JhbABEvw4Xc4IeAQEEAVYoCws0EhQYDYhCBsEtjWGDKQOkeoFegxM X-IPAS-Result: Av4EABK/CFFFpZoF/2dsb2JhbABEvw4Xc4IeAQEEAVYoCws0EhQYDYhCBsEtjWGDKQOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="14240180" Original-Received: from 69-165-154-5.dsl.teksavvy.com (HELO pastel.home) ([69.165.154.5]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 May 2013 13:31:55 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id DD33062D65; Thu, 23 May 2013 13:31:59 -0400 (EDT) In-Reply-To: <87zjwigzg6.fsf@dex.adm.naquadah.org> (Julien Danjou's message of "Sun, 28 Apr 2013 22:41:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:159750 Archived-At: > (let ((event (let (unread-command-events) (read-event nil nil 0.1)))) > (when (and event (not (ignore-errors (dbus-check-event event)))) > (setq unread-command-events > (append unread-command-events (list event))))))) Why not use sit-for? > But because of this `read-event' call, the buffer is "recentered to the > top" and I finally see this instead: The only expected side-effect is a redisplay (which could also trigger things like jit-lock). > Hint? Sorry, Stefan