Giter Site home page Giter Site logo

Comments (10)

Hexstream avatar Hexstream commented on June 27, 2024

Hello,

Thank you very much for reporting this issue!

Full disclosure: I never use Windows, do not have access to a Windows machine, don't really know anything about Windows, and generally do not care about Windows.

HOWEVER, my CLHS ASDF wrapper is certainly intended to work at least on the 3 major platforms (Linux, Mac OS X and Windows), and I will always make a best effort to ensure that that's the case.

I'm pretty sure that Windows 10 does still support some concept analogous to symlinks, such as Windows "shortcuts", and I'm confident that Emacs is able to make Windows create such symlink analogues in general. So in order for me to able to fix this issue, I would need you or someone else to figure out why the symlink creation fails (possibly according to some peculiarities of your setup), and what would make it work more reliably. You may like to use the emacs symlink creation function interactively and do some tests to see if you can create symlinks in general. I think you should also attempt to "manually" create a symlink in your Quicklisp directory, maybe you could get a more useful backtrace or some sort of insight.

I could eventually try to have a Windows setup in a VM or something like that, but I'm very busy and am not interested in doing this soon. So I need help to be able to resolve this issue.

from clhs.

saraf avatar saraf commented on June 27, 2024

from clhs.

Hexstream avatar Hexstream commented on June 27, 2024

Thank you very much for this information! Very informative.

The right thing for me to do seems to be to:

  1. test to see if the symlink already exists before trying to create it (although probably emacs should have done it this way in the first place); and

  2. when the symlink does not already exist, then try to create it, but if an error is thrown, then catch it and inform the user that the symlink has not been created successfully and that they will need to create it themselves, and inform them that this is expected on Windows 10 and that they need to go in administrator mode to create symlinks.

I'm pretty busy right now, but I'll classify this as high priority so I should be able to do this soon. I'll be relying on you to test the update to see if it works. Stay tuned. :)

from clhs.

Hexstream avatar Hexstream commented on June 27, 2024

Ok! So here's a first release candidate: http://tarballs.hexstreamsoft.com/tmp/clhs_0.6.4-rc1.tar.gz

