GNU bug report logs - #73538
[PATCH] Add notifications support to 'mpc'

Previous Next

Package: emacs;

Reported by: john muhl <jm <at> pub.pink>

Date: Sat, 28 Sep 2024 22:49:02 UTC

Severity: wishlist

Tags: patch

Done: john muhl <jm <at> pub.pink>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: john muhl <jm <at> pub.pink>
To: 73538 <at> debbugs.gnu.org
Cc: monnier <at> iro.umontreal.ca
Subject: bug#73538: [PATCH] Add notifications support to 'mpc'
Date: Thu, 03 Oct 2024 22:55:54 -0500
Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> writes:

> [ Sorry for the delay.  ]

No sweat. It’s plenty fast by my reckoning.

>> This adds support for displaying a notification when the song changes.
>
> Oh, wow!  A patch for `mpc.el`!  Thanks!

I hope you won’t mind a few more.

> Looks pretty good overall.  I'm not familiar with the `notifications`
> library, OTOH, so I have a few questions, comments, and nitpicks below.

Thanks for looking. I’ll address the rest in a follow up patch but
in the meantime could you elaborate on this point:

>> +  (when-let (((string= "play" (alist-get 'state mpc-status)))
>> +             (title (or (alist-get 'Title mpc-status) "Unknown Title"))
>> +             (body (or (alist-get 'Artist mpc-status)
>> +                       (alist-get 'AlbumArtist mpc-status)
>> +                       "Unknown Artist"))
>
> Comment: I think it would make sense to use `mpc-format` here with
> Custom vars to specify what goes in the title and body.

What do you think the custom vars should look like? Would it be a
FORMAT-SPEC like “%{title} %5{duration}” or something else? How
would it handle the case where you want to try different tags like
“use Artist or AlbumArtist”?

If you don’t have something specific in mind I’ll see what I can
come up but any ideas would be helpful.




This bug report was last modified 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.