Windows install

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

@rickyboy, thanks for the advice: I couldn't run into any problems, because this site was under migration to a new server, and I had not copied your emacs instructions yet.

Before trying them, I had a go at installing Winger's Scite config, and that worked out okay. So, my immediate problems at work are out of the way.

However, as good as Scite is, I just want to use emacs: as I said, it has been such huge pleasure with LaTeX. Also, there's always the feeling that useful additions are only some emacs lisp code away. I am not saying that is easy, but that it is possible, where I am not sure how to go about hacking (or whether it will even be possible) with Scite and the others.

So, I will be trying an Emacs install, following your post, at home on Win 7, and then I will have had enough practice hopefully to whistle through it at work, where time is tight.

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

@rickyboy, sorry to say, I still have not got Emacs working with newLISP.

Perhaps it's to do with my Emacs being in C:\emacs - how will it be initialised by files in C:\Users\me\.emacs.d?

Maybe I should move emacs into C:\User\me\emacs? Then put the .emacs.d file into that, and move likewise the \newlisp-mode folder, with the files it contains (init.el & newlisp.el)?

The errror I get is

Code: Select all

File mode specification error: (void-function newlisp-mode)

rickyboy
Posts: 597
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Windows install

Post by rickyboy »

Hey jazper,

Here's what my Emacs setup looks like on my Windoze desktop at work. (In the following "directory" means "folder" and vice versa, as usual.)

1. I installed Emacs into my AppData/Local directory -- I too don't have admin privs at work. (However, you can install it anywhere.) So precisely, I have a directory

Code: Select all

C:/Users/rick/AppData/Local/emacs-24.3
that contains the distro's files (the ones in the .7z distro file). The directory listing looks like this.

Code: Select all

C:/Users/rick/AppData/Local/emacs-24.3/
    bin/
    etc/
    info/
    leim/
    lisp/
    site-lisp/
    BUGS
    COPYING
    README
    README.W32
And I do NOT touch the contents of this directory -- anything I change is under my user (HOME) directory in the folder called .emacs.d.


2. Speaking of that, my Emacs user config is in the directory

Code: Select all

C:/Users/rick/.emacs.d
The following listing shows what's in there.

Code: Select all

C:/Users/rick/.emacs.d/
    auto-save-list/
    newlisp-mode/
        newlisp.el
    init.el
(BTW the folder auto-save-list is created and maintained by Emacs. The rest -- newlisp-mode/newlisp.el and init.el are the files I created there.)
In the above directory listings, anything that ends in a slash (/) is a folder, and anything that is indented further than what's immediately above it at a lower indentation, means containment -- for instance, this:

Code: Select all

newlisp-mode/
    newlisp.el
means that newlisp-mode is a directory that contains a file newlisp.el. Hope that's clear.
Now, the contents of your init.el file (in your .emacs.d directory) should be something like -- or exactly -- the following (which is copied from a previous posting, but I include here without the comments).

Code: Select all

(setq dotemacsdotd-dir (file-name-as-directory (expand-file-name "~/.emacs.d")))
(column-number-mode t)
(setq-default indent-tabs-mode nil)
(global-font-lock-mode t)
(add-to-list 'load-path
                 (file-name-as-directory
                  (concat dotemacsdotd-dir "newlisp-mode")))
