From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 17-FEB-1991 01:40:16.83
To:	ARISIA::EVERHART
CC:	
Subj:	Re: Wanted for VMS: editor as good as Brief

From:	RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.83)
	 id AA07623; Sun, 17 Feb 91 01:33:35 EST
Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Sat, 16 FEB 91 22:02:46 PST
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA18791; Sat, 16 Feb 91 21:53:21 -0800
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 16 Feb 91 15:19:56 GMT
From: elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!uwm.edu!rpi!uupsi!sunic!dkuug!tfl.dk!karsten@handies.ucar.edu
Organization: TFL, A Danish Telecommunication Research Laboratory
Subject: Re: Wanted for VMS: editor as good as Brief
Message-Id: <1991Feb16.161957.143@tfl.dk>
References: <1991Feb12.114340.12487@midway.uchicago.edu>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

In article <1991Feb12.114340.12487@midway.uchicago.edu>, ab2r@quads.uchicago.edu (Marshall Abrams) writes:
> Most of the programmers I work with love Brief, a text editor for
> MS-DOS.  I don't blame them--it's a really excellent editor.  It would
> be my favorite editor if I weren't so fond of GNU Emacs.  Anyways,
> we'd like something as powerful on VMS.  We've been using EVE some,
> but it hasn't been easy getting it to do what we want.  (Most annoying
> for us, EVE won't edit large files.)

Wrong.  EVE needs enough virtual storage to load your file into
virtual storage.  On VMS version prior to 5.4 you needed about
2.5 times the size of the virtual storage of virtual storage.
If you wanted to edit a file of size 100MB, then you needed a page file
quota of about 250MB or 500000 pages.  Also remember to increase
VIRTUALPAGECNT to at least 500000 and to increase the page files.
I VMS version 5.4, TPU has got a work file on which it can place
temporary data.  I don't know when it is used, so you will have to
find out your self - or make the processes have the needed virtual
storage 250MB of storage.

>                                       We're going to check out GNU
> Emacs, but any other suggestions would be greatly appreciated.  Here's
> what's most important to the people here:
> 
> 	Undo

Try editing EVE's journal files and then recover.  It is not as difficult
as you might think.  You delete 4 characters at a time from the end of the
buffer until A) the editor does not crash B) the wrong commands have
been deleted.  You can use the technic for both keystrock and buffer
change journalling.  Yes, I know it is a dirty hacker trick, but It
can save a day work.

> 	Text blocking in reverse video (Anybody know how to make
> 					GNU Emacs do this sometimes?)
> 	Column blocking
> 	Constant line and column number display

The code attached this posting will do that.  To install it,
execute the buildkeve command procedure.  It define a command called
BUILD.  Execute that and answer STATUS to the two prompt.  The code
defines a new command STATUS POSITIONS TOGGLE that will enable and
disable line and column numbers.  There are a few problems:
1) It slows down EVE when used on terminals or through set host.
2) It will not work together with the EVE command SET PENDING.
3) It will not work properly with the WPS keyboard.
4) I dought the code will work in the LSE editor.  I havn't tryed it.

> 	Ability to edit huge files (the bigger the better--some of 
> 				    our files are 100M or more)

Do you really want to edit these huge files, or do you just what
to inspect them?  The problem is that editor for virtual memory
machines like EVE and emacs store their buffers in main storage, and
that mean that what ever editor you chose you will need lots of
memory.  If you only what to inspect the files, then I think you
should go for a tool for reading files only like the public domain
MORE.  Also try the EDT editor - it was originally designed for the 16bit
PDP-11.

> 	Multiple windows and buffers, naturally
> 	keystroke macros
> 
> And while no one else at the company seems to care about them, I like to
> use regular expressions in searches and replaces (EVE won't do the
> latter).
 
Try out the EDT keypad in EVE.

> One of these days some company will make a lot of money porting Brief
> to VMS.  All you have to do is look at all the adds for PC editors
> claiming to be "better than Brief" to see how popular the program is.
> 
> Thanks in advance for the help.
> 
> 		Marshall Abrams

Karsten Nyblad
TFL, A Danish Telecommunication Research Laboratory
E-mail: karsten@tfl.dk

