From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fdb0e,cdca3dc8d6167cd4 X-Google-Attributes: gidfdb0e,public X-Google-Thread: f7344,a808e23c428d1184 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,cdca3dc8d6167cd4 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2001-12-30 18:20:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!news.binc.net!young_r From: young_r@encompasserve.org (Rob Young) Newsgroups: comp.os.vms,alt.sys.pdp10,comp.sys.dec Subject: Re: historical evidence of what went wrong at DEC Date: 30 Dec 2001 20:20:02 -0600 Organization: Encompasserve Message-ID: References: <3roT7.207043$tf5.13617499@bin5.nnrp.aus1.giganews.com> <3C2D48CE.FA4FF25A@fsi.net> <2lok0a.sh9.ln@dadsys1.fuller.local> <3C2E08C7.D874209D@fsi.net> <3C2E493B.3CFB13DE@videotron.ca> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1009765205 11952 192.135.80.34 (31 Dec 2001 02:20:05 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Mon, 31 Dec 2001 02:20:05 +0000 (UTC) Xref: archiver1.google.com comp.os.vms:57456 alt.sys.pdp10:8901 comp.sys.dec:10562 In article <3C2E493B.3CFB13DE@videotron.ca>, JF Mezei writes: > Rob Young wrote: >> there is a good example of creating a tool as $ SET DEFAULT stinks, >> but not nearly as much as vi! ;-) > > To me, what makes or breaks an operating system is its built-in text editor. > You can't use some fancy 3rd party one because when you visit customers you > are not assured it is installed. > > And when there is a time crunch, it is an editor with which you are familiar > that saves the day when you have to fix some scripts or fix a data file in a > hurry etc etc. > > Notebook (windows) and Textedit (mac) just don't cut it. TPU isn't perfect, > and don't ever try to do a global change that involved the character TAB on a > Microvax II because it will take forever (EDT is best for that). > > EMACS seesm popular, but again, it is not sure to be everywhere. I started out using TPU with EDT Keypad set... picking up and customizing my own section over the years. Using Ken Fairfield's , Kevin Carosso's and that fellow named Hunter Goatley... and another guy from Nova Scotia and can't find a reference in the .tpus... But the tab/detab feature was/is very handy. I have that mapped to Gold-t to turn all tabs into spaces, Gold-e to turn spaces into tabs. Mostly Gold-t when working filters (using FLEX) on newspaper markup back in the day, hardly use it at all now. Here is the routine to manipulate tabs. Rob ! ! Changes spaces to tabs (intelligently) and changes tabs to spaces. The ! spaces->tabs translation is tricky: ENTAB is designed to NOT put tabs ! into comments. The method of doing this is to NOT replace a single ! space which is on a tab stop with the tab (which would be correct). ! Most comments have only single spaces in them so this is quite effective. ! ! Note: I had a terrible time trying to make these routines work with the screen ! in UPDATE mode and using the screen image -- the data at the cursor was not ! always what I expected, even when forcing TPU to update the screen first. ! I therefore disable the display, do everything on the real data, and then ! re-enable the display. ! ! Last Modified: ! 06/26/86 G. Van Baren Conform to LSI's TPU/LSE standards ! 11/13/85 G. Van Baren Initial release ! PROCEDURE LSI_ENTAB LOCAL COL, LOC, START_TAB, END_TAB, TAB_RANGE, SAVE_POS, old_mode; SET(SCREEN_UPDATE, OFF); SAVE_POS := MARK(NONE); POSITION(BEGINNING_OF(CURRENT_BUFFER)); IF GET_INFO (CURRENT_BUFFER, "mode") = OVERSTRIKE THEN old_mode := "O"; SET (INSERT, CURRENT_BUFFER) ELSE old_mode := "I" ENDIF; LOOP ! Find the first space. LOC := SEARCH(" ", FORWARD, EXACT); EXITIF LOC = 0; POSITION(LOC); START_TAB := MARK(NONE); LOOP ! Translate spaces into TABs while there are more spaces. Note that ! a single space on a tab stop will never be changed into a TAB ! unless it is followed by 8 more spaces. MOVE_HORIZONTAL(1); EXITIF (CURRENT_OFFSET = LENGTH(CURRENT_LINE)) OR (GET_INFO(CURRENT_BUFFER, "CHARACTER") <> " "); COL := GET_INFO(CURRENT_BUFFER, "OFFSET_COLUMN"); IF (COL / 8) * 8 = COL THEN END_TAB := MARK(NONE); TAB_RANGE := CREATE_RANGE(START_TAB, END_TAB, NONE); ! A single tab IF LENGTH(TAB_RANGE) < 9 THEN ERASE(TAB_RANGE); DELETE(TAB_RANGE); COPY_TEXT(ASCII(9)); EXITIF 1; ELSE ! There were 9 spaces -- a space on a tab stop and 8 more spaces ERASE(TAB_RANGE); DELETE(TAB_RANGE); COPY_TEXT(ASCII(9) + ASCII(9)); EXITIF 1; ENDIF; ENDIF; ENDLOOP; ENDLOOP; SET(SCREEN_UPDATE, ON); POSITION(SAVE_POS); IF old_mode = "O" THEN SET (OVERSTRIKE, CURRENT_BUFFER) ENDIF; REFRESH; ENDPROCEDURE PROCEDURE LSI_DETAB LOCAL COL, LOC, SAVE_POS, N, old_mode; SET(SCREEN_UPDATE, OFF); SAVE_POS := MARK(NONE); POSITION(BEGINNING_OF(CURRENT_BUFFER)); IF GET_INFO (CURRENT_BUFFER, "mode") = OVERSTRIKE THEN old_mode := "O"; SET (INSERT, CURRENT_BUFFER) ELSE old_mode := "I" ENDIF; LOOP ! Find the TAB to expand LOC := SEARCH(ASCII(9), FORWARD, EXACT); EXITIF LOC = 0; POSITION(LOC); ERASE(LOC); N := CURRENT_OFFSET; N := N - (8 * (N / 8)); COPY_TEXT(SUBSTR(" ", 1, 8 - N)); ENDLOOP; SET(SCREEN_UPDATE, ON); POSITION(SAVE_POS); IF old_mode = "O" THEN SET (OVERSTRIKE, CURRENT_BUFFER) ENDIF; REFRESH; ENDPROCEDURE