[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] how can I display the current song of bongo player (emacs) in R
From: |
Memnon Anon |
Subject: |
Re: [RP] how can I display the current song of bongo player (emacs) in RP's bar? |
Date: |
Fri, 20 Aug 2010 11:56:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
"CSM 'illovae' Seldon" <address@hidden> writes:
> So i tried to hack bongo.el but my skills in elisp are near 0... so it
> doesn't work at all. Here's what I made.
I am at the same level, but I gave it a try.
> The trick is I decided to use the function bongo-show which is used to
> display in the minibuffer the title of the song while you actually play
> it. When you play foobar, it display /foobar/ in minibuffer so why add
> something to display /foobar/ too in my RP's bar ?
I don't think it is a good idea to modify bongo-show directly.
Next time the code gets updated, you'll have to do it all over again.
AFAIK, thats what hooks are for: Modifying the program at certain well
defined points.
I do not use bongo, but I downloaded it and played around a bit.
This is what I came up with:
--8<---------------cut here---------------start------------->8---
(add-hook 'bongo-player-started-hook
(lambda ()
(let (message command))
(with-bongo-playlist-buffer
(setq my-message (bongo-format-infoset (bongo-player-infoset
player)))
(setq command (concat "ratpoison -c 'echo " message "'"))
(start-process-shell-command "FixMe" nil command))))
--8<---------------cut here---------------end--------------->8---
Just start bongo, eval this in your *scratch* buffer and give it a try.
I only did some quick testing, it can very well not work as you
expected.
But it might give you a point to start from ...
Memnon