Put this somewhere where asdf can find it, such as in the local-projects directory of your quicklisp directory. Then (asdf:load-system '#:clhs) and follow the instructions. I could give you more complete instructions on various scenarios to test, but it should be fine if you can just get this to work just for your current scenario. Let me know if you need more guidance...

(Here's the (preliminary) diff, for the curious: https://github.com/Hexstream/clhs/compare/tmp_0.6.4-rc1)

btw upon doing the (asdf:load-system '#:clhs) you'll get the following warnings, which you can safely ignore:

WARNING: PARSE-VERSION: "0.6.4-rc1" doesn't follow asdf version numbering convention
WARNING: Invalid :version specifier "0.6.4-rc1" for component "clhs" from file #P"/home/hexstream/data/projects/lisp/ready-to-use/clhs/clhs.asd", using NIL instead
WARNING: Invalid :version specifier "0.6.4-rc1" for component "clhs" from file #P"/home/hexstream/data/projects/lisp/ready-to-use/clhs/clhs.asd", using NIL instead

If everything works, I'll make a real 0.6.4 release, else I might make another release candidate, etc.
I'm looking forward to your feedback!

from clhs.

saraf avatar saraf commented on June 27, 2024

NOTE: I tried the steps you gave above (on top of the 0.6.3 install) but it did not work, and hence I chose to remove 0.6.3 completely before trying to install 0.6.4-rc1.

(Copying steps sent earlier over email)

I followed the following steps:

(ql:uninstall clhs) to remove the existing 0.6.3

remove the line to load clhs-use-local.el from the .emacs file.

un-tar 0.6.4-rc1.tar.gz into local-projects inside quicklisp.

shutdown emacs.

start emacs without elevated privileges.


;; Loading file C:\home.clisprc.lisp ...
;; Loading file C:\home\quicklisp\setup.lisp ...
;; Loading file C:\home\quicklisp\ASDF.lisp ...
;; Loaded file C:\home\quicklisp\ASDF.lisp
;; Loaded file C:\home\quicklisp\setup.lisp
;; Loaded file C:\home.clisprc.lisp
[1]> (asdf:load-system '#:clhs)

;; Loading file C:\home\quicklisp\local-projects\clhs_0.6.4-rc1\clhs.asd ...
WARNING: Invalid version "0.6.4-rc1" for component "clhs"
;; Loaded file C:\home\quicklisp\local-projects\clhs_0.6.4-rc1\clhs.asd
;; Loading file C:\Users\Aalhad\AppData\Local\common-lisp\cache\clisp-2.49-win-x86\C\home\quicklisp\local-projects\clhs_0.6.4-rc1\package.fas ...
;; Loaded file C:\Users\Aalhad\AppData\Local\common-lisp\cache\clisp-2.49-win-x86\C\home\quicklisp\local-projects\clhs_0.6.4-rc1\package.fas
;; Loading file C:\Users\Aalhad\AppData\Local\common-lisp\cache\clisp-2.49-win-x86\C\home\quicklisp\local-projects\clhs_0.6.4-rc1\main.fas ...

clhs-use-local.el doesn't seem to have been installed.
(Assuming "C:\home\quicklisp\" is the correct quicklisp directory location.)

Please run (clhs:print-emacs-setup-form) for details
on how to setup Emacs/Slime to perform lookups/browsing
with your local copy of the CLHS provided by this wrapper.

(That command will also tell you how to set
another quicklisp directory location, if necessary.)

;; Loaded file C:\Users\Aalhad\AppData\Local\common-lisp\cache\clisp-2.49-win-x86\C\home\quicklisp\local-projects\clhs_0.6.4-rc1\main.fas
0 errors, 0 warnings
T
[2]> (clhs:print-emacs-setup-form)

[ Quicklisp directory: "C:\home\quicklisp" (exists)
If the above location is not correct, do:
(setf clhs:quicklisp-directory "\path\to\quicklisp\") ]

clhs-use-local.el was not found in your quicklisp directory.
This means you're at step 1 of 2 for configuring Emacs/Slime
to perform lookups/browsing with your local copy of the CLHS.

Please run (clhs:install-clhs-use-local) in the (Common Lisp) REPL.
This will install clhs-use-local.el in your quicklisp directory.

Then, run (clhs:print-emacs-setup-form) again for instructions for step 2.

[3]> (clhs:install-clhs-use-local)

T
[4]> (clhs:print-emacs-setup-form)

[ Quicklisp directory: "C:\home\quicklisp" (exists)
If the above location is not correct, do:
(setf clhs:quicklisp-directory "\path\to\quicklisp\") ]

(clhs-use-local.el was found in your quicklisp directory.
Moreover, its version matches the one bundled with this CLHS ASDF wrapper.
You may proceed with step 2 of 2 below.)

Make Emacs evaluate this form to browse the CLHS locally:

(load "C:\home\quicklisp\clhs-use-local.el" t)

Use C-c C-d h make-instance RET to test if the change was successful.
If it was, then this will open your browser and the URL will begin with "file:///".

Put the form in your ~/.emacs to persist the change for future sessions.

The README file has some further information,
including a list of 3 useful Slime CLHS lookup commands
and how to get Emacs to open CLHS pages in a different browser.
(Location: C:\home\quicklisp\local-projects\clhs_0.6.4-rc1\README)

[5]>

M-x eval-expression: (load "C:\home\quicklisp\clhs-use-local.el" t)

As expected, this gives us the message:
Sorry, unable to create symlink named "c:/home/quicklisp/HyperSpec" pointing to "../HyperSpec-7-0/HyperSpec/".

Would you happen to be using Windows 10? Then you may need administrator privileges to be able to create symlinks. Please either run emacs as an administrator and then load clhs-use-local.el, or manually create the symlink with mklink in an administrator-mode console per the above parameters. This needs to be done only once, you should be able to use the CLHS wrapper as a normal user subsequently.

(TODO: Detect Windows 10 instead of unconditionally displaying the above note about Windows 10.)

Then restart emacs with administrator privileges and M-x eval-expression: (load "C:\home\quicklisp\clhs-use-local.el" t)

This results/evaluates in a T.

Looking at the directory to see if hyperlink was created: A hyperlink has been created, but its target is a non-existent directory!

ljcq8vkrdydsl4zxiqixorbo6a7ziwn8rsri3-vrmcwrw9yksjdwrkqmeeuv9y6hxszl5jvh3akeu4-kpeni4ipjonkdcvexf_tbnica-c9b9ektxr1ydakzvgkshg1yudde3eabhgxeaxs0exofcxwlxkmp3w5i6nrfcsw9vgakum3i5o5bqiv1jrxtqbtuixqm5bqdsvyfow5jyud

Try to test as suggested by C-c C-d h make-instance RET
This gives:
[2]>
*** - SYSTEM::READ-EVAL-PRINT: variable MAKE-INSTANCE has no value
The following restarts are available:
USE-VALUE :R1 Input a value to be used instead of MAKE-INSTANCE.
STORE-VALUE :R2 Input a new value for MAKE-INSTANCE.
ABORT :R3 Abort main loop
Break 1 [3]>

Then restart emacs without elevated privileges.
start up lisp and load asdf ... looks okay.

[1]> (asdf:load-system '#:clhs)

;; Loading file C:\home\quicklisp\local-projects\clhs_0.6.4-rc1\clhs.asd ...
WARNING: Invalid version "0.6.4-rc1" for component "clhs"
;; Loaded file C:\home\quicklisp\local-projects\clhs_0.6.4-rc1\clhs.asd
;; Loading file C:\Users\Aalhad\AppData\Local\common-lisp\cache\clisp-2.49-win-x86\C\home\quicklisp\local-projects\clhs_0.6.4-rc1\package.fas ...
;; Loaded file C:\Users\Aalhad\AppData\Local\common-lisp\cache\clisp-2.49-win-x86\C\home\quicklisp\local-projects\clhs_0.6.4-rc1\package.fas
;; Loading file C:\Users\Aalhad\AppData\Local\common-lisp\cache\clisp-2.49-win-x86\C\home\quicklisp\local-projects\clhs_0.6.4-rc1\main.fas ...
;; Loaded file C:\Users\Aalhad\AppData\Local\common-lisp\cache\clisp-2.49-win-x86\C\home\quicklisp\local-projects\clhs_0.6.4-rc1\main.fas
0 errors, 0 warnings
T
[2]>

Try to load up clhs-use-local.el M-x eval-expression: (load "C:\home\quicklisp\clhs-use-local.el" t)

This gives us
Sorry, unable to create symlink named "c:/home/quicklisp/HyperSpec" pointing to "../HyperSpec-7-0/HyperSpec/".

Would you happen to be using Windows 10? Then you may need administrator privileges to be able to create symlinks. Please either run emacs as an administrator and then load clhs-use-local.el, or manually create the symlink with mklink in an administrator-mode console per the above parameters. This needs to be done only once, you should be able to use the CLHS wrapper as a normal user subsequently.

(TODO: Detect Windows 10 instead of unconditionally displaying the above note about Windows 10.)

Created the symlink manually as administrator

ac3yzvbgqc1rf49itfxg09df3a0iz7tnkxvablg6ke6kuix_cted5lbs1y-j3olhngvv9hvx1zi0a9myativywpqwi2af4slvcr41ady9fayfeqqeqyl4frntgdgpj84yd6mx8cfms41slghkhvlx9exk_mcxraxcyvwpu8-_pdnsnelbznqyicydexywecm9kmkjx6tw-mybnmqczh

Started emacs as a normal user, and tried to load clhs-use-local.el:

Sorry, unable to create symlink named "c:/home/quicklisp/HyperSpec" pointing to "../HyperSpec-7-0/HyperSpec/".

Would you happen to be using Windows 10? Then you may need administrator privileges to be able to create symlinks. Please either run emacs as an administrator and then load clhs-use-local.el, or manually create the symlink with mklink in an administrator-mode console per the above parameters. This needs to be done only once, you should be able to use the CLHS wrapper as a normal user subsequently.

(TODO: Detect Windows 10 instead of unconditionally displaying the above note about Windows 10.)

from clhs.

Hexstream avatar Hexstream commented on June 27, 2024

I'm confused. Did you see issue #11 yet? I @mentioned you there, thinking that it would send you an email notification, but maybe I should also have linked you to it from an email reply to make sure.

(edit: You can review and update your notification settings here.)

Also, you REALLY need to learn how to use triple backquotes blockquoting. (```)
Click on Styling with Markdown is supported while editing a message for details. It's easy!

from clhs.

chuchana avatar chuchana commented on June 27, 2024

Hello and thank you!

I found this after trying to fix the fact that the symlink could not be created by version 0.6.3 with w32-symlinks.el, which just resulted in breaking hyperspec-lookup because the link it created was broken.

The download link you provided was down but I could get it here.

It succeeds in enabling local lookup :)

Executing (load "C:/Users/p/quicklisp/clhs-use-local.el" t) still shows an error saying that the symbolic link could not be created, though.

And, last and least: I assumed that PowerShell could do everything Command Prompt (cmd) could, but mklink isn't recognized there. Maybe that's worth mentioning in the error text?

from clhs.

Hexstream avatar Hexstream commented on June 27, 2024

Hello and thank you!

Hello and thank you!

The download link you provided was down

Yeah, sorry, that had been wiped out by a server upgrade. I restored it now.

It succeeds in enabling local lookup :)

Hooray!

Executing (load "C:/Users/p/quicklisp/clhs-use-local.el" t) still shows an error saying that the symbolic link could not be created, though.

Then I guess I should test to see if the symlink already exists and points to the right place and not try to create it in that case...


Unfortunately, I'm doing a big push to finish and release 10 new libraries right now, so I'll probably look into making a second release candidate only after that's done. Thank you for your patience.

edit: Actually, I'm not sure I'll have time to do this in 2020, but definitely Q1 2021 at the latest. ;P

from clhs.

chuchana avatar chuchana commented on June 27, 2024

I am in no hurry, I'm just glad it works. The error message when starting Emacs is not a problem for me, I just thought it would make sense to give some feedback so you know that your efforts were both effective and appreciated.

from clhs.

Hexstream avatar Hexstream commented on June 27, 2024

from clhs.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.