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: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: john muhl <jm <at> pub.pink>
Cc: 73538 <at> debbugs.gnu.org
Subject: bug#73538: [PATCH] Add notifications support to 'mpc'
Date: Thu, 17 Oct 2024 12:43:45 -0400
> 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).

>> 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 ".  ๐Ÿ™


        Stefan





This bug report was last modified 269 days ago.

Previous Next


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