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: Eli Zaretskii
Subject: Re: [PATCH] notifications: Don't expand-file-name app-icon.
Date: Tue, 25 Jul 2023 15:01:04 +0300

> From: Andrew Tropin <andrew@trop.in>
> Cc: emacs-devel@gnu.org
> Date: Tue, 25 Jul 2023 08:39:31 +0400
> 
> >> 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?
> 
> Tried it and it doesn't, at least both 
> 
> :app-icon (expand-file-name "emblem-default.png")
> and
> :app-icon "emblem-default.png"
> 
> work with new implementation, when file in the cwd.

But that's exactly the point: how can we make sure the file is "in
cwd"?

Moreover, in Emacs the concept of cwd makes little sense, because
Emacs behaves as if each buffer had its own cwd.  So when some Emacs
Lisp code runs with some buffer current, that buffer's
default-directory is the effective "cwd" for all file-related
operations.  The actual cwd of the Emacs process doesn't matter, and
AFAIR is never used, except at the very beginning of startup.



reply via email to

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