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 22:18:05 +0300 Message-ID: <831qgvpzpu.fsf@gnu.org> References: <877cqpsnct.fsf@trop.in> <83fs5dsd0g.fsf@gnu.org> <87zg3kk3jw.fsf@trop.in> <837cqoqjy7.fsf@gnu.org> <379c4b8a-db49-06b3-f313-91e550c8c14c@gutov.dev> <87y1j4jego.fsf@trop.in> <83jzuoozn0.fsf@gnu.org> <5a944e55-1c49-35d0-e554-eaf7ca42df7e@gutov.dev> <837cqnq48p.fsf@gnu.org> <87v8e74xm2.fsf@gmx.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35276"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, andrew@trop.in, emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 25 21:18:01 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 1qONXl-0008sz-2j for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jul 2023 21:18:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qONX8-00066u-VW; Tue, 25 Jul 2023 15:17: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 1qONX6-000653-BN for emacs-devel@gnu.org; Tue, 25 Jul 2023 15:17: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 1qONX5-00015i-Pn; Tue, 25 Jul 2023 15:17: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=uY4cmavynpFaVQG2SDGQOQ0pgMsRIO8hus6n7Ld0wBU=; b=Y1s2JERZ9Tqi eZJxNgaLeI/Pg99yExk1HX+19XoN0AKY3OzJyV+YiQfounfUpjEj2wv7jswcj2vWXzaBHRPEosEHA YmTa/XnJmXDpi5cLni18zEpivfWXgX+rnXI9pLGgd9GjQE8kuzjaawe6dUZadBzHbevLHJ756MI0X I6AsVklS/b/2yKjbUZETDPqaTyXRFnyMR6cy2MI4wgy1w2B3xcVP/nb9/ldqA8akdekT3DYS0uRu5 qHHNMysbPeLC8QHJ4LYoXHDAUnURmjBjpQMIkKkC0Xn9kA32gKp+2D+O0LHYzdepzUCVXeC4/k62s NtLwwewy//CvOsVuIEClHQ==; 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 1qONX5-0004k1-6L; Tue, 25 Jul 2023 15:17:19 -0400 In-Reply-To: <87v8e74xm2.fsf@gmx.de> (message from Michael Albinus on Tue, 25 Jul 2023 21:09:09 +0200) 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:308107 Archived-At: > From: Michael Albinus > Cc: Dmitry Gutov , andrew@trop.in, emacs-devel@gnu.org > Date: Tue, 25 Jul 2023 21:09:09 +0200 > > Eli Zaretskii writes: > > >> 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? 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. 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.