Re: Reading random bits of clhs
- From: Rupert Swarbrick <rswarbrick@xxxxxxxxx>
- Date: Thu, 15 May 2008 12:04:28 +0100
usenet2.3.CalRobert@xxxxxxxxxxxxxxx (Robert Maas, http://tinyurl.com/uh3t) writes:
From: Rupert Swarbrick <rswarbr...@xxxxxxxxx>
If anyone actually wants this other than me, I'd be happy to
clean it up (a lot). ...
(defun visit-webpage (url)
(run-shell-command
(concatenate 'string
"/opt/firefox/firefox " url)))
Ugly!! You concatenate all the pieces of a shell command, just so
the shell can then parse your string to break it back apart. If the
URL contains any special characters interpreted specially by the
shell, such as backslant or apostrophe, it breaks.
That's a good point. I admit I was being lazy (and using the stumpwm
"program runner" rather than thinking). But I'll change that.
Ouch, you're in love with regular expressions? G[R]EEK CHICKEN SCRATCHES!!!
Why not use something nicely obviously structured?
For example, there was a recent thread about something similar to BNF.
".*/([^/]*[Mm]ast[^/]*\\.html?)"
Ouch again!
Yeah, that's true, but again I was trying to do this quickly and know
regexp syntax already. I admit that the "a href"-finding code is
***-ugly. Could you give me a pointer to the thread you mention? It
sounds interesting.
Incidentally, clearly no-one actually tried the stuff to integrate
with stumpwm, since the nested require doesn't work (unless the
package has already been loaded). Only noticed this when I restarted
the window manager this morning. Sigh.
Rupert
.
- References:
- Reading random bits of clhs
- From: Rupert Swarbrick
- Re: Reading random bits of clhs
- From: Robert Maas, http://tinyurl.com/uh3t
- Reading random bits of clhs
- Prev by Date: Re: generate all possible math expr of one term
- Next by Date: Re: generate all possible math expr of one term
- Previous by thread: Re: Reading random bits of clhs
- Next by thread: Re: Reading random bits of clhs
- Index(es):