From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: feature request: view part of file Date: Thu, 14 Jun 2012 17:29:58 -0400 Organization: disorganization Message-ID: <87y5npeg4p.fsf@gnu.org> References: <87lijrszn0.fsf@gnu.org> Reply-To: sds@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1339709436 28127 80.91.229.3 (14 Jun 2012 21:30:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2012 21:30:36 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 14 23:30:35 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SfHch-0007ST-3w for ged-emacs-devel@m.gmane.org; Thu, 14 Jun 2012 23:30:35 +0200 Original-Received: from localhost ([::1]:57234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfHch-0003s4-1J for ged-emacs-devel@m.gmane.org; Thu, 14 Jun 2012 17:30:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfHcN-0003M9-6Q for emacs-devel@gnu.org; Thu, 14 Jun 2012 17:30:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfHcL-0005HX-Dq for emacs-devel@gnu.org; Thu, 14 Jun 2012 17:30:14 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:51385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfHcL-0005HQ-7C for emacs-devel@gnu.org; Thu, 14 Jun 2012 17:30:13 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SfHcI-0006GN-0d for emacs-devel@gnu.org; Thu, 14 Jun 2012 23:30:10 +0200 Original-Received: from cl-pat-tr.clearspring.com ([8.18.54.254]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Jun 2012 23:30:09 +0200 Original-Received: from sds by cl-pat-tr.clearspring.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Jun 2012 23:30:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cl-pat-tr.clearspring.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Cancel-Lock: sha1:VRdXTQ7m3D0dn3s8SgyQGoB7b5c= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150951 Archived-At: > * Sam Steingold [2012-06-13 16:52:35 -0400]: > > Sometimes I want to __VIEW__ a huge file and I get > > File ZZZ is large (1645MB), really open? (y or n) n > abort-if-file-too-large: Aborted > > What I want is another option, in addition to y/n: > open a part of the file. I put vlf.el by Mathias into elpa. I rewrote it almost completely (bzr still has the original version at revno 233). it works for me. I wish I knew how to hook it into files.el, but I don't... vlf.el has 2 issues: 1. insert-file-contents hangs emacs (see `vlf-next-batch'): ;; replacing `erase-buffer' with replace arg to `insert-file-contents' ;; hangs emacs (unless append (erase-buffer)) (insert-file-contents buffer-file-name nil vlf-end-pos end) 2. I have this: (define-key map [C-+] 'vlf-change-batch-size) When I do C-+ (by pressing Ctrl, Shift, and the "+=" key to the left of backspace), I get "C-+ is undefined". when I do M-x vlf-change-batch-size RET, I get "You can run the command `vlf-change-batch-size' with " The "+" in both messages is the same character (43, #o53, #x2b). -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000 http://www.childpsy.net/ http://camera.org http://openvotingconsortium.org http://honestreporting.com http://memri.org If you will not bring your husband coffee in bed, his day may start with a beer.