(require 'newlisp)
(add-to-list 'auto-mode-alist '("\\.lsp$" . newlisp-mode))
(add-to-list 'interpreter-mode-alist '("newlisp" . newlisp-mode))
And the contents of newlisp.el (in the .emacs.d/newlisp-mode directory) should be what's in this resource: http://www.newlisp.org/code/newlisp.el.


3. Well, that's all I did as far as file setup (starting from in a clean system, i.e. no Emacs). The only other config, outside of the files, is that I set up this environment variable:

Code: Select all

HOME = C:/Users/rick

I believe Emacs wants to see this -- that's how it finds your .emacs.d directory.

Also, you have probably already done this -- but just for the sake of completion -- I set the environment variable

Code: Select all

NEWLISPDIR = C:/Users/rick/AppData/Local/newlisp
(Notice in the above that I also installed newLISP into AppData/Local. Hehehe.) and I put newLISP's location (which is the same as the value of NEWLISPDIR) in my PATH. Putting newLISP in your PATH is important because when newlisp-mode wants to start a newLISP session, it only uses the bare command "newlisp" to do it.

If you have any error messages or problems beyond that, I'll be glad to help, but I just wanted to be sure that you have these fundamentals squared away. So, go check your setup, make sure it's basically like this, and report back any exception messages you get after verifying/aligning your basic setup. It will be easier to proceed with troubleshooting this way.

(And you can PM me here if you prefer.)
(λx. x x) (λx. x x)

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

@rickyboy, regret to say, I still haven'rt Emacs going with newLISP on Win 7. I followed your instructions to the letter, even allowing for the renamed newlisp[-mode].el (which I tried with both names). Perhaps it's because my .emacs.d file is on C:\Users\me, but Emacs is in fact installed on C:\.

I've gone through the .el files to ensure that all file names match, and the newlisp.el and init.el files as well, but it, as you say, drops me into debug with an error.

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

@rickyboy, sorry, I have confused things somewhat. Ignore my last post: it appeared that last night's had not gone through, and then all of a sudden it appeared, along with your reply to last night's. Thanks

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

Having got Winger's Scite config going on my Win 7 machine at home, (so, confident that I can still use newLISP in case of more Java problems) I allowed Windows to update my system. That did not affect how newLISP GS worked.

Then, I updated Java from java 6 update 31 to the latest, 7 update 21. That produced exactly the same problem encountered by xytotron and by me at work, and a warning about Windows firewalll. So, to verify things, I uninstalled Java 7 update 21 (but java 6 update 31 is still on my system), and the problem went away.

I don't really mind any more, knowing that I can use Scite and soon (hopefully) Emacs, but perhaps it's worth confirming that Java 7 update 21 is likely to cause problems with the newlISP java IDE.

Btw, Winger's Scite setup was pretty easy, and although the default colour scheme looks a bit like Vegas from the air, is very slick, with autocomplete, snippets, tooltips.

Lutz
Posts: 5283
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: Windows install

Post by Lutz »

The cause seems to be spaces in the name of the install directory. Java 7/21 processes command string differently when starting a shell process.

The following worked for me just now on a Windows 8 (desktop mode) machine:

When installing, change the install directory from the default:

Code: Select all

c:\Program File (x86)\newlisp

to a directory without spaces in the name as in:

Code: Select all

c:\newlisp

or your home directory on Windows 7 and 8:

Code: Select all

c:\Users\jazper\newlisp
the environment variable NEWLISPDIR will be set correctly in a newLISP process as well as Window's PATH variable.

rickyboy
Posts: 597
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Windows install

Post by rickyboy »

Or use 8.3 names.
(λx. x x) (λx. x x)

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

Aha! I had tried both Program Files and Program Files (x86), but of course, they BOTH have spaces in them. Will try this just out of curiosity when I get a chance - buried in work for the last week, but will report back.

Sigh. It's quite often the *simple* things I fail to think of first ...

rickyboy
Posts: 597
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Windows install

Post by rickyboy »

Referring to my last comment, why don't you just try using the 8.3 names (which don't have spaces), before moving files around on your system? Check it: http://superuser.com/questions/179449/w ... ces-with-1. As the top answer says, DIR /X will tell you what the 8.3 name is for, for instance, "Program Files".
(λx. x x) (λx. x x)

alex
Posts: 100
Joined: Thu Mar 10, 2005 2:27 pm
Location: Russia

Re: Windows install

Post by alex »

Part of answer can be in viewtopic.php?f=9&t=4135&p=20500#p20500

See environment variables!

Post Reply