unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10744: 24.0.93; dbus notification callback error
@ 2012-02-07  1:29 Ken Raeburn
  2012-02-07  9:09 ` Michael Albinus
  0 siblings, 1 reply; 3+ messages in thread
From: Ken Raeburn @ 2012-02-07  1:29 UTC (permalink / raw)
  To: 10744

Using a gnome desktop environment, start emacs -Q.

M-x set-variable RET debug-on-error RET t RET
M-x load-library RET notifications RET

Have some other application send a notification (specifically, using
service org.freedesktop.Notifications), which pops up on the desktop.
(In my test case, it's another emacs process where I call
dbus-call-method in some code I wrote before finding
notifications.el. :-)

Wait for the notification to time out and go away.

An error pops up indicating that notifications-on-closed-signal is
passed one argument instead of the expected two:

Debugger entered--Lisp error: (wrong-number-of-arguments #[(id reason) ...] 1)
  notifications-on-closed-signal(673)
  apply(notifications-on-closed-signal 673)
  byte-code(... [result event dbus-message-type-error dbus-message-type-method-call nil dbus-check-event 2 signal dbus-error 9 apply 8 err ...
  dbus-handle-event((dbus-event :session 4 1352 ":1.12" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "NotificationClosed" notifications-on-closed-signal 673))
  call-interactively(dbus-handle-event nil [(dbus-event :session 4 1352 ":1.12" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "NotificationClosed" notifications-on-closed-signal 673)])

It's not necessary to run any extra code relating to notifications;
simply loading the library code causes registration of the handler for
desktop notifications.


In GNU Emacs 24.0.93.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2012-02-03 on just-testing.permabit.com
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
Configured using:
 `configure '--prefix=/permabit/user/raeburn/I64/install/emacs-24.0.93'
 '--with-x-toolkit=lucid''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> C-f C-f C-a C-e 
C-p C-n C-n C-f C-f M-x i e l m <return> M-x C-g ( 
s e t C-g M-x v <backspace> s a t <backspace> <backspace> 
e t - v a r <tab> <return> d e b u g - o n - e r r 
o r <return> t <return> <backspace> <backspace> <backspace> 
l o a d - l i b r a r y SPC " n o t i f i c a t i o 
n s " ) <return> C-x 5 2 <switch-frame> C-h f n o t 
i f i c a t i o n s - n o t <tab> <return> C-x o C-n 
C-u C-f <return> C-x 1 <help-echo> <help-echo> <down-mouse-1> 
<mouse-movement> <mouse-1> C-x k <return> C-x 5 0 <down-mouse-1> 
<mouse-1> C-x m M-> <return> C-x o M-< M-> M-w C-x 
o C-y M-< C-u C-n C-n C-n C-u C-u C-b C-u C-f C-u C-f 
C-b C-SPC C-M-f C-M-f C-n C-n C-n C-p C-u C-f C-f C-f 
C-f C-f C-w . . . C-u C-u C-b C-u C-b C-u C-f C-M-SPC 
C-g C-b C-b C-f C-f C-M-f C-b C-SPC C-p C-p C-u C-u 
C-f C-u C-u C-b C-u C-u C-b C-u C-u C-b C-u C-b C-u 
C-f C-u C-f C-b C-w C-a C-n C-n C-n C-u C-u C-k C-x 
o C-x C-g q C-p C-p C-x k <return> M-x s e n d b u 
<tab> <backspace> <backspace> - b <tab> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
C-g M-x r e p o r t - <tab> <return>

Recent messages:
call-interactively: End of buffer [2 times]
Quit [2 times]
Loading notifications...done
Type C-x 1 to delete the help window, C-M-v to scroll help.
uncompressing notifications.el.gz...done
Entering debugger...
Mark set [7 times]
Quit
Mark set
Back to top level.
Quit

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug gnus-util message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
debug jka-compr find-func help-mode view notifications dbus xml cus-edit
easymenu wid-edit cus-start cus-load help-fns ielm pp comint regexp-opt
ring time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win
x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting font-render-setting
x-toolkit x multi-tty emacs)





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#10744: 24.0.93; dbus notification callback error
  2012-02-07  1:29 bug#10744: 24.0.93; dbus notification callback error Ken Raeburn
