Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!batcomputer!itsgw!steinmetz!uunet!eda!jim From: jim@eda.com (Jim Budler) Newsgroups: comp.sources.d Subject: Re: less v97 edit +linenumber Message-ID: <236@eda.com> Date: 9 Oct 88 20:13:31 GMT References: <159@libove.UUCP> <9755@cup.portal.com> Reply-To: jim@.eda.com (Jim Budler) Organization: EDA Systems,Inc. Santa Clara, CA Lines: 42 In article <9755@cup.portal.com> DMasterson@cup.portal.com writes: ||Less v73 would only give to +linenumber argument to the editor if the ||editor was vi or ex, but v97 gives it anyway, and in the case of (the ||admittedly brain damaged) microemacs (v3.9e) the command "emacs +l f" ||edits two files, +l and f, and only starts the display screen with +l ||open. || ||Does anyone have a fix for this? (or know what file I should hack ||through?) Thanks- || |The simple fix is to build a shell script front end to emacs that converts |the '+1' argument into a '-g1' argument and then execs the real emacs. It |slows it down a little, but not that much. Benefit is that you get less |interfaced to emacs just like it would be to vi. |David Masterson |DMasterson@cup.portal.com I did this in a very fast quick and dirty way, and I am sure I will be told many, many things which are wrong about the following script, but it fixes the problem. --------------------- ----------------------- : This is a shar archive. Extract with sh, not csh. : The rest of this file will extract: : em echo extracting - em sed 's/^X//' > em << '!EOR!' X#! /bin/sh Xif [ $# -gt 1 ];then Xgoto=$1 Xcase "$1" in X +*) goto=`echo "$1" | sed s/+/-g/` ;; Xesac Xexec /usr/local/bin/em.exe $goto $2 $3 $4 $5 $6 $7 $8 $9 Xelse Xexec /usr/local/bin/em.exe $1 Xfi !EOR! exit -- uucp: {decwrl,uunet}!eda!jim Jim Budler internet: jim@eda.com EDA Systems, Inc.