Use a spacebar or arrow keys to navigate
Here are the things that are important to me:
Here are the things that are important to me:
Here are the things that are important to me:
Here are the things that are important to me:
Here are the things that are important to me:
Here are the things that are important to me:
A (large) Emacs Lisp program uses modules from many places. Some modules reside inside and some outside.
Example: location positioning might be such a thing.
Interestingly the very old language, C, got it right. Consider:
#include "stdio.h" |
#include "./stdio.h" |
#include <stdio.h> |
In Ruby 1.9.x:
require 'rubygems'
|
require_relative 'rubygems'
|
In Emacs Lisp we have load-path which is consulted in load() and require().
Problems with load-path
I wrote emacs-load-relative for internal linking. In its simplest form:
(require 'load-relative) ; pull in (load-relative) (load-relative "my-module") (load-relative "./my-module") ; same as above (load-relative "my-module" 'dbgr) ; find under 'dbgr (require-relative "my-module" 'dbgr) ; use require instead of load |
A real example from emacs-dbgr/debugger/trepan.pl/init.el:
(require-relative-list '("../../common/regexp" "../../common/loc" "../../common/init") "dbgr-") |
Some Test frameworks. See http://www.emacswiki.org/emacs/UnitTesting:
I have 39 tests for over 90 Emacs Lisp files. This is more than Emacs 24 using elr.
Let's now dive into a test from emacs-dbgr, specifically one for testing gdb regular expressions:
Testing gdb regular expressions:
(require 'test-unit) (load-file "../dbgr/common/buffer/command.el") (load-file "../dbgr/debugger/gdb/init.el") ... (test-unit-clear-contexts) ... (context "traceback location matching" (tag regexp-gdb) (specify "basic location" (assert-t (numberp (loc-match text)))) ... ) (test-unit "regexp-gdb") |
$ remake --tasks # shows what targets are around CTAGS ChangeLog ... check check-am check-recursive check-short # Run all tests without bloated output $ cd test $ make check-short Running specs tagged "bp": . 0 problems in 1 specification using 1 assertions. (0 seconds)