GNU bug report logs - #10807
24.0.93; dbus NotificationClosed signal should not reset idle-time when reason=1

Previous Next

Package: emacs;

Reported by: Peter Münster <pmrb <at> free.fr>

Date: Mon, 13 Feb 2012 23:00:02 UTC

Severity: wishlist

Found in version 24.0.93

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Peter Münster <pmrb <at> free.fr>
Subject: bug#10807: closed (Re: bug#10807: 24.0.93; dbus NotificationClosed
 signal should not reset idle-time when reason=1)
Date: Fri, 09 Mar 2012 07:44:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#10807: 24.0.93; dbus NotificationClosed signal should not reset idle-time when reason=1

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 10807 <at> debbugs.gnu.org.

-- 
10807: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10807
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Michael Albinus <michael.albinus <at> gmx.de>
To: Peter Münster <pmrb <at> free.fr>
Cc: 10807-done <at> debbugs.gnu.org
Subject: Re: bug#10807: 24.0.93;
	dbus NotificationClosed signal should not reset idle-time when
	reason=1
Date: Wed, 07 Mar 2012 08:54:41 +0100
Peter Münster <pmrb <at> free.fr> writes:

> Hello,

Hi,

> The current idle-time is reset to 0, when a notification window expires.
> IMO it should not, or it should be configurable.

I have modified notifications.el such a way, that the corresponding
signal handler is registered only in case :on-close has passed as
argument to `notifications-notify'. This shall avoid superfluous arrival
of signals, which generates D-Bus events.

Best regards, Michael.
[Message part 3 (message/rfc822, inline)]
From: Peter Münster <pmrb <at> free.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.93;
	dbus NotificationClosed signal should not reset idle-time when
	reason=1
Date: Mon, 13 Feb 2012 23:54:13 +0100
Hello,

The current idle-time is reset to 0, when a notification window expires.
IMO it should not, or it should be configurable.

Discussion on usenet:
http://thread.gmane.org/gmane.emacs.help/83685

Test file:
; save file in /tmp/test.el and run "emacs -Q -l /tmp/test.el"
(require 'notifications)
(notifications-notify :timeout 1000)
(defun my-test ()
  (let ((it (current-idle-time)))
    (message "idle time = %f"
             (if it
                 (+ (cadr it) (/ (nth 2 it) 1000000.0))
               0))))
(run-with-timer 1.5 nil 'my-test)

Result:              idle time = about 0.5
Expected result:     idle time = about 1.5

Use case, where resetting the idle-time to 0 is annoying:

On the one hand, I use `gnus-demon-add-handler' for several actions,
that need to be done repeatedly and only when idle for at least some
minutes.

On the other hand I use 
    (setq appt-disp-window-function 'pm/todo-notify ; popup notify-windows
          appt-display-interval     1)
and
    (org-agenda-to-appt t '((headline "TODO")))
in such a way, that the notification windows are refreshed once per
minute (":timeout 60000"). This is nice, because I don't need to click
on the notification window, I just edit my org-mode-todo-list (switch
an item from TODO to DONE), and the notification window will disappear
automatically in at most 60 seconds.

But when I'm idle, and once per minute a notification windows expires,
the gnus-demon won't activate my handlers, because the idle-time is
always reset, and this can be annoying.

-- 
           Peter



This bug report was last modified 13 years and 138 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.