jed-users mailing list

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

RE: Patch for %F in the statusline


> -----Original Message-----
> From: John Skilleter [mailto:John.Skilleter@xxxxxxxxxx]
> Sent: martedì 5 marzo 2002 12.15
> Subject: RE: Patch for %F in the statusline
> 
> 
> Greetings,
> 
> Actually, my original patch coped with path+filename lengths 
> of up to 255 characters because I use a small font, a large 
> screen, long paths and increased the size of the buf[] array 
> to 256 characters! ;-)
> 

I use terminals with columns varying from 110 to 150 chars. this is what my
status line looks like:
-------
-------+[1] JED 0.99.15sau1 | config.sl (SLang) "config.sl":1/659,1
[/u/lloyd1/sdi/.jed/]--------------------
-------
using " JED %v | %b (%m%a%n%o) \"%f\":%p [%d]" as status line.

> I like your idea of truncating the path, but 20 characters is 
> too short for me, and anything longer would probably be too 
> long for other people (you can please some of the people all 
> of the time....), so I think I'd have to either ask for, or 
> (if I can find the time) add the '%20D' format, so that I can 
> use '%255D' and everyone else can use '%20D'!

BTW, the idea of truncating the path is not mine, I took it from the patch
posted by Joachim Schmitz. I simply dropped the system dependent path scan.
Even for me 20 chars are too few (/home/sauro/ are already 12 chars!).
Maybe instead of add such complexity to the status line parser, we can
define a variable to let the user set the maximum length, much like
LINENUMBERS is handled.

> Also, we have potential confusion here, as I used %F for 
> 'full path & filename', but you have used (with equal 
> validity) %D for 'truncated directory'. I suppose we could 
> happily support both, of course!

I didn't add support for %F to keep the patch as smaller as possible, and
because this way you use always a pointer to already allocated buffers,
instead of copying data to a maybe too small buffer. (Yes, I use already the
buf variable when I truncate the
path, but at that time I now I will not use more that 20 characters).

> In the past, I've posted patches directly to John Davis for 
> inclusion in future releases to prevent fragmentation of the 
> JED source tree.

I prefer to post these patches here, maybe somebody else has a better idea,
or find some issues, before it goes to the standard distribution. 
Maybe John will tell us what he prefers.

Later,
					Dino

-- 
Don't worry over what other people are thinking about you. They're too busy
worrying over what you are thinking about them

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


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