To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 938
937  |  939
Subject: 
Any Emacs/LDraw users?
Newsgroups: 
lugnet.cad
Date: 
Mon, 15 Feb 1999 12:32:38 GMT
Viewed: 
680 times
  
I'm an Emacs user myself, and for Emacs users it is very common to make
a new major mode whenever one encounters a new data format.  So I have
started making a major mode for editing LDraw DAT files in Emacs.

It is still very unfinished, but for people already using Emacs, it may
be worthwile to check out.  So far, this is what I have implemented:

o Automatically colours the buffer with font-lock according to the
  contents.  Here's a screenshot to explain what I mean:

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

  Note that the line in which the cursor is located has a red warning
  font because it is syntactically wrong.  This feature enables you to
  quickly discover errors.

  Also note the two levels of inlining which has been performed.  More
  on this further down.

o User setable number of decimals to preserve.  Defaults to two
  decimals.

o Hitting C-c C-q cleans up the current line.  That is, it removes all
  surplus whitespace, rounds all digits, removes trailing ".00"'s and so
  on.

o Functions can easily be repeated over a number of lines.  As an
  example, hitting C-u C-c C-q will apply the "clean-up" function to all
  lines.  Hitting C-u - 6 C-c C-q applies it to the six preceding lines
  and so on.

o Parts, lines and polygons can be moved by typing C-c C-m.  If you
  want to move the five following lines, say, type C-u 5 C-c C-m.

o Parts, lines and polygons can be turned by typing C-c C-t.  Typing
  C-u C-c C-t will turn _all_ lines in the model simultaneously.

o Sub-Models, Parts and primitives can be inlined by hitting C-c C-i.
  This can be done recursively, so that parts contained in an inlined
  sub-model can themselves be inlined.  Note that the inliner does not
  handle the special colour 24 in the inlined parts yet.

TODO:

Here's a list of things I plan to add in the future:

o LEdit emulation mode.  At the user's option, the editor may be turned
  into a LEdit emulator which mimics the behavior of LEdit.  That way,
  experienced LEdit users can quickly add parts, rotate them, and so on.
  Obviously, it will not actually render the parts, but all other
  aspects of LEdit will be emulated.  Exit the emulator by pressing "ESC
  F E", as usual.

o Pull down menus.  I normally don't use pull down menus on Emacs, but I
  figure other people like them, so they should be added for the LDraw
  functions.

o Interaction with LDLITE/LDraw.  Render all or parts of the model
  edited by launching LDLITE or LDraw.  So far, I have only used Emacs
  on my Linux system, so I haven't implemented this yet.

o Handle indentation.

o Handle special LDLITE declarations.

o Better documentation.

Here's the GPL'ed sourced for the LDraw major mode:

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

Please report any bugs, and issue any questions to me (or to the
newsgroup).  I have only tested this on my Linux system, but I assume it
should also run on an Emacs running in the Windows environment, possibly
with some modifications.

Fredrik



Message has 2 Replies:
  Re: Any Emacs/LDraw users?
 
Fredrik Glöckner (fredrik.glockner@bio.uio.no) announced LDraw mode for Emacs. I'll have a look. Play well, Jacob ---...--- -- E-mail: sparre@nbi.dk -- -- Web...: <URL:(URL) -- ---...--- LDraw FAQ: <URL:(URL) (25 years ago, 15-Feb-99, to lugnet.cad)
  Re: Any Emacs/LDraw users?
 
Wow! Excellent! As a long time emacs user, I'm very impressed. Since I often have trouble remembering part numbers, any chance of adding a query-lookup? E.g. if I have the cursor on the string "wing", and I do M-x-ldraw-lookup, I would get a propt (...) (25 years ago, 21-Feb-99, to lugnet.cad)

5 Messages in This Thread:


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

Custom Search

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