No Next Item No Next Conference Can't Favor Can't Forget Item List Conference Home Entrance    Help
View Responses


Grex Info Item 105: Customizing the BBS
Entered by carl on Wed Feb 9 15:37:37 UTC 1994:

The .cfonce files are used to "customize" picospan, and I know of a
few commands that can be included in them.

Is there a list of options and/or instructions for changing .cfonce files?

Also, do you have any interesting commands or definitions in your file?

37 responses total.



#1 of 37 by kaplan on Wed Feb 9 15:43:42 1994:

New line in my .cfonce because I like to have my screen painted instead
of scrolled.  I'm not sure I'll keep it this way, but it seems OK so far.

define pager "less -c -E"


#2 of 37 by popcorn on Wed Feb 9 16:38:01 1994:

This response has been erased.



#3 of 37 by curby on Thu Apr 7 00:46:38 1994:

Alright.  I give up and am actually asking for help.  

I am trying to set up my editor definition, but it don't work.  I have the
~/.cfdir/.cfonce file, and it is system wide readable, so PicoSpan will
recognize it.  I have the definition set up, but it seems to puke
everytime that I try to use it.  The info that I get is included at the
bottom of this response.

I guess that the question that I asking is:  Does the editor definition
allow you to include a switch?  If so, how should I write the definition?

thanks for any help you can supply...


INFO:

--the error that I get----
Saved old edit buffer /home/curby/.cfdir/cf.buffer as /home/curby/cbf.007848
Can't execute "pico -t"!
Nasty return from editor: 127
Ok to enter this response?
----------END------------

-----The .cfonce file----
# here is where you can put PicoSpan customization
set stay
set edalways
define editor "pico -t"
define pager more
define qq 9 "stop"
--------END-------------



#4 of 37 by davel on Thu Apr 7 01:19:27 1994:

I don't off hand see why this doesn't work, but it sure doesn't.  If you omit
the -t (having no options), it works OK, but the problem is with the bbs,
not with pico and not with the -t option.  (At a guess, for some reason it's
trying to execute a file called    pico -t  , but that *is* a guess.)


#5 of 37 by remmers on Thu Apr 7 01:35:01 1994:

Beats me.  The "define editor" command doesn't appear to allow any
options to be specified.  I tried 'define editor "emacs -q"' and had
the same problem.  Strange, since the "define pager" command deals
with options just fine.

Workaround:  Create a "bin" directory in your home directory, put it
first on your path, and in your bin directory put the file "pt" with
contents:
                #!/bin/sh
                exec pico -t

Make it executable with "chmod +x pt".  In your .cfonce file, put the
line
                define editor pt

That should work.


#6 of 37 by davel on Thu Apr 7 10:13:08 1994:

This response has been erased.



#7 of 37 by davel on Thu Apr 7 10:20:22 1994:

Hm.  That suggestion sure didn't work.  Anyway, one correction is needed
to John's workaround:
The second line of the script John gave you should say
exec pico -t $1
(Otherwise, you won't wind up editing the response you're supposed to be
editing.)


#8 of 37 by remmers on Thu Apr 7 12:18:42 1994:

Oops, right you are.


#9 of 37 by curby on Fri Apr 8 00:35:25 1994:

I kinda figured that is what I would end up doing.  But I was hoping that
someone could point out why it doesn't work.

Hmmm... would this be what you would call a kludge?

Another thought that I had was changing my shell to /bin/csh.  I was
thinking that if I did hav picoSpan create a c-shell, that it would then
call the alias that I have set up for pine.  But that didn't seem to work,
either.  Can you think of any reason why not?


#10 of 37 by popcorn on Fri Apr 8 10:45:05 1994:

This response has been erased.



#11 of 37 by bubbles on Sat Apr 9 19:00:36 1994:

 Let's see what pico does with this response.  I don't have the -t switch
set, so it may try to create a new file.  If it does, is there a command
to read a file into a response? 


