From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] notifications: Don't expand-file-name app-icon. Date: Tue, 25 Jul 2023 15:01:04 +0300 Message-ID: <837cqoqjy7.fsf@gnu.org> References: <877cqpsnct.fsf@trop.in> <83fs5dsd0g.fsf@gnu.org> <87zg3kk3jw.fsf@trop.in> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4157"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Andrew Tropin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 25 14:02:12 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qOGk0-0000n4-1D for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jul 2023 14:02:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOGiE-0002Rn-8r; Tue, 25 Jul 2023 08:00:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOGiC-0002Qy-3C for emacs-devel@gnu.org; Tue, 25 Jul 2023 08:00:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOGiB-0003qN-5X; Tue, 25 Jul 2023 08:00:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=0xy+laWdL9Rd+as370/XR37BEG1nYSEe6siNzKcUTXk=; b=QCjyGmP7Axzc Od2joNvieDo3ThCMexr9wHYf2HdqOgMuO0KeIQjc8ms3W9JWZOZdw8wmipawHSEaBMyoGynI2HB9R uJXyOdEjoQkIU7QgTGaZ1CKgpoUY0dNPE8ibXfG2Q7DveppOTylyeZNCUMBigM6xzrccMLfwPwouG 2CJifF9i7kRIwXr9UoOky4NnLbwiJ17SNuoYLZSMrouPd6ZCTe1UocADQyolppc8w2NNihx712zY/ +PAMIrTgnyHT5U8NlRM9BWJkAPsAUkcSjVz3k0QSHSNnZC8gyNi1YQdcJnjM7Nj+k5OZ/fSIoLSif rxTxcCxH3V0Z4dCn7PKN7A==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOGiA-0002rB-Hl; Tue, 25 Jul 2023 08:00:18 -0400 In-Reply-To: <87zg3kk3jw.fsf@trop.in> (message from Andrew Tropin on Tue, 25 Jul 2023 08:39:31 +0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:308092 Archived-At: > From: Andrew Tropin > 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.