author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sun, 26 Sep 2010 19:14:31 +0300 | |
changeset 579 | 832bc0a1a8dc |
parent 528 | 8d0e582bca90 |
child 585 | c7b268051d29 |
permissions | -rw-r--r-- |
179 | 1 |
-*- mode: outline; coding: utf-8 -*- |
18 | 2 |
|
219
a6a5839b7423
Set variables in emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
3 |
* Variables. |
a6a5839b7423
Set variables in emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
4 |
|
a6a5839b7423
Set variables in emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
5 |
Select one of: |
a6a5839b7423
Set variables in emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
6 |
|
a6a5839b7423
Set variables in emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
7 |
(set 'variable value) |
a6a5839b7423
Set variables in emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
8 |
(setq variable value) |
a6a5839b7423
Set variables in emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
9 |
(defvar variable value "documentation") |
a6a5839b7423
Set variables in emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
10 |
|
268
b99a51c4e605
Emacs treat text as local variable definition, escape text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
225
diff
changeset
|
11 |
or (replace <colon> with :) |
219
a6a5839b7423
Set variables in emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
12 |
|
268
b99a51c4e605
Emacs treat text as local variable definition, escape text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
225
diff
changeset
|
13 |
# Local variables<colon> |
b99a51c4e605
Emacs treat text as local variable definition, escape text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
225
diff
changeset
|
14 |
# variable<colon> value |
b99a51c4e605
Emacs treat text as local variable definition, escape text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
225
diff
changeset
|
15 |
# End<colon> |
219
a6a5839b7423
Set variables in emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
16 |
|
171
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
17 |
* Debugging. |
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
18 |
|
382
1f499471d603
What functions and variables Emacs load and from which files?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
296
diff
changeset
|
19 |
** What functions and variables Emacs load and from which files? |
1f499471d603
What functions and variables Emacs load and from which files?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
296
diff
changeset
|
20 |
|
1f499471d603
What functions and variables Emacs load and from which files?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
296
diff
changeset
|
21 |
See value of variable 'load-history' (by C-h v load-history RET). |
1f499471d603
What functions and variables Emacs load and from which files?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
296
diff
changeset
|
22 |
|
171
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
23 |
** Using edebug. |
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
24 |
|
177
02b79b857ee1
Use plain ascii chars instead of UTF-8.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
171
diff
changeset
|
25 |
Execute 'M-x edebug-defun' (also on 'C-u C-M-x') on defun in source code to |
171
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
26 |
enable debugging for desired function. When next time this function invoked |
213 | 27 |
you entered to its debugging (jumped to its source code). |
171
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
28 |
|
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
29 |
To start debug execute code which used debugged function. |
18 | 30 |
|
171
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
31 |
You can disable edebug on a function by evaluating the function again using |
177
02b79b857ee1
Use plain ascii chars instead of UTF-8.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
171
diff
changeset
|
32 |
'C-M-x'. |
171
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
33 |
|
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
34 |
** How debug func? |
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
35 |
|
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
36 |
Use M-x debug-on-entry and M-x cancel-debug-on-entry to control |
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
37 |
which functions will enter the debugger when called. |
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
38 |
|
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
39 |
When next time that function called automatically loaded debug-mode. |
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
40 |
|
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
41 |
** How debug ini file? |
18 | 42 |
|
213 | 43 |
When your ini has a bug, or when you load external files that cause |
18 | 44 |
errors, the bug is often hard to find, because the Emacs Lisp reader does not |
179 | 45 |
know about line numbers and files - it just knows an error happened, and |
46 |
that's it. |
|
18 | 47 |
|
528
8d0e582bca90
How debug long running command?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
48 |
** How debug long running command? |
8d0e582bca90
How debug long running command?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
49 |
|
8d0e582bca90
How debug long running command?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
50 |
M-x debug-on-quit RET' and then just hit `C-g' next time it gets 'stuck' somewhere. |
8d0e582bca90
How debug long running command?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
51 |
|
415
3ae537fcc132
Check if bug in ini file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
382
diff
changeset
|
52 |
*** Check if bug in ini file. |
3ae537fcc132
Check if bug in ini file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
382
diff
changeset
|
53 |
|
3ae537fcc132
Check if bug in ini file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
382
diff
changeset
|
54 |
First run Emacs without loading anything: |
3ae537fcc132
Check if bug in ini file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
382
diff
changeset
|
55 |
|
3ae537fcc132
Check if bug in ini file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
382
diff
changeset
|
56 |
$ emacs --no-init-file --no-site-file |
3ae537fcc132
Check if bug in ini file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
382
diff
changeset
|
57 |
|
3ae537fcc132
Check if bug in ini file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
382
diff
changeset
|
58 |
If bug not reproduced bug lies in ini files! |
3ae537fcc132
Check if bug in ini file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
382
diff
changeset
|
59 |
|
171
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
60 |
*** Binary Search. |
18 | 61 |
|
86
72175e4fc069
Reformat and add CLI switches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
62 |
Select half of the file in a region, and M-x eval-region. Depending on whether |
72175e4fc069
Reformat and add CLI switches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
63 |
that causes the error or not, split this half or the other half again, and |
72175e4fc069
Reformat and add CLI switches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
64 |
repeat. |
72175e4fc069
Reformat and add CLI switches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
65 |
|
171
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
66 |
*** Elisp. |
18 | 67 |
|
86
72175e4fc069
Reformat and add CLI switches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
68 |
- Use a keyboard macro that moves forward one expression (sexp) and evaluates |
72175e4fc069
Reformat and add CLI switches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
69 |
it. |
72175e4fc069
Reformat and add CLI switches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
70 |
- Try C-x check-parens. |
72175e4fc069
Reformat and add CLI switches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
71 |
- Set (setq debug-on-error t). |
72175e4fc069
Reformat and add CLI switches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
72 |
|
171
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
73 |
*** CLI. |
18 | 74 |
|
86
72175e4fc069
Reformat and add CLI switches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
75 |
$ emacs --no-init-file --no-site-file --debug-init |
72175e4fc069
Reformat and add CLI switches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
76 |
|
171
8e806cddee36
Debugging emacs (about edebug).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
77 |
*** Simplified Binary Search. |
19 | 78 |
|
177
02b79b857ee1
Use plain ascii chars instead of UTF-8.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
171
diff
changeset
|
79 |
Add (error 'No error until here') in the middle of your file. If you get the |
02b79b857ee1
Use plain ascii chars instead of UTF-8.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
171
diff
changeset
|
80 |
error 'No error until here' when reloading the file, move the expression |
86
72175e4fc069
Reformat and add CLI switches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
81 |
towards the back of the file, otherwise towards the front of the file. |
181
4202927c15ac
Text based WWW browser for emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
82 |
|
223 | 83 |
** Call tree. |
84 |
||
85 |
Before byte compiling file execute |
|
86 |
||
87 |
(setq byte-compile-generate-call-tree t) |
|
88 |
||
181
4202927c15ac
Text based WWW browser for emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
89 |
* WWW. |
4202927c15ac
Text based WWW browser for emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
90 |
|
4202927c15ac
Text based WWW browser for emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
91 |
** Text based WWW browser. |
4202927c15ac
Text based WWW browser for emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
92 |
|
4202927c15ac
Text based WWW browser for emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
93 |
http://en.wikipedia.org/wiki/W3m |
4202927c15ac
Text based WWW browser for emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
94 |
http://emacs-w3m.namazu.org/ |
4202927c15ac
Text based WWW browser for emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
86
diff
changeset
|
95 |
http://www.gnu.org/software/w3/ |
212
5715a5193fd4
Sort and uniquify lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
96 |
|
5715a5193fd4
Sort and uniquify lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
97 |
* Tricks. |
5715a5193fd4
Sort and uniquify lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
98 |
|
5715a5193fd4
Sort and uniquify lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
99 |
** Sort and uniquify lines. |
5715a5193fd4
Sort and uniquify lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
100 |
|
5715a5193fd4
Sort and uniquify lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
101 |
Select region, type C-u M-| sort -u RET. |
5715a5193fd4
Sort and uniquify lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
102 |
|
5715a5193fd4
Sort and uniquify lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
103 |
With transient-mark-mode and delete-selection-mode enabled: select region, |
5715a5193fd4
Sort and uniquify lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
104 |
type M-| sort -u RET to replace selection with sorted and uniquified lines. |
5715a5193fd4
Sort and uniquify lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
105 |
|
499
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
106 |
** Determining running environment/platform. |
472 | 107 |
|
499
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
108 |
Check variables: |
472 | 109 |
|
477
88bb97fd33c5
Determining running environment.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
472
diff
changeset
|
110 |
emacs-major-version |
88bb97fd33c5
Determining running environment.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
472
diff
changeset
|
111 |
emacs-minor-version |
500
0126175e6252
Reindent and make more doc for some variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
499
diff
changeset
|
112 |
window-system - 'nil' if in terminal, 'w32' if native Windows build, 'x' if under X Window |
0126175e6252
Reindent and make more doc for some variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
499
diff
changeset
|
113 |
window-system-version - for windows only |
0126175e6252
Reindent and make more doc for some variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
499
diff
changeset
|
114 |
operating-system-release - release of the operating system Emacs is running on |
0126175e6252
Reindent and make more doc for some variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
499
diff
changeset
|
115 |
system-configuration - like configuration triplet: cpu-manufacturer-os |
0126175e6252
Reindent and make more doc for some variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
499
diff
changeset
|
116 |
system-name - host name of the machine you are running on |
477
88bb97fd33c5
Determining running environment.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
472
diff
changeset
|
117 |
system-time-locale |
500
0126175e6252
Reindent and make more doc for some variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
499
diff
changeset
|
118 |
system-type - indicating the type of operating system you are using: |
0126175e6252
Reindent and make more doc for some variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
499
diff
changeset
|
119 |
'gnu' (GNU Hurd), 'gnu/linux', 'gnu/kfreebsd' (FreeBSD), |
0126175e6252
Reindent and make more doc for some variables.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
499
diff
changeset
|
120 |
'darwin' (GNU-Darwin, Mac OS X), 'ms-dos', 'windows-nt', 'cygwin' |
477
88bb97fd33c5
Determining running environment.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
472
diff
changeset
|
121 |
system-uses-terminfo |
88bb97fd33c5
Determining running environment.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
472
diff
changeset
|
122 |
window-size-fixed |
472 | 123 |
|
502 | 124 |
and check functions: |
499
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
125 |
|
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
126 |
(fboundp ...) - return t if SYMBOL's function definition is not void |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
127 |
(featurep ...) - returns t if FEATURE is present in this Emacs |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
128 |
(display-graphic-p) - return non-nil if DISPLAY is a graphic display; graphical |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
129 |
displays are those which are capable of displaying several |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
130 |
frames and several different fonts at once |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
131 |
(display-multi-font-p) - same as 'display-graphic-p' |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
132 |
(display-multi-frame-p) - same as 'display-graphic-p' |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
133 |
(display-color-p) - return t if DISPLAY supports color |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
134 |
(display-images-p) - return non-nil if DISPLAY can display images |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
135 |
(display-grayscale-p) - return non-nil if frames on DISPLAY can display shades of gray |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
136 |
(display-mouse-p) - return non-nil if DISPLAY has a mouse available |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
137 |
(display-popup-menus-p) - return non-nil if popup menus are supported on DISPLAY |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
138 |
(display-selections-p) - return non-nil if DISPLAY supports selections |
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
139 |
|
ab94e51efbc6
Determining running environment/platform.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
478
diff
changeset
|
140 |
Run those checks as below: |
472 | 141 |
|
142 |
(when window-system ...) |
|
143 |
(when (eq window-system 'x) ...) |
|
144 |
(when (>= emacs-major-version 22) ...) |
|
145 |
(when (fboundp '...) ...) |
|
146 |
(when (featurep '...) ...) |
|
147 |
||
269
77c8799aa8de
Finding emacs packages.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
268
diff
changeset
|
148 |
* Finding emacs packages. |
77c8799aa8de
Finding emacs packages.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
268
diff
changeset
|
149 |
|
77c8799aa8de
Finding emacs packages.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
268
diff
changeset
|
150 |
See |
77c8799aa8de
Finding emacs packages.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
268
diff
changeset
|
151 |
|
77c8799aa8de
Finding emacs packages.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
268
diff
changeset
|
152 |
http://anc.ed.ac.uk/~stephen/emacs/ell.html |
77c8799aa8de
Finding emacs packages.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
268
diff
changeset
|
153 |
http://www.emacswiki.org/emacs/WikifiedEmacsLispList |
296 | 154 |
http://tromey.com/elpa/index.html |
155 |
Emacs Lisp Package Archive |
|
156 |
||
157 |
** ELPA. |
|
158 |
||
159 |
ELPA goal is to make it simple to install, use, and upgrade Emacs Lisp |
|
160 |
packages. |
|
161 |
||
162 |
http://tromey.com/elpa/upload.html |
|
163 |
how to contribute |
|
270 | 164 |
|
165 |
* Compiling emacs. |
|
166 |
||
167 |
** Windows. |
|
168 |
||
169 |
Get MSYS for POSIX shell and utilities . Get MinGW for GCC. Get Gnuwin32 for |
|
170 |
jpeg, ungif, tiff, xpm, png, zlib libraries. |
|
171 |
||
172 |
Read emacs/nt/INSTALL. |
|
173 |
||
174 |
$ cmd |
|
175 |
$ cd emacs\nt |
|
275
3b1d21da03e3
Correct configure.bat options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
270
diff
changeset
|
176 |
$ configure.bat --prefix %INST_ROOT% --with-gcc --cflags -I%GNUWIN32_ROOT%/include --ldflags -L%GNUWIN32_ROOT%/lib --ldflags -lregex |
270 | 177 |
$ make bootstrap |
178 |
$ make info |
|
179 |
$ make install |
|
280 | 180 |
|
181 |
* Documentation. |
|
182 |
||
183 |
** Elisp documentation. |
|
184 |
||
283
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
185 |
;;; <file-name>.el --- <one-line-description> |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
186 |
|
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
187 |
;; Copyright (C) <years> <person> |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
188 |
|
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
189 |
;; Author: <person> <mail> |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
190 |
;; Maintainer: <person> <mail> |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
191 |
;; Created: <date> |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
192 |
;; Version: <version> |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
193 |
;; Keywords: <look for 'finder-by-keyword' output, separate by comma> |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
194 |
;; URL: <file-location> |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
195 |
|
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
196 |
;;; Commentary: |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
197 |
<bla-bla-bla> |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
198 |
;;; Code: |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
199 |
<lisp-code> |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
200 |
;;; <file-name> ends here |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
201 |
|
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
202 |
See |
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
203 |
|
74036be9b6f9
Elisp documentation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
204 |
http://www.gnu.org/software/emacs/elisp-manual/html_node/Library-Headers.html |
280 | 205 |
http://www.emacswiki.org/cgi-bin/wiki/ElispAreaConventions |
206 |
||
207 |
*** CheckDoc. |
|
208 |
||
209 |
CheckDoc checks your EmacsLisp code for errors in documentation and style. |
|
210 |
||
211 |
http://cedet.sourceforge.net/checkdoc.shtml |
|
212 |
home page before including it into GNU Emacs |
|
213 |
http://www.emacswiki.org/emacs/CheckDoc |
|
454 | 214 |
|
215 |
* Installing Emacs. |
|
216 |
||
217 |
** From sources. |
|
218 |
||
219 |
http://ftp.gnu.org/pub/gnu/emacs |
|
220 |
||
221 |
** Windows. |
|
222 |
||
223 |
http://ftp.gnu.org/pub/gnu/emacs/windows |
|
224 |
http://alpha.gnu.org/gnu/emacs/windows |
|
225 |
beta releases for windows |
|
226 |
||
227 |
** Debian. |
|
228 |
||
229 |
$ apt-get install emacs |
|
472 | 230 |
|
231 |
* Emacs paths. |
|
232 |
||
233 |
source-directory data-directory doc-directory exec-directory invocation-directory trash-directory |
|
234 |
tutorial-directory user-emacs-directory widget-image-directory |
|
478 | 235 |
|
236 |
* Emacs games. |
|
237 |
||
238 |
hanoi hanoi-unix life pong tetris gomoku |
|
239 |
||
501 | 240 |
* Long lines. |
241 |
||
242 |
(setq longlines-show-hard-newlines t) |
|
243 |
(setq longlines-wrap-follows-window-size t) |
|
244 |
(longlines-mode 1) |
|
511
79d2735bd210
Printing Emacs structures.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
502
diff
changeset
|
245 |
|
79d2735bd210
Printing Emacs structures.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
502
diff
changeset
|
246 |
* Printing Emacs structures. |
79d2735bd210
Printing Emacs structures.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
502
diff
changeset
|
247 |
|
79d2735bd210
Printing Emacs structures.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
502
diff
changeset
|
248 |
(message "%S" '(a b 123 "hello" 'set)) |
79d2735bd210
Printing Emacs structures.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
502
diff
changeset
|
249 |
(pp '(a b 123 "hello" 'set)) |
512 | 250 |
|
251 |
* File manager. |
|
252 |
||
253 |
http://www.emacswiki.org/emacs/Sunrise_Commander |
|
513 | 254 |
|
255 |
* Semantic. |
|
256 |
||
257 |
semantic-lex-spp-describe |
|
258 |
Describe the current list of spp macros. |
|
259 |
semantic-lex-c-preprocessor-symbol-file |
|
260 |
List of C/C++ files that contain preprocessor macros for the C lexer. |
|
261 |
||
516 | 262 |
* Debugging C code. |
263 |
||
264 |
-*- mode: grep; mode: auto-revert-tail; default-directory: "~/devel/proj" -*- |