source: release/1.8/source/cocoa-ide/hemlock/doc/misc/things-to-do.txt

Last change on this file was 6, checked in by Gary Byers, 21 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 25.9 KB
Line 
1-*- Mode: Text; Package: Hemlock; Editor: t -*-
2
3
4
5
6;;;; X problems.
7
8Compute mininum width of a window group by taking the maximum of all the
9windows' font-widths, each multiplied by minimum-window-columns. Right now it
10just uses the default font or current window.
11
12Compute minimum window split correctly: look at current window's font-height
13and new window's font-height, extra height pixels, whether each has a modeline,
14and minimum-window-lines to determine if we can split the current window.
15
16Server not implementing DRAW-IMAGE-GLYPHS correctly, so we don't have to do our
17pixmap hack.
18
19
20
21
22;;;; Bill and/or Rob.
23
24Make editor-error messages; that is just make many of the (editor-error)
25forms have some string to be printed.
26 Importance: often beeps and don't know why.
27 Difficulty: pervasive search for EDITOR-ERROR.
28
29Probably the ERROR for trying to modify a read-only buffer could/should be an
30EDITOR-ERROR. Maybe the error message should be a Hemlock variable that can be
31set for certain buffers or modes.
32
33Make definition editing different. Maybe only one command that offers some
34appropriate default, requiring confirmation. Maybe some way to rightly know to
35edit the function named under a #'name instead of the function name in a
36function position. Think about whizzy, general definition location logging and
37finding mechanism that is user extensible.
38
39Think about regular expression searching.
40 Importance: it would be used weekly by some and daily by others.
41
42Make illegal setting window width and height, (or support this).
43
44Think about example init file for randoms. It should show most of the simple
45through intermediate customizations one would want to do starting to use
46Hemlock.
47 setting variables
48 file type hooks
49 hooks
50 transposing two keys
51 changing modifiers
52
53DEFMODE should take a keyword argument for the modeline name, so "Fill"
54could be named "Auto Fill" but show "Fill" in the modeline (similarly with
55"Spell" and "Save").
56 Importance: low.
57 Difficulty: low.
58
59Optional doc strings for commands?
60 Importance: suggested by a couple people.
61 Difficulty: ???
62
63Get a real italic comment mode.
64 Importance: some people want it, like Scott.
65 Difficulty: hard to do right.
66
67Line-wrap-character a user feature? Per device? Per device set from Hvar?
68 Importance: a few people set this already for bitmap devices.
69 Difficulty: low.
70 Bill should just throw this in.
71
72When MESSAGE'ing the line of a matching open paren, can something be done to
73make the exact open paren more pronounced -- SUBSEQ'ing the line string?
74 Importance: low
75 Difficulty: one line frob to major echo area changes.
76
77Do something about active region highlighting and blank lines. Consider
78changing redisplay to be able to hack some glyph onto the line, a virtual
79newline or something.
80 Importance: blank lines at the ends of the active region can be confusing.
81 Difficulty: unknown difficult changes to redisplay.
82
83Change redisplay on bitmaps to draw top down? Currently line writes are queued
84going down the window image but the queue is written backwards.
85 Importance: low, two people commented on how it looks funny.
86 Difficulty: unknown, but probably little.
87
88Disallow tty I/O when the tty is in a bad state. Since editor is sharing
89Unix standard input with *terminal-io*, doing reads on this is bad among
90other problems.
91 Importance: necessary or non-experienced users.
92 Difficulty: slight. Error system wants to use *terminal-io* if you go
93 into a break loop from the editor.
94 Bill.
95
96Make Lisp indentation respect user indentation even when in a form with known
97special arguments?
98 Importance: noticeable correctness.
99 Difficulty: Lucid wrote this already with LOOP macro.
100 Rob.
101Make Lisp motion that exceeds the parsed region lose more gracefully by
102informing the user, possibly offering to enlarge the parsing parameters.
103 Importance: very deceptive as it is currently.
104 Difficulty: ???
105 Rob.
106Lisp motion fails to handle correctly vertical bar syntax; for example,
107 package:|foo|
108 Importance: correctness, not too necessary
109 Difficulty: ???
110"Editor Evaluate Defun" does not handle multiple value returns correctly
111... if we admit that this is often used to evaluate non-DEFUN top-level
112forms.
113 Importance: user convenience.
114 Difficulty: low.
115
116Super-confirm select buffer. Super confirm means "make this be a legal
117input". Has no interaction with prompting function interface. More
118generally, make a *super-confirm-parse-function* that can be bound around
119prompters. One suggestion when prompting for a buffer is to make it, but
120another suggestion is to find file some appropriate file.
121 Importance: multiple people requested.
122 Difficulty: low.
123 Bill.
124A super-confirm for a more facist "Find File" that disallowed creating buffers
125when the file didn't exist could tell the command to really create the buffer.
126
127Displayed-p shouldn't directly call update-window-image, or perhaps uwi should
128be changed to check if the ticks and whatnot indicate recomputation is needed.
129 Importance: minor efficiency hack and maybe a little cleaner.
130 Difficulty: low.
131 Bill.
132
133Fix line-length for hemlock output streams. The following example causes lines
134to brek incorrectly in "Eval" mode but not in "Typescript" mode:
135 (defun dup (x n &aux r) (dolist (i n r) (push x r)))
136 (dup 'a 100) ;lines wrap due to faulty line breaking
137 (dup 'aa 100) ;lines wrap due to faulty line breaking
138 (dup 'aaa 100) ;now lines break correctly
139 Importance: correctness. It's not screwing anyone.
140 Difficulty: depends on what the right thing is.
141
142Termcap bug:
143 setenv TERMCAP "foobar:li#65:tc=vt102:"
144 set term = foobar
145This causes an EOF unexpectedly on the string stream. This is because the
146the termcap parsing stuff wasn't written to go all the way back to the top
147entry point to determine what file to use when the TERMCAP variable had an
148indirection. The code currently just goes to the beginning of the stream
149and looks for the new tty name.
150
151Make prompt text not part of input buffer. Do some magical thing to solve
152the problem of having special echo area commands that simply get around the
153prompt text in the echo are buffer.
154 Importance: low sense problem is currently somewhat taken care of.
155 Possibly resolve problem when new Hemlock environment stuff
156 goes in.
157 Difficulty: Magical in origin.
158 Rob.
159
160Commonify everything. Make everything portable that could be made so (file
161system extensions, character att. finding, string ops, etc.) and document
162our expectations of the non-portable stuff we lean on. Provide portable
163code for stuff done in assembler.
164 Some known problems:
165 %sp- functions aren't documented and don't have portable code for
166 them.
167 semantics of initial values versus declared type.
168 :error-file to COMPILE-FILE calls.
169
170 Importance: cleanliness and portability ease for those who want our
171 code.
172 Difficulty: identify the problems and alter some code.
173 Bill and Rob.
174
175Fix things that keep text from getting gc'ed. Buffer local things keep
176pointer to buffer.
177 Importance: could be important, maybe nothing is wrong.
178 Difficulty: identifying problems.
179 Bill or Rob.
180
181Two reproducible window image builder bugs:
182THIS IS NUMBER ONE:
183I wrote this command:
184 (defcommand "Fetch Input" (p)
185 "Does \"Point to Here\" followed by \"Reenter Interactive Input\"."
186 "Does \"Point to Here\" followed by \"Reenter Interactive Input\"."
187 (declare (ignore p))
188 (point-to-here-command nil)
189 (reenter-interactive-input-command nil))
190I made the following bindings:
191 (bind-key "Fetch Input" #\hyper-leftdown :mode "Eval")
192 (bind-key "Fetch Input" #\hyper-leftdown :mode "Typescript")
193 (bind-key "Do Nothing" #\hyper-leftup :mode "Eval")
194 (bind-key "Do Nothing" #\hyper-leftup :mode "Typescript")
195In an interactive buffer I typed hyper-leftdown twice on the same line and
196got the following error:
197 Error in function HEMLOCK-INTERNALS::CACHED-REAL-LINE-LENGTH.
198 Vector index, 14700, out of bounds.
199This index is always the one you get no matter what line of input you try to
200enter twice.
201;;;
202THIS IS NUMBER TWO:
203Put point at the beginning of a small defun that has at least some interior
204lines in addition to the "(defun ..." line and the last line of the routine.
205Mark the defun and save the region. Now, yank the defun, and note that the
206beginning of the second instance starts at the end of the line the yanked copy
207ends on. Now type c-w. You'll delete the yanked copy, and the lines that
208should not have been touched at all end up with font marks. Interestingly the
209first line of the defun and the last don't get any font marks.
210 Importance: well, they are reproducible, and they're pretty ugly. No one
211 has noticed these yet though.
212 Difficulty: Rob and I didn't conjure up the bugs after a casual inspection.
213 Bill AND Rob
214
215Consider a GNU-style undo where action is undo-able.
216 Importance: low, but people point it out as an inadequacy of Hemlock.
217 Difficulty: possibly very hard. Have to figure out what's necessary first.
218 Bill and Rob
219
220
221
222;;;; Mailer stuff.
223
224Find all message-info-msgs sets and refs, changing them from possible list
225values to always be a simple-string value. Maybe must leave a list (or make
226another slot) if I need to indicate that I can't use the value as a msg-id.
227The only problem is coming through SHOW-PROMPTED-MESSAGE. This could pick or
228something to really know if there were more than one message or not.
229
230Write "Refile Message and Show Next".
231
232Do something about message headers when reading mail. Suggestions include a
233list of headers components that get deleted from the buffer and simply
234scrolling the window past the "Received:" lines.
235
236Add more folder support and possibly something specific for Bovik groveling.
237For example, rehashing the cached folder names and/or adding new ones from a
238folder spec or root directory (allows adding the bovik folders).
239
240Consistency problems:
241 Expunging message should not JUST delete headers buffers and their
242 associated message buffers. There could be independent message buffers with
243 invalid message id's. Since these are independent, though, we might not
244 want to gratuitously delete them.
245
246 "Headers Delete Message" should check for message buffers when virtual
247 message deletion is not used, deleting them I suppose. Instead of just
248 making headers buffers consistent.
249
250
251
252
253;;;; Spelling stuff.
254
255This stuff is probably for Rob or Bill, but think about undergrad
256dispatching before actually implementing it.
257
258Two apostrophes precede a punctuation character, as in:
259 ``This is a very common occurrence in TeX.''
260"Correct Buffer Spelling" complains that '' is an unknown word. The problem
261doesn't show up if the character preceding the apostrophes is alphabetic.
262
263"Correct Last Misspelled Word" should try to transpose the space on the
264ends of a word if there are more than one misspelling (adjacent?). This
265would have to be done at the command level trying to correct different
266words formed from the buffer.
267
268Fahlman would like to see a list of words that are treated as errors, even
269though they may be in the dictionary. These are considered common typos made
270that actually are rarely-used words. These would be flagged as errors for the
271user to do a conscious double check on.
272
273When the spelling correction stuff cannot find any possible corrections, it
274could try inserting a space between letters that still form legal words,
275checking the two new words are in the dictionary.
276 Importance: possibly pretty useful, especially with "Spell" mode.
277 Difficulty: low to medium.
278 Bill, possibly undergrad after I looked at it.
279
280Fix "Undo Last Spelling" correction interaction with auto-fill. When this
281command is invoked on a word that made auto-fill break the line, shit
282happens.
283 Importance: Rob noticed it.
284 Difficulty: unknown.
285 Bill or Rob.
286
287
288
289
290;;;; User and Implementors Manuals
291
292User Manual wall chart appendix based on systems (e.g., dired, mailer, Lisp
293editing, spelling, etc.), then modes (e.g., "Headers", "Message", and "Draft"),
294then whatever seems appropriate.
295
296Point out that "Make Buffer Hook" runs after mode setup.
297
298
299
300
301;;;; Things for undergrads.
302
303Create "Remote Load File" and make "Load File" use it the way "Compile File"
304uses "Remote Compile File".
305
306Make "Insert Scribe Directive" undo-able, and make the "command" insertion
307stuff use the active region. Also, clean up terminology with respect to using
308command and environment.
309 Importance: it would be nice.
310 Difficulty: little
311
312Add a feature that notes modified or new lines, probably down in
313HI::MODIFYING-BUFFER. Then add interfaces for moving over these lines, moving
314over text structures with these lines such as DEFUN's, paragraphs, etc. Write
315commands that display these in some way, compile them, etc.
316
317Look at open paren highlighting and the Scribe bracket table stuff to make a
318general bracket highlighter. Possibly have to call function based on mode or
319something since Lisp parens are found differently than Scribe brackets (Lisp
320parse groveling versus counting open and close brackets).
321
322Make hooks that are lists of function have list in the name, so users can know
323easily whether to set this to a list or function.
324 Importance: low.
325 Difficulty: low, but pervasive. must be careful.
326
327Make FILTER-REGION not move all marks in the buffer to the end. It should
328affect each line, letting marks stay on a line, instead of deleting the whole
329region and inserting a new one.
330 Importance: low, but described behaviour is better than current behaviour.
331 Difficulty: low.
332
333Make some "Auto Save Access" variable, so users don't have to write fully
334protected auto save files. Possibly there could be some variable to that
335represents Hemlock's default file writing protection.
336 Importance: one person requested.
337 Difficulty: easy.
338
339Make "Save" mode on a first write or on startup check for a .CKP file. If it
340is there and has a later write date than the file, warn the user before a save
341could overwrite this file that potentially has good stuff in it from a previous
342Lisp crash.
343 Importance: good idea, though people should know to check.
344 Difficulty: easier if done on start up.
345
346We need Lisp-like movement in Text mode -- skipping parenthetic and quoted
347expressions while ignoring some Lisp syntax stuff. Either can write a few
348commands that do what we expect, or we can get really clever with the
349pre-command parse checking and bounds rules for Text mode. May even be able to
350get the right thing to happen with code fragments in documents.
351 Importance: would be pretty convenient to have it work right all the time.
352 Difficulty: will take some thinking and playing around. Rob or Bill guidance.
353
354Make "Extended Command" offer a default of the last command entered.
355
356Make "Select Group" command take an optional argument for the group
357pathname and group name.
358 Importance: convenience for init files.
359 Difficulty: low.
360
361Put in buffer percentage.
362 Importance: Lots of people want it.
363 Difficulty: Rob thinks he knows how to do it.
364 Rob will tell some undergrad how to do it.
365
366Make "Unexpand Abbrev" work when no expansion had been done -- test for
367error condition was backwards.
368
369Add modeline display of current eval server and current compile server, when
370appropriate.
371 Importance: suggested by a couple people. Low.
372 Difficulty: none.
373 Basically, just have to change string and function.
374
375Make "Corrected xxx to yyy" messages use actual case of yyy that was
376inserted into the buffer.
377 Importance: more user friendly.
378 Difficult: low.
379 Anyone could do this, but it wouldn't be very educational for an
380 undergrad.
381
382"Find all Symbols" does a FIND-ALL-SYMBOLS on previous or current form if
383it is a symbol. See code for "Where is Symbol" in Scott's
384Hemlock-Init.Lisp file.
385 Importance: probably quite useful.
386 Difficulty: none.
387 Anyone could grab Scott's code.
388
389Make buffer read-only when visiting unwritable file? Bill and Scott
390vehemently disagreed with this, but thought a variable would make everyone
391happy.
392 Importance: one person suggested.
393 Difficulty: low.
394 Anyone could do this, but it wouldn't be very educational for an
395 undergrad.
396
397Modify MAKE-BUFFER to error when buffer exists?
398 Importance: more user friendly.
399 Difficulty: none.
400 Anybody could do this, but it wouldn't be very educational for an
401 undergrad.
402
403Warn when unable to rename a buffer according to its file. This occurs
404when writing files.
405 Importance: more user friendly.
406 Difficulty: none.
407 Anyone could do this.
408Uniquify buffer names by tacking a roman numeral on the end?
409 Importance: I don't know why this is here.
410 Difficulty: low.
411 Anyone could do this.
412
413Automatically save word abbrevs?
414 Importance: low.
415 Difficulty: low.
416 Some undergrad could do this.
417
418Automatically save named keyboard macros? Maybe on request?
419 Importance: other editors can do it.
420 Difficulty: this is non-trivial since our kbmacs are based on their own
421 little interpreter.
422 Medium undergrad task.
423
424Make nested prompts work.
425 Importance: some day this might be useful.
426 Difficulty: medium.
427 Upper level undergrad could do this.
428
429Make character searches deal with newlines.
430 Importance: correctness.
431 Difficulty: medium.
432 Upper level undergrad.
433
434Put argument type checks in the Hemlock primitives.
435 Importance: low, the compiler should do this from type declaration
436 (cool?!).
437 Difficulty: work in a lot of places.
438 Undergrad could do the things Rob or Bill say.
439
440Add a "Preferred File Types" to work in coordination with "Ignore File Types".
441 Importance: low, suggested by one user.
442 Difficulty: minimal.
443
444Write separate search and i-search commands that do case-sensitive searches, so
445user's don't have to set the Hvar for one search.
446 Importance: low.
447 Difficulty: low.
448
449Add a write-region function which writes to a stream.
450 Importance: low.
451 Difficulty: medium.
452 Undergrad.
453
454
455
456
457;;;; The great rewrite and cleanup.
458
459Compilation order. Cleanup up defvars, defhvars, proclaims, etc. for clean
460compilation of Hemlock in a Lisp without one. Rename ED and HI packages
461and start cleaning up compilation. Defvars should go near pertinent code,
462and proclaims should do the rest. Do something about macros, rompsite, and
463main.
464 Importance: necessary for those taking our code and sets better example.
465 Difficulty: few days of work.
466 Bill.
467
468Hemlock package cleanup -- exporting Hemlock stuff, so users don't live in
469ED package.
470 Find primitives to export and describe in Command Implementor's Manual.
471 Export existing command names in a separate file.
472 DEFCOMMAND always interns in current package.
473 Variables
474 One global table.
475 DEFHVAR only at top level. Interns into current package. WHAT ABOUT SITE-INIT?
476 BIND-VARIABLE, a new form, will be used at top level or in setup
477 functions to establish default values.
478 Find all uses of FIND-PACKAGE, *hemlock-package*, etc. since these are
479 suspect in the new package regime.
480 Put DEFVAR's (esp. from Main.Lisp) in appropriate files, putting PROCLAIM's
481 in a single file or in files with compiler warnings.
482 Importance: really needs to be done along with environment stuff.
483 Difficulty: pervasive changes to get right.
484 Bill!
485
486Generalized environments:
487 Generalize notion of environment to first-class objects.
488 can inherit stuff from other environments. Shadowing for conflict
489 resolution. Transparent key bindings another sort of interaction.
490 If we retain modes as a primitive concept, then how do they interact?
491 If not, how do we get the effect? Each buffer has an environment.
492 This is normally the composition of the default environment and
493 various mode environments.
494
495 Turning modes on and off is simply adding and removing the mode's environment
496 from the buffer's environment's inherit list. The only sticky issue is the
497 order of the inheritence. We could assign each environment a precedence.
498
499 I guess we could punt modes as a primitive concept. The only thing this
500 wouldn't provide that modes do is a namespace and the major/minor
501 distinction. Setting the major mode is just frobbing the lowest precedence
502 environment in a buffer. A major mode is distinct from a minor mode in that
503 it inherits the global environment. An interesting question is at which
504 level precedences should be implemented. We could have it be a property only
505 of minor modes, which determines only the order in which a buffer inherits
506 its minor modes, or we could make it a property of environments, and have it
507 determine the total order of inheritance. Probably the former is better: it
508 simpler, and adequate. Also, at the environment level, it is more powerful
509 to be able to specify inheritance order on a per-case basis.
510
511 Make mode-hooks be a mode-object slot rather than hemlock variables. [a
512 random cleanup]
513
514 We change the (... &optional kind where) arguments to
515 (... &optional where). Where can be an environment such as
516 *global-environment* (the default) or a buffer, or it can be a string, in
517 which case it is interpreted as a mode name.
518
519 Instead of having key binding transparentness be a property of modes or of
520 commands, we make it a property of binding. Each environment has separate
521 key-tables for transparent and opaque bindings, and there is a
522 Transparent-Bind-Key function that is used to make transparent key bindings.
523 [... or something. This would imply a delete-transparent-key-binding and
524 prehaps other functions, so we might consider passing a transparent flag to
525 the primitives.]
526
527 *current-environment* is the current environment, which is normally eq to the
528 current buffer. Attributes and variables are implemented using deep-binding
529 and caching. Whenever there is any change to the inheritance structure or to
530 variable or attribute bindings, then we just totally flush all the caches.
531 The most frequent operation that would cause this to happen would be changing
532 a mode in a buffer, which is rare enough so that there should be no problem.
533
534 For variables, we just have a symbol-name X environment => binding cache.
535
536 For attributes we have two caches: attribute X environment => value vector
537 and attribute X environment X test-function => search vector. The first
538 translates an attribute and environment to a simple-vector that contains the
539 current value for each character in that environment. This is used for
540 Character-Attribute and when the Find-Attribute cache misses. When this
541 cache misses, we fill the vector with a magic "unspecified" object, and then
542 scan up the inheritance, filling in any bindings that are unspecified. We
543 could optimize this by noting in the character-attribute object when an
544 attribute has no shadowings. character-attribute hooks have to go away,
545 since they depends on shallow-binding.
546
547 Make Hemlock variables be typed. Have a :type defhvar argument,
548 variable-type function. In implementation, create a test function for each
549 variable so that we can efficiently check the type of each assigned value.
550 This implies defhvar should be a macro. We could make specifying the test
551 function be an explicit feature, but the same effect could always be obtained
552 with a Satisfies type specfier.
553
554 Split binding of hvars from definition.
555 Bind-Variable Symbol-Name Value &Optional Where
556 Creates a binding. If :Value is specified to defhvar, then it creates a
557 global binding of that value. If no :Value is specified, then there is no
558 global binding. We could flush the :Mode and :Buffer options, and require an
559 explicit Bind-Variable to be done in this case, or we could still allow them.
560 It would probably be better to flush them, since it would break code that is
561 doing run-time defhvars to make buffer-local variables. Perhaps we would
562 flush only :Buffer, since it is clearly useless, while being able to give an
563 initial mode binding may be useless.
564
565 All variable attributes except for value are global. Hooks are global. The
566 concept of a hook is somewhat dubious in the presence of non-global bindings.
567 It might be semi-useful to invoke the hook on each new binding in addition to
568 on each set.
569
570 Importance: Next big step for Hemlock.
571 Difficulty: Two months.
572 Bill will do this.
573
574Multiple font support:
575 Figure what kind of multi-font stuff we want to do.
576 Bogus to use integer constants for facecodes. It is reasonable within the
577 font mark, but the user interface should be keywords for facecodes.
578 Importance: no documented font support currently. Really need it.
579 Difficulty: includes massively reworking redisplay data structures.
580 Bill and Rob.
581
582
583
584
585;;;; Things to think about.
586
587;;; These are things that have been thought of, but we don't know much more
588;;; about them.
589
590Some general facility for users to associate definition locations with kinds of
591things and/or forms.
592
593What's the right way to be in a comment in some Lisp file and have filling,
594spelling, and whatever work out just right. Possibly regions with environment
595information. Maybe with a whole new hierarchical text representation, this
596would fall out.
597
598Synchronization/exclusion issues:
599 Currently there are non-modification primitives that are looking into a
600 buffer assuming it will not change out from under the primitive. We
601 need to identify these places and exactly what the nature of this
602 problem is (including whether it exists). Probably we need to make
603 non-trivial text examination primitives use without-interrupts so that
604 they see a consistent state.
605
606 Find other places where exclusion is needed:
607 Redisplay?
608 Typescript code?
609
610Online documentation stuff: What to do and how to do it. Rob has some
611notes on this from a year or two ago.
612 Importance: something to do.
613 Difficulty: high.
614 maybe no one.
615
616Think about general "Save My Editor State". Can generalize notion of
617stateful things? -- Word abbrevs, keyboard macros, defindent, spelling
618stuff, etc. This could be the last thing we ever do to Hemlock.
619 Importance: low.
620 Difficulty: very.
621 ???
622
623
624
625
626;;;; New Eval Servers
627
628Do something about slaves dieing in init files. Lisps start up and first load
629init.lisp. When a slave does this, it goes into the debugger before connecting
630to the editor.
Note: See TracBrowser for help on using the repository browser.