Hi Jürgen )copy ws fns with ws created from )save → ws.xml file overwrites the fns which i think is the correct behavior
)copy fns with fns a text file created with !# on first line - (variant of )dump file) overwrites variables but opens the ∇ editor for and appends the lines in the existing function - i can understand this situation it is probably just cating the text file into the workspace as if it was a paste - but it should overwrite the fns like )copy ws object - but I don't see how 'fixing' )copy fns could be done without a lot coding work - so it might be easier to just delete the fns with ⎕ex and then do the copy - is there a posssibility to have a ⎕cp function that is basically just the )copy but can be run from inside a fns? ⎕fx 'copy' ')copy' of course doesn't work enztec On Sat, 26 Apr 2014 12:08:14 +0200 Juergen Sauermann <juergen.sauerm...@t-online.de> wrote: > Hi, > > the )COPY of text files is pretty new, so we have not much experience > with it yet. It is a pretty nice feature and coupled with the FILE_IO use for using vi (see the the code below) I now have a perfect apl fns editor set up and might be worth the effort to just make the ⎕cp and put the full code into a ⎕edit fns? I still do ∇fns[1⎕10] without thinking to edit line 1 > > I could make the ∇-editor aware that a )COPY is in progress and that > functions shall be > deleted automatically by the ∇-editor. I actually have used the 'feature' of just 'cating' the new fns at the end of the existing fns to check coding - so making a ⎕cp would be best i think and leave the )copy fns the way it is > > /// Jürgen > > > On 04/26/2014 03:08 AM, enz...@gmx.com wrote: > > I delete the email addresses from the replies i don't know if it is even > > needed to do that > > > > I've put together the following based on Jurgen's info about )copy > > text_file (with !# in first line) for editing fns outside of the workspace > > with vi > > > > one problem? i've found is - if the fns already exists then )copy text_file > > with it in it causes not overwriting but addition addition to it - i guess > > the way it works is the ∇ opens the file and accepts new input... > > > > okay so that is why i use > > > > ⎕ex 'ai' (run manually - i will put this into the edit fns after i can > > copy the text file in - in the fns > > then the following 'edit fns' > > > > #! edit > > > > ∇rs←edit fn;fp > > 'lib_file_io.so' ⎕FX 'FILE_IO' > > ⍝ ]XTERM OFF this was needed at one time run in ws(gives error if run > > here though) during dev of this so i left it but doesn't seem to be needed > > any more > > fp←'r' FILE_IO[24] 'vi workspaces/',fn,' < `tty` > `tty`' > > FILE_IO[25] fp > > ⍝ ⎕ex fn > > ⍝ ⎕cp fn need dev of > > ∇ > > > > edit 'a1' > > you can put vars and fns in a1 > > > > )copy ai > > > > > > On Sat, 26 Apr 2014 08:38:40 +0800 > > Elias Mårtenson <lokedhs> wrote: > > > >> There isn't, but implementing it is possible in APL itself. To my knowledge > >> this has not been done yet. > >> > >> Regards, > >> Elias > >> On 26 Apr 2014 07:16, <enztec> wrote: > >> > >>> I've found ⎕ex that can used in a function since )erase can't so is there > >>> a suitable ⎕cp for )copy - i've looked in all the .def files and blown up > >>> many a ws trying to find it so any help would be appreciated - also is > >>> there a list of all the ⎕ commands - i'd be glad to write up a simple > >>> usage > >>> file for them > >>> > >>> btw this is like the 4th post - if it gets no response i won't post any > >>> more > >>> > >>> > > >