Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problem with (notifications-notify :body "<test>")

19 views
Skip to first unread message

Peter Münster

unread,
Nov 6, 2012, 6:09:11 AM11/6/12
to help-gn...@gnu.org
Hi,

When I call

(notifications-notify :body "<test>")

the notification pop-up is empty, no body-text.

How could I solve this problem please?

TIA,
--
Peter


Tassilo Horn

unread,
Nov 6, 2012, 6:59:34 AM11/6/12
to help-gn...@gnu.org
Peter Münster <pml...@free.fr> writes:

Hi Peter,

> When I call
>
> (notifications-notify :body "<test>")
>
> the notification pop-up is empty, no body-text.

When I do the same, the <test> body is there. Possibly, the difference
is the notification service we're using. I'm on GNOME3.

BTW, I've just noticed that

% notify-send "" "<test>"

in a terminal just says

No summary specified.

and no notification appears. So probably the summary is kind of a
mandatory field, and your notification daemon is strict with that while
the GNOME Shell isn't.

Bye,
Tassilo


Michael Albinus

unread,
Nov 6, 2012, 9:42:13 AM11/6/12
to Peter Münster, help-gn...@gnu.org
Peter Münster <pml...@free.fr> writes:

> Hi,

Hi Peter,

> When I call
>
> (notifications-notify :body "<test>")
>
> the notification pop-up is empty, no body-text.
>
> How could I solve this problem please?

IIRC, for some notification daemons a non-empty title is mandatory. You
might try:

(notifications-notify :title " " :body "test")

Note, that notification daemons might also support markups in the body,
like "<b>bold text</b>" etc. I wouldn't use tags in the body, if not
intended for formatting.

> TIA,

Best regards, Michael.

Peter Münster

unread,
Nov 6, 2012, 2:31:52 PM11/6/12
to help-gn...@gnu.org
On Tue, Nov 06 2012, Tassilo Horn wrote:

> When I do the same, the <test> body is there. Possibly, the difference
> is the notification service we're using. I'm on GNOME3.

Hi,

Indeed. I forgot to test with the command line tool. So this has nothing
to do with emacs. Sorry for the noise.

--
Peter


Peter Münster

unread,
Nov 6, 2012, 2:39:18 PM11/6/12
to help-gn...@gnu.org
On Tue, Nov 06 2012, Michael Albinus wrote:

> (notifications-notify :title " " :body "test")

`(notifications-notify :body "test")' works too.
The problem is the "<".


> Note, that notification daemons might also support markups in the body,
> like "<b>bold text</b>" etc. I wouldn't use tags in the body, if not
> intended for formatting.

Thanks, now I understand the reason for that behaviour. At first glance
it seemed quite strange to me, because even with `:body "bla < bla"'
the body was empty...

--
Peter


Michael Albinus

unread,
Nov 6, 2012, 3:32:48 PM11/6/12
to Peter Münster, help-gn...@gnu.org
Peter Münster <pml...@free.fr> writes:

> Thanks, now I understand the reason for that behaviour. At first glance
> it seemed quite strange to me, because even with `:body "bla < bla"'
> the body was empty...

If you need special characters, you might use html quoting, like
"bla &lt; bla".

(Maybe this should be explained in the docstring).

Best regards, Michael.

Xavier Maillard

unread,
Nov 9, 2012, 5:31:24 PM11/9/12
to Peter Münster, help-gn...@gnu.org

>
>> `(notifications-notify :body "test")' works too.
> The problem is the "<".

Ony my girlfriend's computer, it does work with "<".

Her computer uses XFCE on a slackware GNU/linux system.

Xavier
--
http://www.gnu.org
http://www.april.org
http://www.lolica.org

Michael Albinus

unread,
Nov 18, 2012, 2:55:27 PM11/18/12
to Xavier Maillard, help-gn...@gnu.org, Peter Münster
Xavier Maillard <xav...@maillard.im> writes:

>>> `(notifications-notify :body "test")' works too.
>> The problem is the "<".
>
> Ony my girlfriend's computer, it does work with "<".

It depends on the capabilities of the notifications daemon. If it
doesn't support :body-markup, it is likely to accept "<".

See `notifications-get-capabilities'.

> Xavier

Best regards, Michael.

0 new messages