$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_VERIFY"))'
$!
$! This archive created by VMS_SHARE Version 7.2-007  22-FEB-1990
$!   On 16-FEB-1991 14:34:33.15   By user KARSTEN 
$!
$! This VMS_SHARE Written by:
$!    Andy Harper, Kings College London UK
$!
$! Acknowledgements to:
$!    James Gray       - Original VMS_SHARE
$!    Michael Bednarek - Original Concept and implementation
$!
$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
$! AND EXECUTE AS A COMMAND PROCEDURE  (  @name  )
$!
$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
$!       1. STATUS.TPU;4
$!       2. STATUS_MASTER.FILE;1
$!       3. STATUS_VERSION.DAT;1
$!       4. BUILDKEVE.COM;9
$!
$set="set"
$set symbol/scope=(nolocal,noglobal)
$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))
$e="write sys$error  ""%UNPACK"", "
$w="write sys$output ""%UNPACK"", "
$ if f$trnlnm("SHARE_LOG") then $ w = "!"
$ ve=f$getsyi("version")
$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$UNPACK: SUBROUTINE ! P1=filename, P2=checksum
$ if f$search(P1) .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped."
$ delete 'f'*
$ exit
$file_absent:
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'."
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped."
$ delete 'f'*
$ exit
$dirok:
$ w "-I-PROCESS, Processing file ''P1'."
$ if .not. f$verify() then $ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'
PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:=
CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));
LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(
BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1);
IF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE;
MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1;
ERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=
1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";
POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);
ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;
COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,
"output_file"));ENDPROCEDURE;Unpacker;QUIT;
$ delete/nolog 'f'*
$ CHECKSUM 'P1'
$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT
$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ ENDSUBROUTINE
$START:
$ create 'f'
Xmodule keve ident "v1.0"
X
Xprocedure keve$post_key_procedure_columns
X                                   `20
Xlocal col,rec;                 `20
X                                   `20
Xupdate(current_window);
Xif keve$x_last_column `7Bcurrent_window `7D = tpu$k_unspecified then
X    eve$set_status_line(current_window)
Xelse if (keve$x_last_column `7B current_window `7D <> get_info(current_buffe
Vr,"offset_column")) or
X   (keve$x_last_line_number `7B current_window `7D <> get_info(current_buffe
Vr,"record_number")) then
X   eve$set_status_line(current_window);
Xendif                                                      `20
Xendif                                `20
X
Xendprocedure
X
X
X
Xprocedure keve$position_status_field(max_length,the_format)
X
Xlocal format_string,
X      rec,
X      col;
X
Xif keve$x_status_positions_enabled then
X    update(current_window);
X    rec:= get_info(current_buffer,"record_number");
X    col:= get_info(current_buffer,"offset_column");
X    keve$x_last_column `7B current_window `7D := col;
X    keve$x_last_line_number `7B current_window `7D := rec;
X
X    return fao(the_format,(fao("(!UL,!UL)",rec,col)))
Xelse
X    return ""
Xendif
Xendprocedure
X
X
X
Xprocedure keve$undefined_key(the_key)
X
Xlocal local_key;
X
Xlocal_key:= the_key;
Xif ascii(local_key) <> 0 then
X    copy_text(ascii(local_key));
X    eve$set_status_line(current_window);
Xelse
X    eve$undefined_key(the_key)
Xendif
Xendprocedure
X
X
X
X
Xprocedure eve_status_positions_toggle
X
Xif not keve$x_status_positions_enabled then
X   if eve$$x_state_array `7Beve$$k_pending_delete_enabled`7D then
X      eve$message("Pending delete is enabled.  Can't enable column status in
Vformation");
X   else
X      keve$x_status_positions_enabled:= true;
X      eve$set_key_procedure(0, eve$x_key_map_list, "keve$post_key_procedure_
Vcolumns", 1235); ! Hack.  1235 <eve$$k_found_post_filter_id
X      set(self_insert,eve$x_key_map_list,off);
X      set(undefined_key,eve$x_key_map_list,"keve$undefined_key(last_key)");
X      eve$update_all_status_lines;
X   endif;
Xelse
X   keve$x_status_positions_enabled:= false;
X   eve$set_key_procedure(0, eve$x_key_map_list, 0, 1235); ! Hack.  1235 <eve
V$$k_found_post_filter_id
X   set(self_insert,eve$x_key_map_list,on);
X   set(undefined_key,eve$x_key_map_list,"eve$undefined_key(last_key)");
X   eve$update_all_status_lines;
Xendif
X
X
Xendprocedure
X
X
X
X
Xprocedure KEVE_MODULE_PRE_INIT
X
Xkeve$x_status_positions_enabled:= 0;
Xkeve$x_last_column:= create_array;
Xkeve$x_last_line_number:= create_array;
X
Xendprocedure
X
Xendmodule
$ CALL UNPACK STATUS.TPU;4 1830964695
$ create 'f'
Xstatus.tpu
$ CALL UNPACK STATUS_MASTER.FILE;1 5179371
$ create 'f'
XV01.000
$ CALL UNPACK STATUS_VERSION.DAT;1 774975718
$ create 'f'
X$ build == "edit/tpu/nodisplay/section=eve$section/command=sys$examples:eve$
Vbuild/noinitialization
$ CALL UNPACK BUILDKEVE.COM;9 373316859
$ v=f$verify(v)
$ EXIT

