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: Wed, 26 Jul 2023 09:05:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli,

>> >> If it does not, then the current code is already wrong, isn't it?
>> >
>> > No, it could be working by sheer luck.
>>
>> As always with relative file names: the caller is responsible to use a
>> proper default-directory. What else?
>
> Wait a minute.  The icon's file is not processed by Emacs, right?  We
> pass it to an external program/library/service, right?

We pass it to an external service via a D-Bus call.

> If the file is processed by Emacs itself, then Dmitry is right: the
> call to expand-file-name is redundant.  But if the file is processed
> by some software outside Emacs, then it is not redundant, because that
> external software will handle non-absolute file names as relative to
> the cwd of the Emacs process, not to the default-directory of the
> buffer that is current when this code runs.

Processing D-Bus calls means, there is no knowledge by the daemon about
the cwd of the sender.

> My assumption was that it's the latter: we pass the file name to some
> external software.  If that is not the case, then I wonder why
> expand-file-name was there to begin with.

There was always a good reason to do so.

Best regards, Michael.



reply via email to

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