Re: "Essential lisp utilities": where are they?
- From: Mirko.Vukovic@xxxxxxxxx
- Date: Fri, 31 Oct 2008 07:55:40 -0700 (PDT)
On Oct 31, 10:06 am, "William James" <w_a_x_...@xxxxxxxxx> wrote:
Mirko.Vuko...@xxxxxxxxx wrote:
Hello,
I recall seeing a library of "essential lisp utilities", but I just
spent a better part of an hour going through cliki, my bookmarks,
installed libraries, and the web, and other than suspects such as
trivial-features, and cannot find it.
The reason is that I just wrote a little macro with-dir
(defmacro with-dir ((new-dir) &body body)
`(let ((old-dir (ext:cd)))
;; (format t "will move to ~a~%" ,new-dir)
(ext:cd ,new-dir)
;; (format t "current dir ~a~%" (ext:cd))
,@body
(ext:cd old-dir)))
A macro isn't needed for this.
Ruby:
def with_dir new_dir
old_dir = Dir.getwd
Dir.chdir new_dir
yield
Dir.chdir old_dir
end
p Dir.getwd
with_dir( ".." ){ p Dir.getwd }
p Dir.getwd
Um, that really was of no help:
- did not answer my question, or improve my answer
- did not even remotely convince me to look into Ruby, which would
entail to a) learn it & b) redo everything I did so far.
.
- References:
- "Essential lisp utilities": where are they?
- From: Mirko . Vukovic
- Re: "Essential lisp utilities": where are they?
- From: William James
- "Essential lisp utilities": where are they?
- Prev by Date: Re: Symbol clashes: how to avoid them. Part 2
- Next by Date: Re: "Essential lisp utilities": where are they?
- Previous by thread: Re: "Essential lisp utilities": where are they?
- Next by thread: Re: "Essential lisp utilities": where are they?
- Index(es):
Relevant Pages
|