Front Page All Articles Recent Changes Random Article

Contents

Concatenative language

  • ACL
  • Ait
  • Aocla
  • Breeze
  • Callisto
  • Cat
  • Cognate
  • colorForth
  • Concata
  • CoSy
  • Deque
  • DSSP
  • dt
  • Elymas
  • Enchilada
  • ETAC
  • F
  • Factor
  • Fiveth
  • Forth
  • Fourth
  • Freelang
  • Gershwin
  • hex
  • iNet
  • Joy
  • Joy of Postfix App
  • kcats
  • Kitten
  • lang5
  • Listack
  • LSE64
  • Lviv
  • Meow5
  • min
  • Mirth
  • mjoy
  • Mlatu
  • Ode
  • OForth
  • Om
  • Onyx
  • Plorth
  • Popr
  • Porth
  • PostScript
  • Prowl
  • Quest32
  • Quackery
  • r3
  • Raven
  • Retro
  • RPL
  • SPL
  • Staapl
  • Stabel
  • Tal
  • Titan
  • Trith
  • Uiua
  • Worst
  • xs
  • XY
  • 5th
  • 8th

Concatenative topics

  • Compilers
  • Interpreters
  • Type systems
  • Object systems
  • Quotations
  • Variables
  • Garbage collection
  • Example programs

Concatenative meta

  • People
  • Communities

Other languages

  • APL
  • C++
  • Erlang
  • FP trivia
  • Haskell
  • Io
  • Java
  • JavaScript
  • Lisp
  • ML
  • Oberon
  • RPL
  • Self
  • Slate
  • Smalltalk

Meta

  • Search
  • Farkup wiki format
  • Etiquette
  • Sandbox

Emacs Integration

Emacs on Windows

This should be readily adaptable for other operating systems but since I've just gone through the task of getting this working on Windows XP I thought I would document the result.

emacs.factor Modification

First, as of this date (11/16/2008) the basis/editors/emacs/emacs.factor that ships needs a slight modification. Slava is aware of this so presumably this won't be necessary soon, but you might want to check.

basis/editors/emacs/emacs.factor modified:

USING: definitions io.launcher kernel parser words sequences math
math.parser namespaces editors make system ;
IN: editors.emacs

: emacsclient ( file line -- )
    [
        \ emacsclient get "emacsclient" or ,
        os windows? [ "--no-wait" , ] unless
        "+" swap number>string append ,
        ,
    ] { } make try-process ;

: emacs ( word -- )
    where first2 emacsclient ;

[ emacsclient ] edit-hook set-global

Note: the addition of system to the USING list and the check for non-windows for the "--no-wait" option for emacs.

Customize emacs

Add the following to your /.emacs or other appropriate startup location:

;;; Factor
(load-file "d:/Program Files/factor/misc/factor.el")
(setq factor-binary "d:/Program Files/factor/factor.exe")
(setq factor-image "d:/Program Files/factor/factor.image")'

Be sure to change the paths appropriately of course.

Setup Factor Startup

Finally you need to inform factor that you want to use Emacs as your browser. Create or modify the .factor-rc file in your home directory. You can find out what factor thinks is your home directory with

USE: io.files home .

and you can even have factor create a blank file in the proper location with

home ".factor-rc" append-path touch-file

Edit that file and add something like:

USING: namespaces editors.emacs ;
"d:/Program Files/emacs-22.3/bin/emacs.exe" \ emacsclient set-global

again, change the path appropriately.

At this point factor should now be integrated with emacs.

This revision created on Mon, 17 Nov 2008 00:55:05 by kencausey (typo)

Latest Revisions Edit

All content is © 2008-2024 by its respective authors. By adding content to this wiki, you agree to release it under the BSD license.