From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Peter_M=C3=BCnster?= Newsgroups: gmane.emacs.help Subject: Re: notifications-notify resets idle-time Date: Sun, 12 Feb 2012 21:37:07 +0100 Message-ID: <87lio7okjw.fsf@micropit.couberia.bzh> References: <874nuy5okw.fsf@micropit.couberia.bzh> <87wr7tr8um.fsf@gmx.de> <87obt5siph.fsf@micropit.couberia.bzh> <87wr7t5ys8.fsf@gmx.de> <87hayxsfbo.fsf@micropit.couberia.bzh> <87sjih2wdo.fsf@gmx.de> <87mx8p5nqa.fsf@micropit.couberia.bzh> <87obt5mgc8.fsf@gmx.de> <87fweh5gw4.fsf@micropit.couberia.bzh> <87fwegv2c1.fsf@gmx.de> <877gzs5mw1.fsf@micropit.couberia.bzh> <87bop4uut0.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1329079052 11462 80.91.229.3 (12 Feb 2012 20:37:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 12 Feb 2012 20:37:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 12 21:37:32 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RwgAt-0000Ic-BE for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Feb 2012 21:37:31 +0100 Original-Received: from localhost ([::1]:48547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwgAr-0007xU-F2 for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Feb 2012 15:37:29 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwgAm-0007xP-LM for help-gnu-emacs@gnu.org; Sun, 12 Feb 2012 15:37:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwgAl-0003J8-4r for help-gnu-emacs@gnu.org; Sun, 12 Feb 2012 15:37:24 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:53289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwgAk-0003J0-RY for help-gnu-emacs@gnu.org; Sun, 12 Feb 2012 15:37:23 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RwgAh-0000Cb-Hy for help-gnu-emacs@gnu.org; Sun, 12 Feb 2012 21:37:19 +0100 Original-Received: from arennes-359-1-260-148.w2-12.abo.wanadoo.fr ([2.12.35.148]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Feb 2012 21:37:19 +0100 Original-Received: from pmlists by arennes-359-1-260-148.w2-12.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Feb 2012 21:37:19 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 56 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: arennes-359-1-260-148.w2-12.abo.wanadoo.fr User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:nIn5DDLRX7Hem2QOnU2urL+oH1A= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83719 Archived-At: --=-=-= Content-Type: text/plain On Sun, Feb 12 2012, Michael Albinus wrote: > Look for the code which is embedded in > > #ifdef HAVE_DBUS > #endif Yes, the code is executed, when the notification windows expires. The timer is reset on line 2849 in keyboard.c: --8<---------------cut here---------------start------------->8--- non_reread: if (!end_time) timer_stop_idle (); RESUME_POLLING; --8<---------------cut here---------------end--------------->8--- I've found that with some `puts("xxx")' here and there. I tried gdb (using ddd) but without success: the execution stops before I can set a breakpoint... > Maybe it's a timing issue. I don't know. But I've prepared now a very simple test file and it would be nice if you could try it please on your system and send me the *Messages* buffer afterwards, just to compare it with mine. You just need to save the attached file in /tmp and then run "emacs -Q -l /tmp/notify.el" The test takes just 2 seconds ;) Thanks for your efforts! -- Peter --=-=-= Content-Type: text/x-emacs-lisp Content-Disposition: inline; filename=notify.el (require 'notifications) (setq dbus-debug t) (notifications-notify :timeout 1000) (defun my-test () (let ((ct (current-idle-time))) (message (format "idle time: %f" (if ct (+ (cadr ct) (/ (nth 2 ct) 1000000.0)) 0))))) (run-with-timer 1.5 nil 'my-test) --=-=-=--