Lisp HUG Maillist Archive

changing directories easily

I am working on two systems at once.  They are in separate directories.

I want to switch between directories and edit files.

I *think* that I want to create a function in .lispworks that uses the editor:find-file-command.

Does anyone know how to do this correctly?

Reading the manual and the examples is not helping me (at this moment).

thanks
pt


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Re: changing directories easily

I have the same problem.

Previously, working with SBCL and Emacs, I usually started separate instances of the Emacs in different terminal (or tmux) windows and switched between them.

It will be nice to know how to solve this problem with LispWorks.

20.12.2019, 19:52, "paul tarvydas" <paultarvydas@gmail.com>:
> I am working on two systems at once. They are in separate directories.
>
> I want to switch between directories and edit files.
>
> I *think* that I want to create a function in .lispworks that uses the editor:find-file-command.
>
> Does anyone know how to do this correctly?
>
> Reading the manual and the examples is not helping me (at this moment).
>
> thanks
> pt
>
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html

-- 
Артеменко Александр
Пишу прототипы, быстро и качественно.
На Common Lisp и Python.


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Re: changing directories easily

 My "problem" was that I read "pathname" to mean "string".  I simply needed to prefix my string filenames with #P.
 

With Kibitzing from Dave McClain, I came up with something that works (for me, YMMV, quick and dirty):


In ~/.lispworks, I inserted these commands:

;; F4 brings up the file hprolog.lisp"

(editor:defcommand "Goto File hprolog" (p)
     (editor:find-file-command nil #P"/Users/tarvydas/quicklisp/local-projects/cl-holm-prolog/hprolog.lisp"))
(editor:bind-key "Goto File compiler" "F4")




;; (htest) clears the cache, quickloads my "hprolog" system and runs the test

(load "~/quicklisp/local-projects/cl-holm-prolog/package.lisp")
(defun htest ()
  (system:run-shell-command "rm -rf ~/.cache/common-lisp")
  (ql:quickload :cl-holm-prolog/test)
  (cl-user::htest))

[I need to clear the cache to *know* that I'm starting from a known state.  I'm bootstrapping a compiler (DaS (diagrams as syntax)), where ESRAP compiles to more ESRAP.  Most people might not need this step.  Loading the package allows me to compile any function which might reference a package defined in package.lisp, not already known at .lispworks time.]

[I'm using quicklisp and "~/quicklisp/local-projects" to handle system loading].

hth
pt

Updated at: 2020-12-10 08:29 UTC