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

 
 

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

patch #6770: Transparent GZip decompression/recompression

Submitter:  Dave Lemonby <dreamlax>
Submitted:  Mon 09 Mar 2009 01:41:37 AM UTC
   
 
Priority:  5 - Normal Status:  Wont Do
Privacy:  Public Assigned to:  None
Open/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>
Group administrator
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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #17622:  gzip-nano.tar.gz added by dreamlax (173KiB - 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
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by dreamlax (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-04-08 bens StatusNone Wont Do
        Open/ClosedOpen Closed
    2009-03-09 dreamlax Attached File- Added gzip-nano.tar.gz, #17622

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code