* Re: master 902f31d 1/2: New user option mpc-cover-image-re [not found] ` <20210929092816.41BAC207F5@vcs0.savannah.gnu.org> @ 2021-09-29 12:50 ` Stefan Monnier 2021-09-29 13:11 ` Stefan Kangas 0 siblings, 1 reply; 4+ messages in thread From: Stefan Monnier @ 2021-09-29 12:50 UTC (permalink / raw) To: emacs-devel; +Cc: Stefan Kangas Hi Stefan, Nice to see someone contributing to `mpc.el`. Any chance you can be tempted to implement support for the `idle` command? Stefan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master 902f31d 1/2: New user option mpc-cover-image-re 2021-09-29 12:50 ` master 902f31d 1/2: New user option mpc-cover-image-re Stefan Monnier @ 2021-09-29 13:11 ` Stefan Kangas 2021-09-29 16:37 ` Stefan Monnier 0 siblings, 1 reply; 4+ messages in thread From: Stefan Kangas @ 2021-09-29 13:11 UTC (permalink / raw) To: Stefan Monnier, emacs-devel Stefan Monnier <monnier@iro.umontreal.ca> writes: > Hi Stefan, > > Nice to see someone contributing to `mpc.el`. > Any chance you can be tempted to implement support for the > `idle` command? I have various small various fixes and improvements in the cooker, but implementing "idle" does sound like a fair bit more work. Let me think about it. IIUC, it would basically make mpc.el less synchronous? Meanwhile, maybe you can help me with this. I have implemented the below command, but when I run it outside of the "*Songs*" buffer, it doesn't work. I also can't add it to the end of `mpc' (to make point start near the currently playing song). I'm probably missing something very obvious... Also, once I get this working, any objections to the keybinding "o" for this? (This is the same key as in ncmpcpp.) (This is an important feature for me, as I typically have very long playlists that doubles as notes of what I've been listening to recently.) diff --git a/lisp/mpc.el b/lisp/mpc.el index ad32ce8d33..06b80b1423 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -2669,6 +2669,16 @@ mpc-play-at-point (mpc-select event) (mpc-play)) +(defun mpc-jump-to-playing () + "Move point to the currently playing song in the \"*Songs*\" buffer." + (interactive) + (let ((buf (mpc-proc-buffer (mpc-proc) 'songs))) + (when (buffer-live-p buf) + (with-current-buffer buf + (when (and overlay-arrow-position + (eq (marker-buffer overlay-arrow-position) buf)) + (goto-char (marker-position overlay-arrow-position))))))) + ;; (defun mpc-play-tagval () ;; "Play all the songs of the tag at point." ;; (interactive) ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: master 902f31d 1/2: New user option mpc-cover-image-re 2021-09-29 13:11 ` Stefan Kangas @ 2021-09-29 16:37 ` Stefan Monnier 2021-09-30 3:57 ` Stefan Kangas 0 siblings, 1 reply; 4+ messages in thread From: Stefan Monnier @ 2021-09-29 16:37 UTC (permalink / raw) To: Stefan Kangas; +Cc: emacs-devel > I have various small various fixes and improvements in the cooker, but > implementing "idle" does sound like a fair bit more work. Let me think > about it. IIUC, it would basically make mpc.el less synchronous? Yes, and it would reduce polling as well. > Meanwhile, maybe you can help me with this. I have implemented the > below command, but when I run it outside of the "*Songs*" buffer, it > doesn't work. My "doesn't work" crystal ball tells me that you're moving point in the right buffer but without selecting the appropriate window. > I also can't add it to the end of `mpc' (to make point > start near the currently playing song). I'd guess it's because the overlay-arrow-position is only set later, asynchronously? > (This is an important feature for me, as I typically have very long > playlists that doubles as notes of what I've been listening to > recently.) I'm a big believer in long playlists. Tho I've been playing with the idea of compressing playlists to a list of albums to help with that (since I (almost) always listen to my music a whole album at a time). Stefan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master 902f31d 1/2: New user option mpc-cover-image-re 2021-09-29 16:37 ` Stefan Monnier @ 2021-09-30 3:57 ` Stefan Kangas 0 siblings, 0 replies; 4+ messages in thread From: Stefan Kangas @ 2021-09-30 3:57 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel Stefan Monnier <monnier@iro.umontreal.ca> writes: > My "doesn't work" crystal ball tells me that you're moving point in the > right buffer but without selecting the appropriate window. That was it, thanks. See the result on master. > I'm a big believer in long playlists. Tho I've been playing with the > idea of compressing playlists to a list of albums to help with that > (since I (almost) always listen to my music a whole album at a time). I also (almost) only ever play full albums. I really like your idea, but at the same time I like displaying which track I'm on. I'm sure with the right interface one could make it work though. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-30 3:57 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20210929092814.12368.49075@vcs0.savannah.gnu.org> [not found] ` <20210929092816.41BAC207F5@vcs0.savannah.gnu.org> 2021-09-29 12:50 ` master 902f31d 1/2: New user option mpc-cover-image-re Stefan Monnier 2021-09-29 13:11 ` Stefan Kangas 2021-09-29 16:37 ` Stefan Monnier 2021-09-30 3:57 ` Stefan Kangas
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).