🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11689

Re: Half-baked Ideas, New Projects

#11689
From: Eric J. Kennedy
Date: Mon, 06 Mar 1989 01:00
117 lines
5525 bytes
In article <15381@cup.portal.com> Classic_-_Concepts@cup.portal.com writes:
>    I tend to type fast (83+ on a broken-down Selectric, 90++ on a word-
>processor), but even that isn't fast enough to keep up with thought processes
>(I get frustrated trying to write stories, journals, etc. because I lose the
>thought by the time my fingers catch up).  It occurred to me that probably
>everyone would like to be able to type/write faster, especially hunt-and-
>peckers and that the computer offers an unprecedented opportunity to provide
>a way to do this within an editor or wordprocessor.  Here is the idea:
> 
>     Remember speed-writing?  The alternative to cryptic shorthand languages?
> 
>     Well, why not implement a form of speed-writing within a word-processor?
>you could have a dictionary of short forms of words similar to speed-writing
>abbreviations which would be then parsed out, either:

Some interesting ideas, here.  UN*X vi does some of this, with its
abbreviation capability.  I've added this capability to Uedit as part of
my vi emulator.  It's done with Uedit's "preKey" command.  The "preKey"
command is executed every time you press a key (or a mouse button or
select a menu item), *before* the command bound to the key is executed.
It's not difficult to test for the end of a word, copy the word into a
buffer, look for the word in a list of abbreviations, and make the
substitution if its found.  I also use Uedit's spelling checker on the word
for real time spell checking, while I'm at it.

I think Uedit would be an excellent test bed for ideas like yours, if
not for a final system.  You can remap the keyboard at will; use the
ideas below to make templates, abbreviations, whatever;  you can even
use an internal timer to execute commands after certain periods of
delay.

The preKey command below is straight from my custom configuration.  It
looks for a list of abbreviations and expansions in buffer 32 of the form

abv abbreviation
csa comp.sys.amiga
cats Commorodore Amiga Technical Support

etc.

It obviously doesn't do all of what you're asking for,  but it's a step
in the right direction.

To experiment with this, you either need to be using the spell-checking version of Uedit, or modify the command to skip the spell-checking stuff.

----------------

<preKey:
   .. Uncomment the next two lines when debugging a preKey command!
   .. if (eqNum(macroNum,shftAltCtl-esc)) killKey(preKey)      .. ESCAPE HATCH!
   .. if (eqNum(macroNum,shftAltCtl-esc)) killKey(virtual-kp2) .. ESCAPE HATCH!

        if (not spellerUp) if(isEmpty(buf32)) return
        if (eqNum(inputChar,0)) return       .. do not mess up scrolling etc!
        if (eqNum(macroNum,65)) return       .. do not test when backspacing!
        
        or(n50,inputchar,32)
        if(geNum(n50,97)) if(geNum(122,n50)) return  ..return if alpha
        if(eqNum(inputChar,"'")) return
        if(is(curFile,alpha)) return

        equateLoc(curFile,locA,atCursor)                  .. save cursor loc
                                      .. is not alpha, check preceding word
        clearRgn(buf54,all)               .. erase last word from buffer
        moveCursor(curFile,sWord) .. move cursor to start of word to chk
        
        if(moveCursor(curFile,sChar))     ..Do not flag words that begin
          if(is(curfile,"\\"))            ..with \, for tex commands.
          {
            equateLoc(curFile,atCursor,locA)     .. put cursor back where it was
            return
          }
          else
            moveCursor(curFile,eChar)
        
        insertRgn(buf54,sFile,curfile,word)    .. store just that 1 word
        insertChar(buf54," ")                 ..add space at end of word
        moveCursor(buf54,sFile)              .. so speller sees the word
        insertChar(buf54,eLine)                 ..add return before word

        .. Now word is bracketed by a carriage return and a space.
        .. This is for matching abbreviations in buf32, and it does not
        .. effect spell checking.
        
        if(isEmpty(buf32))
            goto label(1)
        if(not getFlag(curFile,userLocalB))
            goto label(1)
        moveCursor(buf32,sFile)
        setSearch(buf54)
        if(search(buf32,locA,locB,1))
        {
            moveCursor(buf32,eWord)
            moveCursor(buf32,eChar)
            equateLoc(buf32,locA,atCursor)
            moveCursor(buf32,eLine)
            equateLoc(buf32,locB,atCursor)
            clearRgn(curFile,word)
            insertRgn(curFile,atCursor,buf32,loc)
            goto label(99)  ..do not spell check replacements
        }

        label(1)
        if(spellerup) if (not spell(buf54))       .. bad word
        { 
            beepDisplay
            putMsg(buf54)
        }
        
        label(99)
        equateLoc(curFile,atCursor,locA)     .. put cursor back where it was
>


-- 
Eric Kennedy
ejkst@cisunx.UUCP
Technical Details
Message-ID: <16458@cisunx.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!rochester!pt.cs.cmu.edu!cadre!pitt!cisunx!ejkst
References: <10642@well.UUCP> <15381@cup.portal.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!rochester!pt.cs.cmu.edu!cadre!pitt!cisunx!ejkst
From: ejkst@cisunx.UUCP (Eric J. Kennedy)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Half-baked Ideas, New Projects
Message-ID: <16458@cisunx.UUCP>
Date: 6 Mar 89 01:00:23 GMT
References: <10642@well.UUCP> <15381@cup.portal.com>
Reply-To: ejkst@unix.cis.pittsburgh.edu (Eric J. Kennedy)
Organization: Univ. of Pittsburgh, Comp & Info Sys
Lines: 117