jed-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Filelist mode on VMS


Dear Terry,

actually, I am not sure whether filelist.sl will work on VMS -- I
only tested it on Unix and it interacts quite heavily with the
filesystem.

But of course I would like to see it work and will assist you in
trying to get it to...


On 12.03.06, Terrence Branscombe wrote:
> John E. Davis wrote::
> >TERRENCE BRANSCOMBE <tlbranscombe@xxxxxxx> wrote:
...
> Thanks, John.  That seems to have taken me one step closer.  Now, when I 
> start JED and specify a file, the message "listdir is undefined", 
> appears in the mini-buffer.  

Here on Linux, I get with Help>Describe Function:

   listdir: intrinsic function
   
    SYNOPSIS
     Get a list of the files in a directory
   
    USAGE
     String_Type[] listdir (String_Type dir)


so this seems to be one more of the "system functions" missing in VMS.

You could provide an ersatz definition that returns an Array of filenames
or, you could make use of the optional argument in
filelist_list_dir(filename, ls_cmd="listdir");

(You will still need a dummy definition like

 define listdir(dir) {error("listdir not defined on VMS");}

to keep the syntax checher happy.)

E.g. if I run the slang command:

M-X % get a SLang prompt

   filelist_list_dir(".", "ls")

I get a working directory listing as well, so your find_file_hook should
be something like

define filelist_find_file_hook(filename)
{
   if (file_status(filename) == 2)
     {
	filelist_list_dir(filename, "ls"); % or whatever the ls function
                                           % is called like on VMS.
	return 1; % abort hook chain, do not use the function actually called
     }
   return 0;  % try other hooks or use opening function
}

However, my suggestion would be to first try to get filelist mode working
and only if this is successfull, to add the filelist_find_file_hook().


I propose the steps:

 * Load filelist.sl in a buffer.

 * M-x evalbuffer

   the buffer will be evaluated as SLang code. If an error occures, the 
   cursor will move to the offending place.
   
   Uncommenting the line
   
   % _debug_info = 1;

   in filelist.sl and putting in your jed.rc (or evaluate from the SLang
   prompt)
   
   _traceback = 1;
   
   will help to track down errors as well.
 
 * Try the "public" functions from the minibuffer (M-x) or (if they need
   arguments) SLang prompt (M-X).

 * Report problems on the list or in a private mail to me.
 
> Following the USAGE instructions in filelist.sl and your suggestions,
> I've added the following to the end of my jed.rc file:
...

 
> () = evalfile("filelist");

This is not needed with the autoload comments below (you might keep it for
testing).
 
> #<INITIALIZATION>

This line is a preprocessor directive that lets the SLang interpreter
skip all code until
 
  #</INITIALIZATION>
  
so it must not be copied to jed.rc.  


Guenter

-- 
Milde ife.et.tu-dresden.de

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]