To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dev.org.ldrawOpen lugnet.cad.dev.org.ldraw in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / Organizations / LDraw / 815
814  |  816
Subject: 
Re: LDraw CD-ROM Update
Newsgroups: 
lugnet.cad.dev.org.ldraw
Date: 
Sun, 7 May 2000 15:59:11 GMT
Highlighted: 
(details)
Viewed: 
854 times
  
Bram Lambrecht <braml@juno.com> writes:

I've downloaded emacs for windows and ldraw-mode.el, but since I
have no experience with emacs whatsoever, I don't even know where
to begin (how to I byte-compile ldraw-mode, for example?).  Could
you give me some advice?

Sure!  The instructions on the web page are written for people who
have some experience with Emacs already.  This is not done to scare
off people who are new to Emacs, but because I'm lazy and because I
wasn't expecting people who are not into Emacs already to be
interested in LDraw-mode.

First, I understand that you have downloaded and installed Emacs for
windows.  I downloaded the install shield version for Emacs NT, which
worked fine out of the box for Windows 95, which I use.  (I have
Windows 95 for playing games and using LEdit, mostly.)  If you have
problems with the installing procedure, I may not be able to help you,
because I'm no Windows guru myself.  I'm just a causual user of
Windows.  But you can try to ask me if you get stuck.

Assuming you have Emacs installed properly, you can try to start it
up.  You'll probably get a window with some menus on top and some
license and copyright information inside the window.  Emacs is buffer
oriented, which may be somewhat strange to a new user.  To put it
simple, you would normally not just start typing in the start up
window when you want to compose some file.  In stead, you would open
the new file, and then start typing.  If you're new, you can use the
"Files -> Open File" menu entry, but experienced users probably prefer
to use the keyboard shortcuts.  This will create a new, blank buffer
with the file name as the buffer name.  You can also use the same
procedure to open existing files, and you can have many buffers active
at the same time.  You can split the window into many small windows
and display all the buffers at once, or you can display one at a time.
Use the "Buffers" menu to fiddle with the buffers.

Allright, to install LDraw-mode, you will need to put the file
ldraw-mode.el somewhere in Emacs' load path.  How do you know what is
Emacs' load path?  Well, the simplest procedure for Windows users is
probably this hack: Search for files with the ".elc" extension.  These
are compiled Emacs Lisp files.  If you find a directory with many
".elc" files, this directory is probably in Emacs' load path.
Further, this directory will probably have the name "lisp".  Now,
copy the file "ldraw-mode.el" to this directory.  You don't really
need to byte compile it, but it speeds up execution.  You can do it
later on.

And you will need to tell Emacs to load the file "ldraw-mode.el" or
"ldraw-mode.elc" if you have compiled it.  You do this by putting this
statement into your ".emacs" file:

    (load "ldraw-mode")

Then restart Emacs for the changes to take place.

Chances are that you haven't got a ".emacs" file.  If so, you can
compose one.  It can be all blank, except for the line above.  You
would put it in your home directory, as defined by the HOME
environment variable.  If you don't have a HOME environment variable,
you can put it under C:\, that is: "C:\.emacs".  If your OS does not
accept file starting with a dot, you can call it "C:\_emacs".

You will probably want to put this line into the ".emacs" file as well:

    (global-font-lock-mode 1)

You can put it beneath or above the other line, it doesn't matter.
You'll also want to put something like this in your ".emacs" file:

    (setq ldraw-base-dir "C:/lego/ldraw")

Assuming you have your LDraw base dir under C:\lego.  Note the forward
slashed in the path.  Does this confuse you already?

Having done all this and restarted Emacs successfully, you can try to
open an LDraw DAT file.  Use the "Files -> Open File" menu item and
select a file.  Any LDraw-file, really, as long as it has the .dat
extension.  When you have done this, you should see that the buffer
gets the LDraw major mode enabled (it will read LDraw in the mode
line) and you will have an additional "LDraw" menu item on top.  This
tells you that LDraw-mode is successfully installed and ready to
process an LDraw file.

As a test to see if you have configured it properly, you can try to
inline a type-1 line.  Move the cursor to a type-1 line and press "C-c
C-i".  That's CTRL+c followed by CTRL+i.  Or you can use the
LDraw-menu.  If this works and appears to clutter your file, don't
worry!  You can undo the changes by pressing "C-_" or "Edit -> Undo"
in the menu.

If you feel lucky, you can also try out the hose composing tutorial at

    http://www.math.uio.no/~fredrigl/technic/ldraw-mode/

But be warned: If you haven't byte compiled ldraw-mode.el, you may
have to wait a long time for the function to finish, as it is very
CPU intensive, doing numerical integration and optimization.  Byte
compiling ldraw-mode.el should speed this up.  Read on...

You should byte-compile the ldraw-mode.el file too.  You can do this
by starting up Emacs.  Then press "M-x".  That's Emacs-speak for
ALT+x.  Or you can get the same effect by pressing and releasing ESC,
then pressing x.  This should result in the text "M-x" in the lower
line of the Emacs window.  Now type "byte-compile-file", hit RETURN,
and type in the path the ldraw-mode.el file, i.e. where you put it.

I'm sure this has you all confused already, but don't worry.  Just
tell me how far you got in the instructions above, and I will help you
onwards.

Good luck and happy Emacs-ing!  If you feel that the learning curve is
steep, keep in mind that I have used Emacs for nearly ten years
already, and spent something like three years before understanding
what it was all about...

Fredrik



Message has 1 Reply:
  Re: LDraw CD-ROM Update
 
Fredrik: First of all, thanks for the help! (...) Earlier, I went through some of the "tutorial" that comes with emacs. I think I have the gist of how it works... (...) Heh, problem is I'm used to the Windows shortcuts for everything. (...) Hmm, (...) (24 years ago, 8-May-00, to lugnet.cad.dev.org.ldraw, lugnet.cad)

Message is in Reply To:
  Re: LDraw CD-ROM Update
 
(...) experience with emacs whatsoever, I don't even know where to begin (how to I byte-compile ldraw-mode, for example?). Could you give me some advice? TIA, --Bram Bram Lambrecht.........Br...L@JUNO.com (URL) (24 years ago, 7-May-00, to lugnet.cad.dev.org.ldraw)

17 Messages in This Thread:








Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR