Re: "Essential lisp utilities": where are they?



Mirko.Vukovic@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
.



Relevant Pages

  • CTAN update: tikz-timing
    ... Library providing a timing column type for tabular. ... Additional experimental libraries: ... Added background to 'E' character. ... The \texttiming macro now uses a \timing macro internally. ...
    (comp.text.tex)
  • Re: How Common Lisp sucks
    ... What if you use different macros of different libraries in ... Should code generated by a macro be all the same, ... extension it cannot possibly cause problems for any existing correct ... It is to demonstrate that people WILL RAISE those aesthetic objections, ...
    (comp.lang.lisp)
  • Re: How Common Lisp sucks
    ... What if you use different macros of different libraries in the same form? ... Should code generated by a macro be all the same, or is code that is passed to a macro as a parameter handled differently? ... The code for each library would set the hook appropriately for that library. ... extension it cannot possibly cause problems for any existing correct code. ...
    (comp.lang.lisp)
  • Re: Importing libraries explicitly in macro code
    ... Tools> References to import the libraries, I am sure that the same ... issue would lie with every user who would run the macro on his/her PC. ... You can try and use Microsoft Visual Basic for Applications ...
    (microsoft.public.excel.programming)
  • Re: preprocessor: checking for clashing #define
    ... This generates comipler warning 'macro redefined'. ... #undef OP_ENCRYPT ... A and some uaw library B, but no modules use both libraries. ...
    (comp.lang.c)