|
|
| Author |
Message |
carl
|
|
Customizing the BBS
|
Feb 9 15: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. |
kaplan
|
|
response 1 of 37:
|
Feb 9 15:43 UTC 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"
|
popcorn
|
|
response 2 of 37:
|
Feb 9 16:38 UTC 1994 |
This response has been erased.
|
curby
|
|
response 3 of 37:
|
Apr 7 00:46 UTC 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-------------
|
davel
|
|
response 4 of 37:
|
Apr 7 01:19 UTC 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.)
|
remmers
|
|
response 5 of 37:
|
Apr 7 01:35 UTC 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.
|
davel
|
|
response 6 of 37:
|
Apr 7 10:13 UTC 1994 |
This response has been erased.
|
davel
|
|
response 7 of 37:
|
Apr 7 10:20 UTC 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.)
|
remmers
|
|
response 8 of 37:
|
Apr 7 12:18 UTC 1994 |
Oops, right you are.
|
curby
|
|
response 9 of 37:
|
Apr 8 00:35 UTC 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?
|
popcorn
|
|
response 10 of 37:
|
Apr 8 10:45 UTC 1994 |
This response has been erased.
|
bubbles
|
|
response 11 of 37:
|
Apr 9 19:00 UTC 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)
|
bubbles
|
|
response 12 of 37:
|
Apr 9 19:02 UTC 1994 |
From the above, it looks like pico without the -t worked.
|
rcurl
|
|
response 13 of 37:
|
Apr 9 19:19 UTC 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.)
|
davel
|
|
response 14 of 37:
|
Apr 9 20:06 UTC 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 ...
|
mju
|
|
response 15 of 37:
|
Apr 10 01:53 UTC 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.)
|
kaplan
|
|
response 16 of 37:
|
Apr 10 05:22 UTC 1994 |
davel's home directory is /u/davel, so what would be wrong with
define editor/u/davel/scriptname ?
|
bubbles
|
|
response 17 of 37:
|
Apr 10 07:24 UTC 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.
|
popcorn
|
|
response 18 of 37:
|
Apr 10 13:27 UTC 1994 |
This response has been erased.
|
davel
|
|
response 19 of 37:
|
Apr 10 18:24 UTC 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 ...
|
davel
|
|
response 20 of 37:
|
Apr 11 02:42 UTC 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?
|
bubbles
|
|
response 21 of 37:
|
Apr 11 07:48 UTC 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).
|
remmers
|
|
response 22 of 37:
|
Apr 11 08:35 UTC 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.
|
curby
|
|
response 23 of 37:
|
Apr 12 00:50 UTC 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.
|
davel
|
|
response 24 of 37:
|
Apr 16 18:40 UTC 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.)
|