From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel Subject: Re: feature request: view part of file Date: Sat, 19 Jan 2013 00:30:38 +0100 Organization: EUR Message-ID: <877gnakr1d.fsf@gmail.com> References: <87lijrszn0.fsf@gnu.org> <87y5npeg4p.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358551859 15311 80.91.229.3 (18 Jan 2013 23:30:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jan 2013 23:30:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: sds@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 19 00:31:18 2013 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 1TwLOw-0001BD-Tl for ged-emacs-devel@m.gmane.org; Sat, 19 Jan 2013 00:31:11 +0100 Original-Received: from localhost ([::1]:50514 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwLOg-0005i0-7v for ged-emacs-devel@m.gmane.org; Fri, 18 Jan 2013 18:30:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwLOc-0005hg-Eu for emacs-devel@gnu.org; Fri, 18 Jan 2013 18:30:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwLOZ-0005pi-6F for emacs-devel@gnu.org; Fri, 18 Jan 2013 18:30:50 -0500 Original-Received: from mail-wi0-f175.google.com ([209.85.212.175]:55907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwLOV-0005oO-Mg; Fri, 18 Jan 2013 18:30:43 -0500 Original-Received: by mail-wi0-f175.google.com with SMTP id hm11so5634284wib.8 for ; Fri, 18 Jan 2013 15:30:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:organization:references:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=6fxi8d2hGuLExcUhk5U/IBqUSFVmax7gsSvXXqQ0FYU=; b=UQREAVnWnyxD9RE39ZX86G+1ojs8UuS17Icm8kSOK3BzAofjizJ2389HY2qAn+cpeX M8YrFX4et+m/9P7FvrzKk6VzzlVPHHaVPZK/N7Bz2oa9/Rz2BUjMOjzXemBjzKR4qkkq CypbZZURiNa7+hgKC4X/FcmXJxkzmc5vGa+bfbNM/0Cn77oGYrOUFocWBD87wQW1jobR flqEVf6/inqBFaoEUwGG+CcCUDxF5fxyfsCPxXWORb/3wcTrIwygveWFWmOsYUT9Y/1u xYoj+JxIwXr3ZFoJ5J0gEyBTEzkSjjYNhLOv3Fjor46pBuIiaEzEcWma9vBoackX/YqY /gfg== X-Received: by 10.180.85.165 with SMTP id i5mr6056373wiz.11.1358551842325; Fri, 18 Jan 2013 15:30:42 -0800 (PST) Original-Received: from localhost (i108036.upc-i.chello.nl. [62.195.108.36]) by mx.google.com with ESMTPS id w5sm5663367wif.11.2013.01.18.15.30.40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 18 Jan 2013 15:30:41 -0800 (PST) In-Reply-To: <87y5npeg4p.fsf@gnu.org> (Sam Steingold's message of "Thu, 14 Jun 2012 17:29:58 -0400") User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.2.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.212.175 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:156463 Archived-At: >> Sam Steingold >> on Thu, 14 Jun 2012 17:29:58 -0400 wrote: > 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. It doesn't work for me. vlf-next-batch pops: Debugger entered--Lisp error: (wrong-type-argument file-offset 2048.0) insert-file-contents("/home/vitoshka/test/foo.csv" nil 1024 2048.0) vlf-next-batch(nil) call-interactively(vlf-next-batch nil nil) Would be nice to actually write the batch into a local file and put the buffer into the appropriate mode. So if the file is csv I view it in csv-mode. Then get a special command to write the contents into the original file. The dired integration could be improved by making it pop into vlf mode whenever the file exceeds some user specified size. Vitalie > 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).