From: kieffer@spf.trw.com (Robert Kieffer)
Subject: Re: Whither jot?
Organization: TRW Inc., Redondo Beach, CA
Date: Wed, 6 Jan 93 19:18:20 GMT

In article <1if6foINN7to@emory.mathcs.emory.edu> joe@mathcs.emory.edu (Joe  
Christy) writes:
> I've always been a fan of jot and have quite a few notes that I've
> always managed in jot. In NeXTStep 3.0, jot has vanished from
> /usr/bin, but there are the undocumented (as far as I can tell) check
> boxes in the Target Inspector Services panel of the Librarian. My
> question is how do they work? Can I emulate the old behavior of jot,
> i.e. writing a free from note into an automagically numbered file in a
> directory of my choosing, which is indexed in Librarian. I tried
> experimenting with checking the box and invoking the service from
> Edit, but as far as I can see, nothing happened.
> 
> Joe Christy   |      Head of Mathematical Computing      | Two wrongs
> joe@msri.org  | Mathematical Sciences Research Institute | don't make a  
right,
> (510)643-6069 |          1000 Centennial Drive           | but three  
lefts do
> **************|           Berkeley, CA 94720             |**************
> 

I too was a user of jot in 2.1. 'twas said to see it go.  One complaint I  
had with it, however, was that the file names (i.e. the date of creation)  
didn't tell you anything about the contents of the file... a real hassle  
when trying to clean stuff up.

The only capacity that I used jot was to copy stuff from the pasteboard  
into my JotFolder... I put together the alias and shell script below to  
emulate that functionality (and suplement it a little)

Here's how it works:

"pjot filename" - copies pasteboard into "filename" in your jot folder

"pjot index" - reindexes your jot folder

"pjot review search_string" - Lets you view all files that match the  
search string (which should have double quotes around it if it has  
wildcards in it.) Also lets you optionally rename a file. To review all  
files use:
	pjot review "*"

Hope you find this useful.

Robert Kieffer
kieffer@spf.trw.com
--------------------------- The alias ----------------------------------
alias pjot "pushd ~/JotFolder;pjot.src \!*; popd

--- pjot.src (must be in JotFolder and have executable permissions) ----
#!/bin/csh
if ($1 == "index") then
  echo "pjot: Updating index..."
  ixbuild
else if ($1 == "review") then
  foreach i ($2)
    echo "File:" $i
    echo "  Display contents [change file name]? (y or n, q to quit)"
    set answer = $<
    if ($answer == "y") then
      echo "==============================================="
      more $i
      echo "==============================================="
      echo "New name? (return = no change)"
      set newname = $<
      if ($newname != "") then
        if (-e $newname) then
          echo "Name in use. Continue? (y or n)"
          set cont = $<
          if ($cont == "y") then
            mv $i $newname
            echo "Moved $i to $newname"
          endif
        else
          mv $i $newname
          echo "Moved $i to $newname"
        endif
      endif
    else if ($answer == "q") then
      break
    endif
  end
else if (-e $1) then
  echo "pjot: Title already in use."
else
  paste > $1
endif