~mirabilos/jupp/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
F-keys:

		F1    F2    F3    F4    F5     F6     F7     F8    F9    F10   F11   F12
MirBSD console	^[[11~^[[12~^[[13~^[[14~^[[15~ ^[[17~ ^[[18~ ^[[19~^[[20~^[[21~^[[23~^[[24~	also ssh 3.2, PuTTY, rxvt below
xterm		^[OP  ^[OQ  ^[OR  ^[OS  ^[[15~ ^[[17~ ^[[18~ ^[[19~^[[20~^[[21~^[[23~^[[24~	also cygwin abusch, st izabera
gnome-t. below	  -   ^[OQ  ^[OR  ^[OS  ^[[15~~^[[17~~^[[18~~^[[19~^[[20~  -   ^[[23~^[[24~
konsole		^[OP  ^[OQ  ^[OR  ^[OS  ^[[15~ ^[[17~ ^[[18~ ^[[19~^[[20~^[[21~  -   ^[[24~	also yakuake
linux console	^[[[A ^[[[B ^[[[C ^[[[D ^[[[E  ^[[17~ ^[[18~ ^[[19~^[[20~^[[21~^[[23~^[[24~	also cygwin console below


Do something with these keys:

-------
ssh 3.2
-------
Arrow:    
Home: [2~ (uhg!)
End: [4~
Pgup: [5~
Pgdn: [6~
Ins: [2~
Del: 

Ctrl-arrow: -
Alt-arrow: - (can set Alt=ESC mode, but doesn't work with arrow keys)
Shift-arrow: -

-----
PuTTY
-----

Arrow:    
Home: [1~
End: [4~
Pgup: [5~
Pgdn: [6~
Ins: [2~
Del: [3~

Ctrl-arrow: OC OD OA OB
Ctrl-home: -
Ctrl-end: -
Ctrl-pgup: putty scroll back
Ctrl-pgdn: putty scroll fwrd
Ctrl-ins: -
Ctrl-del: -

Alt-arrow:    
Alt-pgup: [5~
Alt-pgdn: [6~
Alt-home: [1~
Alt-end: [4~
Alt-ins: [2~
Alt-del: [3~

Shift-arrow:    
Shift-home: [1~
Shift-end: [4~
Shift-pgup: putty scroll back
Shift-pgdn: putty scroll fwrd
Shift-ins: 
Shift-del: [3~

-----
XTerm
-----

Arrow:    
Home: 
End: 
PgUp: [5~
PgDn: [6~
Ins: [2~
Del: [3~

Ctrl-arrow:    
Ctrl-home: 
Ctrl-end: 
Ctrl-pgup: [5;5~
Ctrl-pgdn: [6;5~
Ctrl-ins: [2;5~
Ctrl-del: [3;5~

Shift-arrow:    
Shift-home: 
Shift-end: 
Shift-pgup: -
Shift-pgdn: -
Shift-ins *DOES NOT WORK* but inserts the X PRIMARY SELECTION
Shift-del: [3;2~

Shift-ctrl-arrow:    

Alt-ctrl-arrow:    

Alt-shift-arrow:    

Alt-shift-ctrl-arrow:    

Alt-arrow:    
Alt-home: 
Alt-end: 
Alt-pgup: [5;3~
Alt-pgdn: [6;3~
Alt-ins: [2;3~
Alt-del: [3;3~

----
rxvt
----
Arrow:    
Home: [7~
End: [8~
Pgup: [5~
Pgdn: [6~
Ins: [2~
Del: [3~

Ctrl-arrow: Oc Od Oa Ob
Ctrl-home: [7^
Ctrl-end: [8^
Ctrl-pgup: [5^
Ctrl-pgdn: [6^
Ctrl-ins: [2^
Ctrl-del: [3^

Shift-arrow:    

Shift-ctrl-arrow:    

Alt-ctrl-arrow: Oc Od Oa Ob

Alt-shift-arrow:    

Alt-arrow:    

--------------
gnome-terminal
--------------

Arrows:    
Home: OH
End: OF
PgUp: [5~
PgDn: [6~
Ins: [2~
Del: [3~

Ctrl-arrow:    
Ctrl-home: OH
Ctrl-end: OF
Ctrl-pgup: -
Ctrl-pgdn: -
Ctrl-ins: [2;5~
Ctrl-del: [3;5~

Shift-arrows:    
Shift-home: -
Shift-end: -
Shift-pgup: -
Shift-pgdn: -
Shift-ins: -
Shift-del: [3;2~

Alt-arrows:    
Alt-home: OH
Alt-end: OF
Alt-PgUp: [5;3~
Alt-PgDn: [6;3~
Alt-Insert: [2;3~
Alt-Delete: [3;3~

Ctrl-Alt-arrows: - (window manager takes)
Ctrl-Shift-arrows:    
Ctrl-Shift-Alt-arrows:    

-------
konsole
-------
Arrows:    
Home: 
End: 
PgUp: [5~
PgDn: [6~
Ins: [2~
Del: [3~

Ctrl-arrows:    
Ctrl-home: 
Ctrl-end: 
Ctrl-PgUp: [5~
Ctrl-PgDn: [6~
Ctrl-ins: [2~
Ctrl-del: [3~

Shift-arrows: -
Shift-home: 
Shift-end: 
Shift-PgUp: -
Shift-PgDn: -
Shift-Ins: -
Shift-Del: [3;2~

Alt-arrows:     
Alt-home: 
Alt-end: 
Alt-PgUp: [5~
Alt-PgDn: [6~
Alt-Ins: [2~
Alt-Del: [3~

-------------
linux console
-------------
Arrows:    
Home: [1~
End: [4~
PgUp: [5~
PgDn: [6~
Ins: [2~
Del: [3~

Ctrl-arrows:    
Ctrl-home: [1~
Ctrl-end: [4~
Ctrl-pgup: [5~
Ctrl-pgdn: [6~
Ctrl-ins: [2~
Ctrl-del: [3~

Shift-arrows: 
Shift-home: [1~

Alt-arrows: - (switches console)
Alt-home: [1~

--------------
cygwin console
--------------
Arrows:    
Home: [1~
End: [4~
PgUp: [5~
PgDn: [6~
Ins: [2~
Del: [3~

Ctrl-arrows: -
Shift-arrows: -

Alt-anything: prefixed with ESC

-----------------------
jstar missing sequences
-----------------------
^O options (supposed to be set tab width)
^P print
^U undo (supossed to be unerase)
^^ autoindent on/off
^\ meta (supposed to be refresh screen)
ESC $  insert math result money formatted
ESC m  Memorandum
ESC s  isearch fwrd (supposed to be Sincerely)
ESC c  compile (supposed to be center line)actually ^OC but ncih
^Q U   align paragraph (don't know what this does)
^Q ^Q  repeat next command once every second
^Q O   spell check entered word
^Q W   scroll up- repeat once every second
^Q Z   scroll down- repeat once every second
^Q Ins  it does something...
^Q Home  scroll up repeating
^Q End   scroll down repeating
^K M     math
^K F     run dos comment
^K N     column mode on
^K I     column replace mode on
^K O     copy file
^K E     rename file
^K J     erase file
^K L     change drive
^K uparw  rename file
^K dnarw  save and exit
^K ltarw  save
^K rtarw  ^K D save
^K Ins    move
^K Home   quit
^K End    quit
^K '      to markk
-----------------------

-----------------
notepad/cua mode?
-----------------
^A	select all
^F	find
^G	goto line
^H	replace
^J	return
^N	new blank file
^O	edit file (asks to save current)
^P	print
^S	save
^V	paste		(done)
^Z	undo		(done)
^X	cut		(done)
^C	copy		(done)
F3	find next
F5	date/time

- shell window intercept should be smarter.  hit ^K ^H- the ^H is going to the
  shell window.

- do not use ^[^[ for anything.  it prevents Alt-arrow
  from being useful.

- search should automatically use 'k' mode if block is
  selected.  Cursor should jump to top of block when done.  Jump
  back to start mode?


- save all files without asking thing for quick compile

- better parsing of compile messages


- continued search mode for jpico?

- smarter highlighter- need char and string storage.

- make ^K F prompt with previous text (PICO)?

^K X leads to segfault?

if I use ^K C to move search string into search prompt, it says not found
even though it found it.

options are screwed up: we copy window to buffer (to get buffer options
to the buffer).  But if we have multiple windows, buffer options will have
stale data.

we are missing many query and prompt window abort handlers, which cause
small memory leaks.

- update help screens: some things have changed (emacs is more like emacs).


Fix for next release highlight:

  other windows why
  lose state during page down?
  perl highlighter
  more syntax files

  byte to byte conversions?
  UTF-8 decoder right at input instead of in qw and utype?

 Update man page.

 Reload modified files (or current window)

  don't use -notite by default. (why? we switched back to -notite)

Watch loaded file for changes

Save all history buffers and keyboard macros in ~/.joe_state file?
Although, if merged, it must be disabled by default like mkshs HISTFILE is:
  18:48⎜«asarch» That would be for a wish list then: to keep the
           list of all opened files with their last position
  Natureshadow agrees with me that this is a JOE antifeature
   but then desires the file directory path history

  Update documentation.

shift/alt/ctrl arrow key stuff. (partially done)

regex: character classes? a-z matches any letter?

  parse *rc file only once?

  different symbol for 'joe' directory

  can't load terminfo- should switch to termcap or provide compiled
  ANSI terminfo built in.


New features:
-----------------------

  check all instances of 'chars': use UCS to locale symbols instead.
  EBCDIC ?
    - we assume '\n' is line terminator.
    - there are many references to '\t' and ' '.
    - EBCDIC used to be fixed record length (80 columns) anyway.

Math: octal(?), more functions. (-lm?)

Perl compatible regex search.
(Ugh. But grouping like \+\(foo\+ \) would be cool.)
(Also, alternatives and/or backreferences, think ^Q=)

Improvements for regular text
-----------------------------
mode where wordwrap wraps rest of paragraph?

mode where all editing wraps rest of paragraph?

soft wrap (i.e. wrap on screen but not in the file)!

Improvements for programming
----------------------------

Jump to definition (tags does this)

Show list of references

Diff mode (need vertical window)

Tie in with CVS

Refactoring

Syntax Highlighting:
--------------------

Support for more languages:

 Paragraph reformat mode for TeX files.

 ^G Matching for verilog begin ... end, html tags, etc.

 Reformat paragraph should reformat C function if we're editing C.

File loading/storing:

 Should have switch buffers in current window as more fundamental joe key
 sequence (it's ^[ u and ^[ v for now).

 Unnamed buffers should be in bufed list (was fixed in the lost joe 2.9)

Jmacs/Jstar/Jpico:

 search and replace 'fred' to 'foo':
    find 'Fred', gets 'Foo'.

 Rectangle mode for emacs yank system

 Overtype mode works for yank

 ESC args should work differently in emacs

 many negative args do not work properly

 exiting options and i-search with ESC is not pretty
 (it isn't in emacs either)

Shell windows:

 Better environment settings for shell windows.

Documentation:

 Include documentation for joe hackers.  I wrote a lot of this
 some time, I need to find it.

 joe should open tty earlier in startup sequence because ^Y
 is suspend character on sun.

UTF-8/Internationalization
--------------------------

- right-left mode for Hebrew/Arabic?

  There is no good way to do this.  For all rtol, you could use a reversed
xterm.  For mixed, you need tags to indicate direction.


UI for changing colors in the editor (or at least dark/light mode)

More colors: UI for using 256 color xterms.


 Lock files being edited?
  one person gets write lock


 Don't understand:  optionally break hardlinks on save?  what is "tla"?

 Use memory mapped files to fast load large files.  Have to not
 count no. lines in each buffer on startup.


 Emulate other editors?  Brief, EDT?


Prompts:

 Sort should be column wise, not row wise?

 HTML-style thing for option selection?


Terminal handling:

 Emit ESC c to reset terminal on startup?
 -> no, this power-cycles a hardware DEC VT420 (takes 1-2 minutes)

 Look into clearing right-most column.

Macros:

 Interactive macros during file load are broken.  Think about multiple
 stack hack (otherwise template based C++ callbacks).


Mouse:

 ` and autoindent mode are a problem for drag and drop.
 any way we can distinguish normal typing from a drop?

 xterm can actually do that: it's called bracketed paste mode:
 you send ^[ [ ? 2 0 0 4 h then any pastes you receive begin
 with ^[ [ 2 0 0 ~ and end with ^[ [ 2 0 1 ~ until you send
 ^[ [ ? 2 0 0 4 l but it only works with recent xterm and, while
 you can wrap the requests between ^[ P and ^[ \ to make them
 pass GNU screen it would wreck havoc with the other tabs, so
 we make this conditional on $TERM being xterm-xfree86 offering
 a generic paste mode in addition via :paste keymap

 mouse mode: mouse can position cursor.  Would be good for
 jcua...

Major new modes:

 Fixed record length mode


Major code improvements:

 Vertical windows (optionally lock-stepped).


Major new features:

 Folding


Options

 Fix it so all options appear in ^T.  Maybe make hook function
 to handle major changes.  Need this for major mode change for
 hex edit mode.

Other requests:

 -show no. utf characters, not no. bytes
 (if so, both need to be available)


┌───────────┐
 jupp TODO 
└───────────┘

 replace all int with size_t where applicable
 default utf8.c:locale_map to utf-8 when applicable (configure-time
  option perhaps? Android definitely, Cygwin definitely not)
 merge syntax handling code from joe-3.7+
 merge math from joe-3.7+
 write a jupp(1) mdoc page
 use mirkev (better code for hashtables)
 attach labels to ftypes; allow ftypes to inherit from these
  labels, instead of fdefault; add UI to apply an ftype, including
  fdefault, to the current buffer (requested by Wayne Cuddy)
 regex needs groups like 「\+\(foo\)
 regex needs alternative modes (POSIX BRE, ERE; PCRE optional?)
  because of the \0 vs. \1 confusion (and WTF @ \N letters!)
 ^KE could offer the last directory from a file that was saved
  with a / somewhere (file_prompt in joe 4.4 wmkpw)
 bracketed paste mode should disable autoindent, wordwrap,
  updating the status line, (?)  implemented using a paste
  labeled ftype (including using not the help cards for indication)
 switch from autoconf to mirtoconf2
 ANSI syntax highlighting; auto-turn it on in shell windows ()
   would need to hide the ANSI chars, yet enable backspacing
 redraw a line if it has been scrolled and had combining
  characters in it beforeactually, scrap that; make that:
  handle combining characters, *at all* (in the scrn array)
 add a soft line break flag: display as line-wrapped, do not
  save any newlines introduced by that
 perhaps wrap at U+00AD?
 have an mdoc(7) page actually describing its keybindings
 put all configuration into /usr/share/ and have them
  (all, not just *rc) overridable from the users home; use XDG dirs
  while at it maybe? and replace autoconf with mirtoconf, and use
  serial numbers for versions (jupp-26 follows joe-3.1jupp25)
 do charset conversion and support more charsets, both SBCS and
  UCS (UTF-{16,32}{BE,LE} for example) sponsored by tarent
 plug memory leaks (Valgrind reports a few)
 fix Coverity-pointed-out issues
 fixup some joe4.4 jupprc ftypes
 proper include, so ~/.jXXrc files can be half a dozen lines
 nested syntax highlighting states, with pop to go up
 

__________________________________________________________________
$MirOS: contrib/code/jupp/TODO,v 1.53 2020/05/22 02:58:07 tg Exp $