graven-image
graven-image copied to clipboard
ED* implementation plan
A rough set of features/commands (most of them have synonyms, in case we do several commands or need a replacement):
-
[ ] Edit s-expressions structurally:
- [ ] Act on expressions
- [x] Move into, step in, descend
- [x] Move out, pop, ascend
- [x] Next, forward
- [x] Previous, back(wards)
- [ ] Paredit
- [ ] Insert parens
- [ ] Wrap
- [ ] Slurp, widen, conquer, devour
- [ ] Barf, shorten
- [ ] Unwrap—the same?
- [ ] Modify expressions
- [x] Insert, prepend, prefix
- [x] Append, suffix, annex, affix, postfix
- [x] Change, modify, rewrite, replace
- [x] Delete, cut, remove, clear, kill
- [ ] Join, merge, append?, concatenate
- [ ] Meta
- [ ] Copy, save
- [ ] Search, find, grep
- [ ] Substitute, replace
- [ ] Paste, yank
- [ ] Undo, cancel, stop
- [ ] Redo
- [ ] Evaluating, testing etc.
- [ ] Evaluate, run, execute
- [ ] Print, (re)display, self
- [ ] Save, dump to the file
- [ ] Read, parse, fetch from the file
- [ ] Act on expressions
-
[ ] Edit Lisp files as a set of s-expressions.
-
[ ] Editing strings is an UNIX
ed
-ish way.- Not really the best interface, but it's well suited for textual interaction
-
[ ] Editing non-Lisp files with this string editing modality.
- [ ] Or defining custom processors for file types like HTML.
-
[ ] Maybe even edit arbitrary Lisp objects?
- Kinda the same as
inspect*
, so not sure.
- Kinda the same as
Which means ed*
should dispatch at least over:
-
cons
.- Maybe
array
too, which compounds tosequence
.
- Maybe
-
string
. -
pathname
. - And, with potential Lisp object editing,
t
.
CC @fstamour