emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] notifications: Don't expand-file-name app-icon.


From: Michael Albinus
Subject: Re: [PATCH] notifications: Don't expand-file-name app-icon.
Date: Tue, 25 Jul 2023 12:43:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

Hi,

>> Icon is not always a file name, but can be just an icon name.
>> https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
>>
>> * lisp/notifications.el (notifications-notify): Don't expand-file-name
>> app-icon.
>> ---
>> Otherwise it not possible to send a notification similiar to:
>> notify-send -i multimedia-player "I am playing music"
>>
>>  lisp/notifications.el | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lisp/notifications.el b/lisp/notifications.el
>> index 984ddbec5e9..c314858d0ae 100644
>> --- a/lisp/notifications.el
>> +++ b/lisp/notifications.el
>> @@ -304,7 +304,7 @@ notifications-notify
>>                                        notifications-application-name)
>>                            :uint32 (or replaces-id 0)
>>                            :string (if app-icon
>> -                                      (expand-file-name app-icon)
>> +                                          app-icon
>
> Thanks, but won't this break the cases where app-icon _is_ a file
> name?

Perhaps we extend the arguments of `notifications-notify'? :app-icon
should be either a string (a file name, which is expanded), or a symbol,
which denotes one of the Standard Action Icons of the Icon Naming Specification.

Your example would read in Lisp then

--8<---------------cut here---------------start------------->8---
(notifications-notify :title "I am playing music" :app-icon 'multimedia-player)
--8<---------------cut here---------------end--------------->8---

WDYT?

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]