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 16:47:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Andrew Tropin <andrew@trop.in> writes:

Hi Andrew,

>>> 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?
>>
>> SGTM, thanks.
>
> Does it make sense to introduce edge-case and differentiate between
> strings and symbols?  Removing expand-file-name seems to be backward
> compatible and simple solution, but if there is some good reason for
> symbol/string solution - let me know, I will update the patch.

The D-Bus interface doesn't support file names like
"~/src/emacs/etc/images/icons/hicolor/scalable/apps/emacs.svg". So we
must expand it.

The notify-send command in a shell supports this, but this is another
use case. I guess that the tilde expansion is performed by the shell.

Best regards, Michael.



reply via email to

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