edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] file attributes on directory scan.
@ 2015-09-24 17:43 Karl Dahlke
  2015-09-25  0:16 ` Kevin Carhart
  2015-09-25 22:31 ` Adam Thompson
  0 siblings, 2 replies; 3+ messages in thread
From: Karl Dahlke @ 2015-09-24 17:43 UTC (permalink / raw)
  To: Edbrowse-dev

Ok, lsl lists the length of the file on the current line
in directory mode, but ls=l fetches the length of every file
in subsequent directory scans.
See the documentation for more details.
Browsed usersguide line 1072.

As mentioned earlier, I had to muck with the code in many places.
reading or writing a file, a directory, what was a directory into a file,
or into another session, or reading another session into this one,
maybe it was a directory listing maybe not,
and so on.
After a day or so of work I thought I had it all working,
I made one tiny change to buffers.c, and wrote the file, and file write failed.
I had broken something, badly!
buffers.c was now 13 bytes long, and all my work was lost.
It's amazing how we rely on this program,
and how frightening when it doesn't work.
So I had lost all that effort, or had I?
All the new software was still in the buffer, I just couldn't write it anywhere.
But I could print it, and I have a linear adapter.
My linear "screen" is smaller than buffers.c, so I printed the first 2000 lines,
then saved the screen to a temp file,
then the next 2000, and so on,
and then I put the files together and reproduced buffers.c.
Holy crap!
Course printing turned tabs into spaces, so I had to run it through indent again.
My file was back!
Always best if you don't panic.
Finally I used ed to find and fix the writing bug,
wrote bufffers.c, recompiled, tested, and it seems to work again.
But wow!

Always keep backups of your work or important files,
even just a few hours work, copy the file to /tmp or something just to be safe.

Anyways, try setting
ls=st
or some such and edit a directory.
Honestly I probably won't use this full scan feature very often,
too much clutter for me,
but sometimes I just want to know the size or time of one of the files in my listing,
and I can use lss or lst for that, and that meets my needs.

Karl Dahlke

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Edbrowse-dev] file attributes on directory scan.
  2015-09-24 17:43 [Edbrowse-dev] file attributes on directory scan Karl Dahlke
@ 2015-09-25  0:16 ` Kevin Carhart
  2015-09-25 22:31 ` Adam Thompson
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Carhart @ 2015-09-25  0:16 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: Edbrowse-dev



> Always keep backups of your work or important files,
> even just a few hours work, copy the file to /tmp or something just to be safe.

Amen


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Edbrowse-dev] file attributes on directory scan.
  2015-09-24 17:43 [Edbrowse-dev] file attributes on directory scan Karl Dahlke
  2015-09-25  0:16 ` Kevin Carhart
@ 2015-09-25 22:31 ` Adam Thompson
  1 sibling, 0 replies; 3+ messages in thread
From: Adam Thompson @ 2015-09-25 22:31 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]

On Thu, Sep 24, 2015 at 01:43:01PM -0400, Karl Dahlke wrote:
> Ok, lsl lists the length of the file on the current line
> in directory mode, but ls=l fetches the length of every file
> in subsequent directory scans.
> See the documentation for more details.
> Browsed usersguide line 1072.

Sounds interesting.

> As mentioned earlier, I had to muck with the code in many places.
> reading or writing a file, a directory, what was a directory into a file,
> or into another session, or reading another session into this one,
> maybe it was a directory listing maybe not,
> and so on.
> After a day or so of work I thought I had it all working,
> I made one tiny change to buffers.c, and wrote the file, and file write failed.
> I had broken something, badly!
> buffers.c was now 13 bytes long, and all my work was lost.
> It's amazing how we rely on this program,
> and how frightening when it doesn't work.

Definitely.

> So I had lost all that effort, or had I?
> All the new software was still in the buffer, I just couldn't write it anywhere.
> But I could print it, and I have a linear adapter.
> My linear "screen" is smaller than buffers.c, so I printed the first 2000 lines,
> then saved the screen to a temp file,
> then the next 2000, and so on,
> and then I put the files together and reproduced buffers.c.
> Holy crap!
> Course printing turned tabs into spaces, so I had to run it through indent again.
> My file was back!

Points for much creativitiy here...

> Always keep backups of your work or important files,
> even just a few hours work, copy the file to /tmp or something just to be safe.

Definitely, and save often when working (I always forget that one).

> Anyways, try setting
> ls=st
> or some such and edit a directory.
> Honestly I probably won't use this full scan feature very often,
> too much clutter for me,
> but sometimes I just want to know the size or time of one of the files in my listing,
> and I can use lss or lst for that, and that meets my needs.

Will have to play with this.

Cheers,
Adam.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-25 22:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-24 17:43 [Edbrowse-dev] file attributes on directory scan Karl Dahlke
2015-09-25  0:16 ` Kevin Carhart
2015-09-25 22:31 ` Adam Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).