From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: [PATCH v3] notifications: Allow to use Icon Naming Specification for app-icon Date: Wed, 26 Jul 2023 19:46:32 +0200 Message-ID: <87a5vi4lc7.fsf@gmx.de> References: <877cqpsnct.fsf@trop.in> <87fs5a6fyj.fsf@trop.in> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6029"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Andrew Tropin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 26 20:55:19 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 1qOjfK-0001LM-HT for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Jul 2023 20:55:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOiaz-0003w1-8r; Wed, 26 Jul 2023 13:46:45 -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 1qOiat-0003vj-AZ for emacs-devel@gnu.org; Wed, 26 Jul 2023 13:46:40 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOiaq-0003vi-Gv for emacs-devel@gnu.org; Wed, 26 Jul 2023 13:46:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1690393593; x=1690998393; i=michael.albinus@gmx.de; bh=NO9mbpyjEc7XnWgSILrhDNVsyLSTFenGrinqRbNS0EQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=a88Yw6zYPawh/7JMtvtOrpPjZxN+JWHsUahmcRA3gwLA/ykI6YT1tKHI1zvHlKf4M9EcAur A3u04/WA2aj3tJ9ZTZCdmuCztP6SWVMuC5WhVLPWmh+wcdtmnf25eW2HnjMJ8ZiRdhfcjk6Qd SBlwLuSkLYFoyRE/n/NB36/tBLEN0UX92bD+ZmBg6bGk3IixDG6w7OnGqsqbhkBRhodssStl1 xOzjcoXC9/oEoAECJoSu2o6abG4+D7LtCI/5aQhkH+abts6Gjhx24dQ0GOJskBDsqxlhXWVae Lva/JT8lWO73i8rEB32S2MokUrVSzWSq1Ee5kJr3EHwyLR47SFsA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.27]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MKbkC-1qALVF1yMG-00KxBj; Wed, 26 Jul 2023 19:46:33 +0200 In-Reply-To: <87fs5a6fyj.fsf@trop.in> (Andrew Tropin's message of "Wed, 26 Jul 2023 15:59:48 +0400") X-Provags-ID: V03:K1:yOcEaFh4Ocu0sDig3gqddK6gvouWrd1oHv5uAZkeo8YhtjBFsUf ZoFqhTrWwJ71Kb3SW30aTdmDdSisnIVbPOvFajfftcdWSfHHeRZMilw8NWmKvlqw7B9PGu5 8ERgyTT2dfvQhCDAlINAL1SCLeY2km17Pmna24wbbvSZ+sFSjlG42WtAJKzcX8Hqnfds0/n 8BGZG94nDldbbAkNbXyKQ== UI-OutboundReport: notjunk:1;M01:P0:F9Qp4dmi3Sg=;7suQb4OCNEaa7rTork0NYzZLc3G u9+9IbnXh+AO6iDI8RMu+epslPf46l3rKGjN4g/7ajdbpDZ76QwKcZ3OQB17WPhKfW+l4c7K5 mvcQ93Ypb/97SwmYzKZJzUtIdcBquSxCLyWQHtP0y85yP6EVlb8/db7jks3yzIRsLfvu1Lap2 7hMvjtoc9/9Rv2jTyHLpPp0C7zdilsOexMqppRC+1XDvzO0dQVvjCioAXTRjDEf/MvBVsOXeB D1Y76azqsvXjpSZFasx9pMU9Bzvjj6Cl7fz3HSRzxF5ZdQyry0ffdjAQjCXnkDnAaGjJl3Drc /SqROHEJGLYJf+WzIgrPPQ+/Vn0sPOZHS+ZKDOt2Xs96OJkdwpQF65oiUIzyN7Qe8xXngoY+j /Dt0SHow67v5rCmBffOKUA54Nsbgp/SuXYO74GFtcbNWgGvO99Q7APruKnz4ega95uzZ3FZw/ sbrTD8y8of4QDILIBZJa9EgjedB+p6+rnR3iwUGTnZQsak365cskeNkAJGLM4o3udRT9pIDW2 TW/4clDobBVDTZdYzrmfTSxP0wUJLMFBwrEV96PJDoDDyQI17C08DhtfHk68jbQ7PBcvBIT1e red4crNCB9698tGGSdSLxW3+uFdE1DtaF41bNonSVLeN9eMJ2cjjp8xcLJe2n7dPT20q5cHco O61ZaWP+go3TovRUglsOyYk3ndNRbN0aPRQe+CqaEzlRpQYsy2+LaTkQPVYmyNRygl0waL/Ej YvAkjCdxs2hAbrmaoxXvaxz15maw+EJNT3nVZsy7WhhowDwosxRnPkfuC/14ySW8YVUVsODh Received-SPF: pass client-ip=212.227.17.20; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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:308126 Archived-At: Andrew Tropin writes: Hi Andrew, Eli did comment already (I agree with him). Just some few further nits. > Icon is not always a file name, but can be just an icon name. > https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec= -latest.html > > diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi > index 4bcc9d5fea6..efa89fa387c 100644 > --- a/doc/lispref/os.texi > +++ b/doc/lispref/os.texi > @@ -2885,6 +2885,9 @@ Desktop Notifications > @item :app-icon @var{icon-file} > The file name of the notification icon. If set to @code{nil}, no icon > is displayed. The default is @code{notifications-application-icon}. > +If value is a string @code{expand-file-name} will be applied, if value > +is a symbol it will be used as is (helpful when using Icon Naming > +Specification). Please add the URL of the spec above, perhaps as @footnote. Furthermore, icon names are not restricted to the ones from the Icon Naming Specification, you can use any icon name which is in the user's current ic= on theme. The specification tells you what shall be offered on any system. Fo= r example, you could say now (notifications-notify :title "The thunderbird icon" :app-icon 'thunderbi= rd) I have installed thunderbird, of course. And I don't need to care that the corresponding icon files are installed at /usr/share/icons/**/apps/thu= nderbird.png > diff --git a/etc/NEWS b/etc/NEWS > index 5883b4df2a7..e1a5cbf0340 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -548,6 +548,13 @@ Similarly to buffer restoration by Desktop, 'recent= f-mode' checking > of the accessibility of remote files can now time out if > 'remote-file-name-access-timeout' is set to a positive number. > > +** Notifications > + > ++++ > +*** Allow to use Icon Naming Specification for app-icon. > +Symbol can be used as a value for :app-icon to provide icon name > +without specifying a file. Say ':app-icon'. I found your initial example funny, maybe add it here: (notifications-notify :title "I am playing music" :app-icon 'multimedia-player) Best regards, Michael.