From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matthias Meulien Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] notifications: Don't expand-file-name app-icon. Date: Wed, 26 Jul 2023 19:46:14 +0200 Message-ID: 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> <831qgvpzpu.fsf@gnu.org> <87r0ov40gv.fsf@gmx.de> <83tttqorcv.fsf@gnu.org> <87y1j2n91x.fsf@gmail.com> <87h6pq4xxq.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000003b6bc80601676df6" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3680"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , dmitry@gutov.dev, andrew@trop.in, emacs-devel To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 26 20:47:18 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 1qOjXZ-0000hU-Mc for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Jul 2023 20:47:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOiao-0003vT-BX; Wed, 26 Jul 2023 13:46:34 -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 1qOiak-0003vI-Tw for emacs-devel@gnu.org; Wed, 26 Jul 2023 13:46:31 -0400 Original-Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOiai-0003uh-MW; Wed, 26 Jul 2023 13:46:30 -0400 Original-Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-99357737980so1127273866b.2; Wed, 26 Jul 2023 10:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690393586; x=1690998386; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Y9CzuSVCcPPXyN7oH7ZoEOdi/fExddopdjlsccsb/RI=; b=jebBiOqW2TKsAFpWq9esYUxERFk/KNUFalnWbaBfAc0V1EZNPyEnmx4HsnyLXgCIRw nC0eJpu5iA+lIVjck5GY0uGSPE8FjFxIbDRZd6dXHlRXJrqg0IFx/qtF2W72m8LMw3re WdkE+Qz8imCk+UWM2GDDrOw1fa/SwSlzepKQVPNJyOe3I+x38twrbJEJOkFwjQ2FOu53 03WV0UAtcKNa+OToKP2W1aCEAfVFLulWayZrAnmBNOH4zy3viKL57K/sluSsN2bM+bUJ UrggtmeCE7+Rp1NHqxGGc6GYUdCAJCOjD+14oKk4rXX/5DSlgwvIB4+XSKsmHI8teWQ2 xmDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690393586; x=1690998386; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Y9CzuSVCcPPXyN7oH7ZoEOdi/fExddopdjlsccsb/RI=; b=Dwp2pcUWMzhBoJ0w9HV1usYiArgf95qqPvJe5ISE6NRT7TLtJ92fIAe7bFrSDYRqte jkLIdG2t37QxcHNn9C26WFB9M4SnADyi1p2ceqsHdMpnEVeYzZ69wNgxWiAj3beCV65H lWKZPDtT/fDaRct2RU/a2nvioR+YrCnbEENE8vL3v7/3UXfTR+SHyuXHQnw9oEhizC1V M4FfDL+97XhbMLjqKTO7oAqr/HD1Oj6NHReu47r+0oGduVqJEbosLV2o0gLwS1G5TIXg R0FU2+lZ7/fwmOimA1tyeMZ2/NwKl8ve1gJiuKcUefkfaPs/7Uj+HVWyoIdqqy6ihbTJ CUoQ== X-Gm-Message-State: ABy/qLb3r68eh6VMdS/40VyA0QLhKEYnfg3jfmtEOnRldhq7ddEknTtN Wf9JoUFzZJSM4psGG/kmea92zm4gDtcfkl+XUUw= X-Google-Smtp-Source: APBJJlHlcGhCKEVYcEYwUJ29iLj8SaNctMgbn3KYWFZqeb97bIOou5ftn6clLdVFnLBB8UJIoCRgFPA+UQYTZWQKxrs= X-Received: by 2002:a17:906:1bb1:b0:99b:c0e7:629b with SMTP id r17-20020a1709061bb100b0099bc0e7629bmr2333823ejg.43.1690393586132; Wed, 26 Jul 2023 10:46:26 -0700 (PDT) In-Reply-To: <87h6pq4xxq.fsf@gmx.de> Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=orontee@gmail.com; helo=mail-ej1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:308125 Archived-At: --0000000000003b6bc80601676df6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the precision and sorry for confusion. Matthias Le mer. 26 juil. 2023, 15:14, Michael Albinus a =C3=A9crit : > Matthias Meulien writes: > > Hi Matthias, > > >> In that case, we _definitely_ must call expand-file-name, and using > >> relative file names without that is asking for trouble. > > > > Why not try to be compliant with the called API? According to the > > Desktop Notification specification the Notify method support image path > > being file URIs or in a freedesktop.org-compliant icon theme (see > > > https://specifications.freedesktop.org/notification-spec/notification-spe= c-latest.html#icons-and-images > ). > > Sending an image_path instead of app_icon as file:/// URL is just an > implementation detail. The `notifications-notify' API supports > the :image-path argument if users are willing to use it. > > :app-icon can still be either a file name or an icon name. We must > distinguish relative file names from image names; that's what this > thread is about. Alternatively, we could allow only icon names with the > :app-icon argument, but this wouldn't be backward compatible. > > > Being able to specify an icon with its name name according to Icon > > Naming Specification (see > > > https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.ht= ml > ) > > is useful since file path vary depending on the OS! > > This is not true for relative file names. > > Best regards, Michael. > --0000000000003b6bc80601676df6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the precision and sorry for confusion.

=
Matthias

Le mer. 26 juil. 202= 3, 15:14, Michael Albinus <mic= hael.albinus@gmx.de> a =C3=A9crit=C2=A0:
Matthias Meulien <orontee@gmail.com> writes:

Hi Matthias,

>> In that case, we _definitely_ must call expand-file-name, and usin= g
>> relative file names without that is asking for trouble.
>
> Why not try to be compliant with the called API?=C2=A0 According to th= e
> Desktop Notification specification the Notify method support image pat= h
> being file URIs or in a freedesktop.org-compliant icon theme (see
> https://specifications.freedesktop.org/notification-spec= /notification-spec-latest.html#icons-and-images).

Sending an image_path instead of app_icon as file:/// URL is just an
implementation detail. The `notifications-notify' API supports
the :image-path argument if users are willing to use it.

:app-icon can still be either a file name or an icon name. We must
distinguish relative file names from image names; that's what this
thread is about. Alternatively, we could allow only icon names with the
:app-icon argument, but this wouldn't be backward compatible.

> Being able to specify an icon with its name name according to Icon
> Naming Specification (see
> https://s= pecifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html)
> is useful since file path vary depending on the OS!

This is not true for relative file names.

Best regards, Michael.
--0000000000003b6bc80601676df6--