I just did a response eith pico without the -t.  It said it was writing
to cf.buffer in my directory, which may or may not have beed pulled into
this respoinse.  We'll soo see. 
(Above is a mess, but I don't feel like trying to edit it)


#12 of 37 by bubbles on Sat Apr 9 19:02:04 1994:

From the above, it looks like pico without the -t worked. 


#13 of 37 by rcurl on Sat Apr 9 19:19:07 1994:

Why did you want the -t option, anyway? (I've read the man pages on it,
but haven't had a need for that option.)


#14 of 37 by davel on Sat Apr 9 20:06:52 1994:

Right, the file Picospan sets up for your response is cf.buffer, and that
name gets passed to your editor.  I think it gets created by Picospan before
your editor is called, even if you do a set edalways.

As further evidence for the working theory: I wrote a script (along the
lines of what John suggested) and defined my editor as ./scriptname (no
arguments, mind you), and it worked OK.  (I was trying to avoid John's
suggestion of creating a directory & putting it in my path, you see.)
But this is not a good idea, because who knows where I may be when I
invoke the editor?  So I then tried $HOME/scriptname, instead - and it
bombed.  (sh is my shell, BTW.)  It appeared that Picospan is looking
for a file called scriptname in a dir called $HOME, not passing $HOME
to my shell.

Hmm.  I can test this.  <pause>
<LONG pause as Grex crashed ... not that I did it!>
Yes.  I created a dir called $HOME and a script inside it, and that got run
when I edited an item after doing define editor '$HOME/scriptname'.  I wonder
why Marcus did it that way ...


#15 of 37 by mju on Sun Apr 10 01:53:46 1994:

Because when PicoSpan executes the editor, it clearly doesn't attempt
to do ~user expansion, or variable expansion, or break the command
up into arguments.  (This is likely because doing so would require
calling a new shell, or doing a lot of the shell's parsing in
PicoSpan.)


#16 of 37 by kaplan on Sun Apr 10 05:22:22 1994:

davel's home directory is /u/davel, so what would be wrong with 
define editor/u/davel/scriptname ?


#17 of 37 by bubbles on Sun Apr 10 07:24:05 1994:

 On at least one other system I'm on users' home directories have been
moved from one parent directory to another as space filled, new disks were
added, etc., etc.  So I wouldn't put into a script anything that would be
broken if my home directory got moved to a different place in the tree. 



#18 of 37 by popcorn on Sun Apr 10 13:27:55 1994:

This response has been erased.



#19 of 37 by davel on Sun Apr 10 18:24:15 1994:

Yep.  Grex is one of those systems that has moved things around.  I know Marc
very loudly & repeatedly said that /u/userid was the form to use, and also
made links supporting some defunct forms for a *long* time, and there were
still a lot of people bemoaning broken software when some very old things
stopped being supported.  Use the /u form, OK?

One problem, though (I think), is that some programs create configuration
files in which is stored what they (the programs) think of as absolute
paths to where the user lives.  The user may be totally unaware of this, and
I think smart software doesn't, but ...


#20 of 37 by davel on Mon Apr 11 02:42:30 1994:

I just discovered that the alias (define setting) Valerie set up for rm,
namely 'rm -i', has the same problem as the 'pico -t' editor setting.
Marc, you're doubtless right - is the cost of passing things through the
user's shell high enough to make it worth putting up with not allowing
specification of arguments/options in define settings?


#21 of 37 by bubbles on Mon Apr 11 07:48:04 1994:

Some larger systems have more levels in the home directory tree.  
On Netcom my home directory in a subdirectory of u39 (or something like
that) while on The WELL my home is /home/b/u/bubbles (using a general rule
of the first two characters of the userid). 


#22 of 37 by remmers on Mon Apr 11 08:35:06 1994:

I'm still puzzled by the inconsistency that "def pager..." accepts
options but "def editor..." does not.  I currently have

        define pager "less -dE -P '-more-'"

in my .cfonce, and it works fine.


#23 of 37 by curby on Tue Apr 12 00:50:22 1994:

I assumed that it has something to do with the fact that you are piping
things into your pager command, so it doesn't need to be checked as
rigedly as you editor command.

But I would like to see Marc's answer on this one.


#24 of 37 by davel on Sat Apr 16 18:40:42 1994:

(So would I.)
BTW: If you change some of your settings from values in your .cfonce, and
then want to restore the originals (in toto), you can do
source .cfonce
to run it again.  I presume you could first do
source /bbs/rc
if you wanted to really start over, but I haven't tried that.  (I have a
twit filter set up, which I sometimes want to disable to read *one* response
or *one* item if other responses need background.  But there are plenty of
other reasons you might want to change things just for a moment.)


#25 of 37 by remmers on Sun Apr 17 09:53:02 1994:

Speaking of twit filters, I have one that's on/off switchable via
the commands "twit" and "notwit".  Check out /u/remmers/.cfdir/.cfonce
for details.


#26 of 37 by mju on Fri May 13 22:39:06 1994:

I don't know why PicoSpan does argument detection and so forth on your
pager but not your editor.  Perhaps Marcus discovered that a lot of
people wanted to specify arguments to their pager, but no one cared
about specifying arguments for the editor.  


#27 of 37 by remmers on Fri May 13 23:19:11 1994:

If he had to parse arguments for pagers, it'd be almost easier
to allow it for editors than to disallow it.


#28 of 37 by robh on Wed Jun 15 04:03:36 1994:

Is there a comprehensive list of commands which can be put
in the .cfonce file?  Should I just wander around and scan
through other peoples' .cfonce files to put one together?
(I'm trying to assemble a list for our Grex Activities Page
in Lynx.)


#29 of 37 by popcorn on Wed Jun 15 04:38:56 1994:

This response has been erased.



#30 of 37 by mwarner on Wed Jun 15 04:45:28 1994:

I've asked a similar question elsewhere.  I note your response here.  I
think I saw the list of pico items while shopping around Lynx, but can't
recall where. 



#31 of 37 by mdw on Fri Jun 17 00:03:41 1994:

"help summary" will print a concise summary of everything Picospan
understands.


#32 of 37 by rcurl on Fri Jun 17 15:14:36 1994:

Concise is right - no information on what anything *does*.


#33 of 37 by davel on Fri Jun 17 22:59:39 1994:

But the complete list is *very* useful.  Most of the commands are somewhat
mnemonic; understanding them is a lot less difficult than finding them
in the first place.

(Um.  When I just tried HELP SUMMARY I got a couple of lines at the
beginning complaining about bad file control lines.)


#34 of 37 by rcurl on Sat Jun 18 05:41:03 1994:

A lot of them have options, too, which aren't shown.


#35 of 37 by davel on Sat Jun 18 11:50:25 1994:

The point of this command is to give a complete listing of all the commands
valid from a given prompt; it's nice that it shows their valid abbreviations,
too.  The list is plenty long without trying to give any more.  From there,
you should always be able to get help on any particular command.


#36 of 37 by rcurl on Sun Jun 19 07:15:36 1994:

Well, the list is just one long, very narrow, column - they could have
used the other 80% of each line to describe the function and use. How about
editing it that way, Dave? ;-}.


#37 of 37 by davel on Sun Jun 19 19:56:47 1994:

I'm not in a position to do so, and I wouldn't if I could; it's too much
*volume* as it is.

Response not possible - You must register and login before posting.

No Next Item No Next Conference Can't Favor Can't Forget Item List Conference Home Entrance    Help

- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss