|
|
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.
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"
This response has been erased.
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-------------
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.)
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.
This response has been erased.
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.)
Oops, right you are.
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?
This response has been erased.
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)
From the above, it looks like pico without the -t worked.
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.)
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 ...
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.)
davel's home directory is /u/davel, so what would be wrong with define editor/u/davel/scriptname ?
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.
This response has been erased.
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 ...
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?
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).
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.
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.
(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.)
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.
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.
If he had to parse arguments for pagers, it'd be almost easier to allow it for editors than to disallow it.
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.)
This response has been erased.
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.
"help summary" will print a concise summary of everything Picospan understands.
Concise is right - no information on what anything *does*.
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.)
A lot of them have options, too, which aren't shown.
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.
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? ;-}.
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.
|
|
- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss