GNU bug report logs -
#73538
[PATCH] Add notifications support to 'mpc'
Previous Next
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
[Message part 1 (text/plain, inline)]
Your bug report
#73538: [PATCH] Add notifications support to 'mpc'
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 73538 <at> debbugs.gnu.org.
--
73538: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73538
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> Here’s an updated patch. Should have all feedback incorporated and
>> now with a NEWS entry.
>
> Thanks, merged into `master` (after which I installed some further tweaks).
Thanks for your time. I’ll have another one for you to look at
soonish.
>>> Question: Why is it interactive?
>> I have a global mpc-minor-mode that adds a key binding for
>> notifications and it must have bled through.
>
> 🙂
>
>> Instead of changing mpc-format I made the customizable variables
>> take a list of specs where the first element to return something
>> interesting is used and a plain string can be added for fallback:
>>
>> (setopt mcp-notifications-body-specs
>> '("%{Artist}" "%{AlbumArtist}" "Unknown Artist"))
>>
>> I added your description of the FORMAT-SPEC to the mpc-format
>> docstring too.
>
> I tweaked the docstring a bit further. Regarding the
> `mpc-notifications-body/title`, the problem I can see with it is that
> the "conditionality" is based on the fact that the overall result is
> an empty string, so you can use something like
>
> (setopt mcp-notifications-body
> '("By %{Artist}" "By %{AlbumArtist}" "Unknown Artist"))
>
> since the first will expand to the non-empty "By ". 🙁
Whoops. I was trying to mimic how other players do it and
overlooked that possibility since I don’t think I’ve ever seen
something like that. I guess there is still the chance to tweak it
in time for 31 in case the complaints come pouring in.
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Tags: patch
This adds support for displaying a notification when the song
changes.
[0001-Add-notifications-support-to-mpc.patch (text/x-patch, attachment)]
This bug report was last modified 271 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.