jed-users mailing list

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

Re: wbf -- window/buffer/file functions


On Thu, Aug 07, 2003 at 01:35:57PM -0400, John E. Davis wrote:
> Dave Kuhlman <dkuhlman@xxxxxxxxxxxxxxx> wrote:
> >Apparently, on my system, getbuf_info returns the full path and
> >file name for both path and name.  Is that the correct behavior?
> 
> No.  Are you sure that this is happening?  It seems to me like many
> things would fail if this were the case.  Please save the following to
> a file, e.g., test.sl, and run jed via 'jed --script /tmp/test.sl':
> 
>   static variable file, dir;
>   () = read_file (__FILE__);
> 
>   (file, dir,,) = getbuf_info ();
>   vmessage ("__FILE__ = '%s'\nfile = '%s'\ndir = '%s'\n", 
>             __FILE__, file, dir);
>   exit (0);
> 
> You should see something like:
> 
>   __FILE__ = '/tmp/test.sl'
>   file = 'test.sl'
>   dir = '/tmp/'

You are correct.  I do get something like that.  So, getbuf_info()
seems good.

Oh.  Maybe their *order* is wrong.

OK.  So, then I'm going to suggest to Klaus that reverse the order
of concatenating directory and file name (use "d+b" instead of
"b+d").  Here is the change:

    --- ffx_old.sl  2003-08-07 08:33:50.000000000 -0700
    +++ ffx.sl  2003-08-07 13:42:46.000000000 -0700
    @@ -391,7 +391,7 @@
             (b,d,,)= getbuf_info( whatbuf());
             if ( b != "")
               {
    -             ()= write_buffer( b+d);
    +             ()= write_buffer(d + b);
                  return;
               }
             w= "write_buffer";

That works.  But, I don't know why this was not a problem for
Klaus.

And, thanks again to Klaus for cool stuff.  It really does make
switching between buffers and finding an loading files more
convenient.

Dave

-- 
Dave Kuhlman
dkuhlman@xxxxxxxx
http://www.rexx.com/~dkuhlman

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


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