@ 2012-02-07  9:09 ` Michael Albinus
  2012-02-11  0:02   ` Ken Raeburn
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Albinus @ 2012-02-07  9:09 UTC (permalink / raw)
  To: Ken Raeburn; +Cc: 10744

Ken Raeburn <raeburn@permabit.com> writes:

> An error pops up indicating that notifications-on-closed-signal is
> passed one argument instead of the expected two:
>
> Debugger entered--Lisp error: (wrong-number-of-arguments #[(id reason) ...] 1)
>   notifications-on-closed-signal(673)

According to the spec, the NotificationClosed signal shall send 2
arguments, the id and the reason. See
<http://www.galago-project.org/specs/notification/0.9/x408.html#signal-notification-closed>.

That's what `notifications-on-closed-signal' expects. And doesn't get.

>   dbus-handle-event((dbus-event :session 4 1352 ":1.12" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "NotificationClosed" notifications-on-closed-signal 673))

The daemon sends only one argument, the id (673). I could reproduce the
problem on an old RHEL system with:

notification-daemon.x86_64               0.3.5-9.el5 installed

Reading the NEWS entry of the notification-daemon sources, I've found

version 0.4.0 (20-November-2008):
        * Send the reason code along with the NotificationClosed signal in order
          to indicate why the notification was closed. (Bug #137)

So it is clearly a daemon error, which is corrected meanwhile. I've
submitted a fix to the trunk, making the reason argument in
`notifications-on-closed-signal' optional (assuming `undefined' as
default). Could you, please, check?

Best regards, Michael.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#10744: 24.0.93; dbus notification callback error
  2012-02-07  9:09 ` Michael Albinus
@ 2012-02-11  0:02   ` Ken Raeburn
  0 siblings, 0 replies; 3+ messages in thread
From: Ken Raeburn @ 2012-02-11  0:02 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 10744@debbugs.gnu.org

Sorry for the delay.  I can confirm the patch works for me.  (And my desktop is Debian Lenny w/notification-daemon 0.3.7.)

Ken

Sent from my iPhone

On Feb 7, 2012, at 4:09, Michael Albinus <michael.albinus@gmx.de> wrote:

> Ken Raeburn <raeburn@permabit.com> writes:
> 
>> An error pops up indicating that notifications-on-closed-signal is
>> passed one argument instead of the expected two:
>> 
>> Debugger entered--Lisp error: (wrong-number-of-arguments #[(id reason) ...] 1)
>>  notifications-on-closed-signal(673)
> 
> According to the spec, the NotificationClosed signal shall send 2
> arguments, the id and the reason. See
> <http://www.galago-project.org/specs/notification/0.9/x408.html#signal-notification-closed>.
> 
> That's what `notifications-on-closed-signal' expects. And doesn't get.
> 
>>  dbus-handle-event((dbus-event :session 4 1352 ":1.12" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "NotificationClosed" notifications-on-closed-signal 673))
> 
> The daemon sends only one argument, the id (673). I could reproduce the
> problem on an old RHEL system with:
> 
> notification-daemon.x86_64               0.3.5-9.el5 installed
> 
> Reading the NEWS entry of the notification-daemon sources, I've found
> 
> version 0.4.0 (20-November-2008):
>        * Send the reason code along with the NotificationClosed signal in order
>          to indicate why the notification was closed. (Bug #137)
> 
> So it is clearly a daemon error, which is corrected meanwhile. I've
> submitted a fix to the trunk, making the reason argument in
> `notifications-on-closed-signal' optional (assuming `undefined' as
> default). Could you, please, check?
> 
> Best regards, Michael.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-11  0:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07  1:29 bug#10744: 24.0.93; dbus notification callback error Ken Raeburn
2012-02-07  9:09 ` Michael Albinus
2012-02-11  0:02   ` Ken Raeburn

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).