cKanren icon indicating copy to clipboard operation
cKanren copied to clipboard

[How-To]How to use it with Geiser in Emacs

Open ProfessorX opened this issue 9 years ago • 7 comments

standard-module-name-resolver: collection not found
  for module path: ckanren/miniKanren
  collection: "ckanren"
  in collection directories:
   /home/abrahamx91/.racket/6.1/collects
   /usr/share/racket/collects
   /home/abrahamx91/.emacs.d/elpa/geiser-20141006.1147/scheme/racket/
   /home/abrahamx91/Profession/Git/cKanren/
   ... [146 additional linked and package directories]



Expression evaluated was:



(require ckanren/miniKanren)

I did install it as guided in the README. The feedback from raco showed that the installation is correct.

So to use this correctly, do I have to do some configurations with Emacs side?

ProfessorX avatar Oct 19 '14 09:10 ProfessorX

If you installed it from the command line, did you install using the same Racket version (it looks like 6.1 from the error message)?

I don't use Geiser, but that doesn't look like an Emacs related error.

calvis avatar Oct 21 '14 15:10 calvis

abrahamx@debian:~/Git/CIS604/Codes/AI$ racket
Welcome to Racket v6.1.
> (require ckanren/miniKanren)
stdin::10: collection not found
  for module path: ckanren/miniKanren
  collection: "ckanren"
  in collection directories:
   /home/abrahamx/.racket/6.1/collects
   /usr/share/racket/collects
   ... [147 additional linked and package directories]
  context...:
   show-collection-err
   standard-module-name-resolver
   /usr/share/racket/collects/racket/private/misc.rkt:87:7
> 

This is what the terminal told me when I try your package with the command line.

I think it may be with Emacs...Today I am kinda budy with reviewing for the midterm on Sunday (yeah the Middle East life style), so I would like to try to "beat the ckanren" in Emacs (and CLI?) and update you.

ProfessorX avatar Oct 25 '14 08:10 ProfessorX

I'm using Racket 6.1 and Emacs 24.2 and was able to install cKanren today and use it in Geiser.

The command raco setup cKanren didn't work for me, but raco setup worked fine (it just took a little longer). Afterwards, I could (require cKanren) through the terminal, Dr.Racket, and geiser.

@ProfessorX Try adding (setenv "PATH" (getenv "PATH")) to the top of your .emacs.

bennn avatar Oct 27 '14 22:10 bennn

I am using prelude configuration package, so I guess I should put that in my personal folder, the init.el file right?

ProfessorX avatar Nov 02 '14 14:11 ProfessorX

Yes, that sounds right. Does it work?

bennn avatar Nov 03 '14 14:11 bennn

not an Emacs issue. Here's the most likely culprit: cd cKanren/cKanren Most likely you didn't go into the subdirectory, cd cKanren instead of the above followed by

raco link .
raco setup cKanren

I just lost an hour of my life to that. Must say the need to go into the nested directory is unusual. Should've paid attention of course.

Does anyone know how to remove the link though? raco link -r cKanren doesn't remove it even though I see it clearly as day when raco link -l. Baffling

vkz avatar Nov 16 '14 17:11 vkz

to remove the incorrect link (will remove correct one too if you just followed the setup instruction and installed the cKanren): raco link --remove --name "cKanren". Don't ask me why. I think there's a bug in raco

vkz avatar Nov 16 '14 17:11 vkz