Subject: Samx - one more time ...

From: [email-masked] (Paul Jackson)
Date: Thu, 20 Apr 2000 22:08:30 -0400

I continue to work in my spare time (slowly) adding features
to sam+samx.

I worry that I might be "splintering" sam - creating a fork of
development off the main stream.  But so far as I can tell, no
one else is touching the code.

I'd like to openly consider desires and directions suggested
by others.  But so far as I can tell, no one else cares.

If anyone is interested, or worried, let me know.  Meanwhile, I'm
having fun adding some sugar to a really fine editor.

--

My most recent completed change is:

    This patch adds two Samkeys to push and pop the current
    Sam window, so that Samkeys macros can safely restore the
    current window after intentionally switching to another.
    This way, Samkey macros don't have to assume that they
    are only invoked in the work window, say.

I have also gotten my patches working cleanly on Linux, in
addition to Irix, where I started.

I am seeking to make this work available on SGI's Open Source
Server, http://oss.sgi.com - perhaps within the next month or
two, at the leisurely pace this is proceeding.  If anyone wants
it by other means or sooner, let me know.  Or if Bengt or anyone
objects to this, let me know.  Later on, if there is interest,
and if I get to it, I might also include this on SGI's freeware,
so that it is accessible to our Irix users as well (oss.sgi.com
is focused on Linux users).

--

My current, biased entirely to my idiosyncracies, "todo" list is:

   1) Add KD_pushwin/KD_popwin so can write Samkeys macros
      that don't assume starting in work window, but can
      always return to whatever was the starting window.
      [Done - April 17, 2000]

   2) KD_markline that extends dot to full lines, and
      that always extends right end of dot at least one char.
      Hence repeated invocations cause dot to grow forward
      by another line.

   3) KD_reverselook - search upward for dot

   4) debug loss of samterm/sam sync.

   5) package sam+samx onto http://oss.sgi.com reasonably.

   6) add samd, samb to package (for situation where
      you want to control foreground vs separate window
      display: samd invokes "sam -d", for when invoking
      from other tools that expect an editor to not fork;
      samb goes background if DISPLAY is set, else foreground,
      for when invoking from other tools that should behave
      differently depending on whether coming from the X11
      server (gfx head) or remotely (rsh/ssh/telnet/...).
      [samb, samd coded and working on March 27, 2000.
       Need to package.]

   7) Finish the above samkeys_parse stuff, and add Makefile
      that will install sam*_* scripts as part of install,
      fixing #!...perl... header along the way. [Done -
      April 14, 2000]

   8) Need updated samparse_keys, and add Makefile
      configure stuff to handle samx as part of sam-9libs.
      [Done April 13, 2000]

   9) Package as rpm (source and Linux binary) with patches
      called out.

  10) Adapt configure/Makefile.in so that it picks up X
      headers and libraries on Linux from /usr/include/X11
      (or where ever X11 headers normally go) and from
      /usr/X11R6/lib (in addition to /usr/lib for other
      libraries).

  11) Brief like Home & End key KD_BriefHome, KD_BriefEnd
      support (press Home 1, 2 or 3 times to go to beginning
      of line, page or file).

  12) Do something about undo working off screen, and not
      undoing pure motion.  As it works now, I find it
      surprising that doing (a) a change, (b) another
      change, then (c) large motion, followed by an undo
      appears to do nothing (but undoes (b)), and if the
      undo is repeated, again appears to do nothing (but
      undoes (a)).  Either motion should be considered an
      undoable event, or undo should force some part of
      what it changes on screen, or ...

  13) Redo sure would be nice, if I can learn sam well
      enough to implement it.  For one, it would help
      ameliorate the botch that I get into with item (12),
      undoing more than I realize or can easily recall.

  14) Just as with Python's Idle (at least until recent
      changes in the developers branch), it seems too easy
      to get the cursor off the command line in the sam
      window, and get confused as to what it means to
      press enter.  I'd like a tighter control by sam of
      the sam window cursor, more like working at a shell
      prompt, or at least along the lines of what I hear
      tell has recently been done to Idle to improve its
      interface there.

  15) More X11 like mouse behaviour, at least when on X11,
      would be nice.  Though its not clear I have the skills
      to implement this.  The middle mouse <exch> thing is
      a minor unpleasant complication.

  16) The Rick Davis jot (aka zip, only on Irix) editor had
      several accessible buffers for what was most recently
      entered, removed, ..., making it easy to do things like
      entering the same text in multiple places - typing it
      once, and using the mouse and Insert key to place
      duplicates of it.  I miss that.

=======================================================================
I won't rest till it's the best ...	   Software Production Engineer
Paul Jackson ([email-masked]; [email-masked]) 3x1373 http://sam.engr.sgi.com/pj

---

From: Alex Danilo <[email-masked]>
Date: Tue, 25 Apr 2000 06:59:10 -0400

>one else is touching the code.

I'm sure there are many people 'touching' the code, it's just that
there is no formalised source project base on the 'sam' distribution,
it's just an 'as-is' release.

>From what I've seen, there is a huge reluctance by the developers
(i.e. Rob) to add any 'features'.  This is in line with the original
interface which is mouse for movement, and keyboard for entry only.
It is minimalistic, and is meant to be so - things like auto-indent
were never meant to be in 'sam', it isn't a user-interface ideal.

The released code was supposed to be just that - a release, and if
you want to add stuff to it, then go for it, but it won't be part
of 'sam' proper.  I offered some simple mods to do implement cursor
keys a while ago in the comp.os.plan9 list, but no-one wanted it.

So, what I'm saying is that anything that changes 'sam' from the Lucent
release makes it not sam.  So, if you want to add 'features', that
should be done as some alternate project, like 'samx' which is of
course sam with Xtensions.

>Server, http://oss.sgi.com - perhaps within the next month or

I'd honestly consider creating a new project on SourceForge, as
that is (sort-of) vendor-neutral, and it can be maintained after
you leave SGI.

>   4) debug loss of samterm/sam sync.

This, as far as I can see is the only bad bug which exists in the
Lucent release.  If you open a big batch of files, and do something
like:

X/.*/,x/<cr>/d

to nuke carriage returns in all your source files, sam and samterm
get out of sync and barf.  This is a really nasty bug, and the Windows
version created by Sean Quinlan doesn't seem to exhibit it - so I
guess it may have been fixed internally to the Labs, but never made
it out into the public release.

By all means add new features if you wish, but it should be made a
distinct stream of development from that which we know as 'sam'.

Perhaps we could call it son-of-sam:-)

Alex
--
Alex Danilo <[email-masked]> http://www.ishtek.com/alex
PO Box 333 Forestville NSW 2087 +61-2-9975-2297