1 FUEL, Factor's Ultimate Emacs Library
2 -------------------------------------
4 FUEL provides a complete environment for your Factor coding pleasure
5 inside Emacs, including source code edition and interaction with a
6 Factor listener instance running within Emacs.
8 FUEL was started by Jose A Ortega as an extension to Eduardo Cavazos'
9 original factor.el code. Eduardo is also responsible of naming the
14 FUEL comes bundled with Factor's distribution. The folder misc/fuel
15 contains Elisp code, and there's a fuel vocabulary in extras/fuel.
17 To install FUEL, either add this line to your Emacs initialisation:
19 (load-file "<path/to/factor/installation>/misc/fuel/fu.el")
21 If all you want is a major mode for editing Factor code with pretty
22 font colors and indentation, without running the factor listener
23 inside Emacs, you can use instead:
25 (add-to-list 'load-path "<path/to/factor/installation>/fuel")
26 (setq factor-mode-use-fuel nil)
27 (require 'factor-mode)
30 *** Running the listener
32 If you're using the default factor binary and images locations inside
33 the Factor's source tree, that should be enough to start using FUEL.
34 Editing any file with the extension .factor will put you in
35 factor-mode; try C-hm for a summary of available commands.
37 To start the listener, try M-x run-factor.
39 By default, FUEL will try to use the binary and image files in the
40 factor installation directory. You can customize them with:
42 (setq fuel-listener-factor-binary <full path to factor>)
43 (setq fuel-listener-factor-image <full path to factor image>)
45 Many aspects of the environment can be customized:
46 M-x customize-group fuel will show you how many.
48 *** Faster listener startup
50 On startup, run-factor loads the fuel vocabulary, which can take a
51 while. If you want to speedup the load process, type 'save' in the
52 listener prompt just after invoking run-factor. This will save a
53 factor image (overwriting the current one) with all the needed
56 *** Connecting to a running Factor
58 'run-factor' starts a new factor listener process managed by Emacs.
59 If you prefer to start Factor externally, you can also connect
60 remotely from Emacs. Here's how to proceed:
62 - In the factor listener, run FUEL: "fuel" run
63 This will start a server listener in port 9000.
64 - Switch to Emacs and issue the command 'M-x connect-to-factor'.
66 That's it; you should be up and running. See the help for
67 'connect-to-factor' for how to use a different port.
69 *** Vocabulary creation
71 FUEL offers a basic interface to Factor's scaffolding utilities.
72 To create a new vocabulary directory and associated files:
74 M-x fuel-scaffold-vocab
76 and when in a vocab file, to create a docs file with boilerplate
79 M-x fuel-scaffold-help
83 Triple chords ending in a single letter <x> accept also C-<x> (e.g.
84 C-cC-eC-r is the same as C-cC-er).
86 *** In factor source files:
88 Commands in parenthesis can be invoked interactively with
89 M-x <command>, not necessarily in a factor buffer.
91 |-----------------+------------------------------------------------------------|
92 | C-cz | switch to listener (run-factor) |
93 | C-co | cycle between code, tests and docs files |
94 | C-cr | switch to listener and refresh all loaded vocabs |
95 | C-cs | switch to other factor buffer (fuel-switch-to-buffer) |
96 | C-x4s | switch to other factor buffer in other window |
97 | C-x5s | switch to other factor buffer in other frame |
98 |-----------------+------------------------------------------------------------|
99 | M-. | edit word at point in Emacs (fuel-edit-word) |
100 | M-, | go back to where M-. was last invoked |
101 | M-TAB | complete word at point |
102 | C-cC-eu | update USING: line (fuel-update-usings) |
103 | C-cC-ev | edit vocabulary (fuel-edit-vocabulary) |
104 | C-cC-ew | edit word (fuel-edit-word-at-point) |
105 | C-cC-ed | edit word's doc (C-u M-x fuel-edit-word-doc-at-point) |
106 |-----------------+------------------------------------------------------------|
107 | C-cC-er | eval region |
108 | C-M-r, C-cC-ee | eval region, extending it to definition boundaries |
109 | C-M-x, C-cC-ex | eval definition around point |
110 | C-ck, C-cC-ek | run file (fuel-run-file) |
111 |-----------------+------------------------------------------------------------|
112 | C-cC-da | toggle autodoc mode (fuel-autodoc-mode) |
113 | C-cC-dd | help for word at point (fuel-help) |
114 | C-cC-ds | short help word at point (fuel-help-short) |
115 | C-cC-de | show stack effect of current sexp (with prefix, region) |
116 | C-cC-dp | find words containing given substring (fuel-apropos) |
117 | C-cC-dv | show words in current file (with prefix, ask for vocab) |
118 |-----------------+------------------------------------------------------------|
119 | C-cM-<, C-cC-d< | show callers of word or vocabulary at point |
120 | | (fuel-show-callers, fuel-vocab-usage) |
121 | C-cM->, C-cC-d> | show callees of word or vocabulary at point |
122 | | (fuel-show-callees, fuel-vocab-uses) |
123 |-----------------+------------------------------------------------------------|
124 | C-cC-xs | extract innermost sexp (up to point) as a separate word |
125 | | (fuel-refactor-extract-sexp) |
126 | C-cC-xr | extract region as a separate word |
127 | | (fuel-refactor-extract-region) |
128 | C-cC-xv | extract region as a separate vocabulary |
129 | | (fuel-refactor-extract-vocab) |
130 | C-cC-xi | replace word by its definition (fuel-refactor-inline-word) |
131 | C-cC-xw | rename all uses of a word (fuel-refactor-rename-word) |
132 |-----------------+------------------------------------------------------------|
136 |------+----------------------------------------------------------|
137 | TAB | complete word at point |
138 | M-. | edit word at point in Emacs |
139 | C-cr | refresh all loaded vocabs |
140 | C-ca | toggle autodoc mode |
141 | C-cp | find words containing given substring (M-x fuel-apropos) |
142 | C-cs | toggle stack mode |
143 | C-cv | edit vocabulary |
144 | C-ch | help for word at point |
146 |------+----------------------------------------------------------|
148 *** In the debugger (it pops up upon eval/compilation errors):
150 |---------+-------------------------------------|
152 | <digit> | invoke nth restart |
153 | w/e/l | invoke :warnings, :errors, :linkage |
155 |---------+-------------------------------------|
157 *** In the help browser:
159 |-----------+----------------------------------------------------------|
160 | h | help for word at point |
161 | v | help for a vocabulary |
162 | a | find words containing given substring (M-x fuel-apropos) |
163 | e | edit current article |
164 | ba | bookmark current page |
165 | bb | display bookmarks |
166 | bd | delete bookmark at point |
167 | n/p | next/previous page |
168 | l | previous page |
169 | SPC/S-SPC | scroll up/down |
170 | TAB/S-TAB | next/previous link |
171 | k | kill current page and go to previous or next |
173 | c | clean browsing history |
174 | M-. | edit word at point in Emacs |
175 | C-cz | switch to listener |
177 |-----------+----------------------------------------------------------|
179 *** In crossref buffers
181 |-----------------+-----------------------------|
182 | TAB/BACKTAB | navigate links |
183 | RET/mouse click | follow link |
184 | h | show help for word at point |
186 |-----------------+-----------------------------|