error in unless
- From: Gijs Hillenius <gijs.hillenius@xxxxxxxxx>
- Date: Mon, 31 Mar 2008 09:58:05 +0200
Hello,
I'm a beginner in lisp & programming, which explains why I'm not
seeing the mistake in the following bit of code:
I would like to add this to my .gnus:
(defun audacious-now-playing ()
"Insert the title of the song I'm currently listening to."
(let ((track (shell-command-to-string "audtool --current-song")))
(unless (string-equal "no song playing." track)
(save-excursion
(goto-char (point-min))
(re-search-forward "^--text follows this line--")
(forward-line 0)
(insert "X-Now-Playing: " track)))))
(add-hook 'message-setup-hook 'audacious-now-playing)
The way I adapted this existing bit of code, the unless condition does
not work like intended and I end up with a "X-Now-Playing: No song
playing." x-header in emails.
I would appreciate it if someone could point out what I'm doing
wrong.
Thx
Gijs
--
Homer: Someday you'll thank me for this, son.
Bart: Not bloody likely.
-- "Itchy and Scratchy: The Movie"
.
- Follow-Ups:
- Re: error in unless
- From: Holger Schauer
- Re: error in unless
- From: Ken Tilton
- Re: error in unless
- Prev by Date: Re: Listing slots in CLOS
- Next by Date: Re: error in unless
- Previous by thread: cheap wholesale,nike ,sneaker ,sneakers ( cheap accept ) ( www.top-saler.com )
- Next by thread: Re: error in unless
- Index(es):
Relevant Pages
|