patchGNU nano - Patches: patch #6770, Transparent GZip...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

patch #6770: Transparent GZip decompression/recompression

Submitted by:  Dave Lemonby <dreamlax>
Submitted on:  Mon 09 Mar 2009 01:41:37 AM UTC  
 
Category: NonePriority: 5 - Normal
Status: Wont DoPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Release: None

Tue 08 Apr 2014 12:51:21 PM UTC, comment #2:

Hello Dave,

Thanks for the submission, but... couldn't this be achieved by aliasing 'nano' to a script that does the gzip detection and then the possibly needed decompression and recompression?

Also, seeing that this is not really a patch but a tarball of files, I'm going to close this.

Benno Schulenberg <bens>
Project Member
Mon 09 Mar 2009 03:32:16 AM UTC, comment #1:

Just to add, there seems to be a small bug that outputs an error message despite successfully writing a compressed file (it is printed to stderr from somewhere).

Also, I forgot to change back the various "Error writing %s: %s" strings in files.c, which I changed for debugging purposes.

Dave Lemonby <dreamlax>
Mon 09 Mar 2009 01:41:37 AM UTC, original submission:

I frequently open gzipped files (PPD files on Mac OS X) and find it frustrating to have to gunzip them and gzip them back up so I added transparent gzip decompression to nano. It's not perfect because I threw it together in about 30 minutes, but it works well for me and I have not yet encountered any issues. It will also ignore the .gz extension when determining colour syntax highlighting.

Files that are opened up and are gzipped files decompress straight into nano's buffer. When saving, they are recompressed again using gzwrite and maximum compression level.

Files that are opened up and are not gzipped files behave like normal.

I'm submitting this in case you find it useful or think it may be useful for other people. Maybe adding an option in the RC if necessary?

These files were taken from 2.1.9.

Cheers,
Dave.

Dave Lemonby <dreamlax>

 

Attached Files
file #17622:  gzip-nano.tar.gz added by dreamlax (173kB - application/gzip - updated src files and configure.ac)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Posted a comment)
  • -unavailable- added by dreamlax (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 08 Apr 2014 12:51:21 PM UTCbensStatusNone=>Wont Do
      Open/ClosedOpen=>Closed
    Mon 09 Mar 2009 01:41:37 AM UTCdreamlaxAttached File-=>Added gzip-nano.tar.gz, #17622

    Back to the top


    Powered by Savane 3.1-cleanup