all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: john muhl <jm@pub.pink>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 73538-done@debbugs.gnu.org
Subject: bug#73538: [PATCH] Add notifications support to 'mpc'
Date: Thu, 17 Oct 2024 19:26:03 -0500	[thread overview]
Message-ID: <87froup884.fsf@pub.pink> (raw)
In-Reply-To: <jwvv7xqn0qg.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 17 Oct 2024 12:43:45 -0400")

Stefan Monnier <monnier@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.





      reply	other threads:[~2024-10-18  0:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-28 22:48 bug#73538: [PATCH] Add notifications support to 'mpc' john muhl
2024-10-03 14:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-04  3:55   ` john muhl
2024-10-04 13:42     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-12  1:39   ` john muhl
2024-10-12 14:43     ` john muhl
2024-10-13 12:11     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-14  4:04       ` john muhl
2024-10-14 10:53         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-14 14:56           ` John Wiegley
2024-10-15 10:48             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-14 13:08       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-17 16:43     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-18  0:26       ` john muhl [this message]

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=87froup884.fsf@pub.pink \
    --to=jm@pub.pink \
    --cc=73538-done@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.