all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Andrew Tropin <andrew@trop.in>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH v3] notifications: Allow to use Icon Naming Specification for app-icon
Date: Wed, 26 Jul 2023 19:46:32 +0200	[thread overview]
Message-ID: <87a5vi4lc7.fsf@gmx.de> (raw)
In-Reply-To: <87fs5a6fyj.fsf@trop.in> (Andrew Tropin's message of "Wed, 26 Jul 2023 15:59:48 +0400")

Andrew Tropin <andrew@trop.in> 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 icon
theme. The specification tells you what shall be offered on any system. For
example, you could say now

  (notifications-notify :title "The thunderbird icon" :app-icon 'thunderbird)

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/thunderbird.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, 'recentf-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.



  parent reply	other threads:[~2023-07-26 17:46 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24  8:39 [PATCH] notifications: Don't expand-file-name app-icon Andrew Tropin
2023-07-24  8:39 ` [PATCH v2] notifications: Allow to use Icon Naming Specification for app-icon Andrew Tropin
2023-07-24 12:35 ` [PATCH] notifications: Don't expand-file-name app-icon Eli Zaretskii
2023-07-25  4:39   ` Andrew Tropin
2023-07-25 12:01     ` Eli Zaretskii
2023-07-25 12:59       ` Dmitry Gutov
2023-07-25 13:41         ` Andrew Tropin
2023-07-25 14:05           ` Eli Zaretskii
2023-07-25 16:48             ` Dmitry Gutov
2023-07-25 17:40               ` Eli Zaretskii
2023-07-25 19:09                 ` Michael Albinus
2023-07-25 19:18                   ` Eli Zaretskii
2023-07-26  7:05                     ` Michael Albinus
2023-07-26 11:16                       ` Eli Zaretskii
2023-07-26 12:36                         ` Matthias Meulien
2023-07-26 13:14                           ` Michael Albinus
2023-07-26 17:46                             ` Matthias Meulien
2023-07-25 13:48         ` Eli Zaretskii
2023-07-25 10:43   ` Michael Albinus
2023-07-25 12:51     ` Eli Zaretskii
2023-07-25 13:51       ` Andrew Tropin
2023-07-25 14:47         ` Michael Albinus
2023-07-26  6:47           ` Andrew Tropin
2023-07-26  7:13             ` Michael Albinus
2023-07-26 12:05               ` Andrew Tropin
2023-07-26 11:59 ` [PATCH v3] notifications: Allow to use Icon Naming Specification for app-icon Andrew Tropin
2023-07-26 15:23   ` Eli Zaretskii
2023-07-26 17:46   ` Michael Albinus [this message]
2023-07-27  8:38     ` Andrew Tropin
2023-07-27  8:03 ` [PATCH v4] " Andrew Tropin
2023-07-27 11:49   ` Michael Albinus
2023-07-27 12:43     ` Eli Zaretskii
2023-07-27 14:59       ` Michael Albinus
2023-07-28  5:23         ` Andrew Tropin
2023-07-28  7:24           ` Michael Albinus
2023-07-28 11:07             ` Eli Zaretskii
2023-07-28 11:15               ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a5vi4lc7.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=andrew@trop.in \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.