From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] How do I include text between a range of line numbers with #INCLUDE Date: Fri, 7 Jan 2011 15:32:16 +0100 Message-ID: <4DA1DC4D-3E99-4E39-8875-F379386D8CF9@gmail.com> References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=40929 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbDMa-0000Om-UM for emacs-orgmode@gnu.org; Fri, 07 Jan 2011 09:32:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PbDMZ-0004Re-CJ for emacs-orgmode@gnu.org; Fri, 07 Jan 2011 09:32:20 -0500 Received: from mail-ew0-f41.google.com ([209.85.215.41]:52077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PbDMZ-0004RS-45 for emacs-orgmode@gnu.org; Fri, 07 Jan 2011 09:32:19 -0500 Received: by ewy27 with SMTP id 27so8531367ewy.0 for ; Fri, 07 Jan 2011 06:32:18 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Puneeth Cc: Venkatesh Choppella , emacs-orgmode@gnu.org The patch looks OK to me. However, line numers are notorioously bad references.... - Carsten On Jan 7, 2011, at 8:59 AM, Puneeth wrote: > On Fri, Jan 7, 2011 at 10:03 AM, Venkatesh Choppella > wrote: >> I would like to include a part of a file (between a given range of >> line numbers) instead of the whole file. Is there a way to do that >> in >> org-mode? > > It isn't possible to include files using line numbers, as of now. > Here's a quick patch that would add this feature. I have tested it > with small files and works fine. Can somebody tell me if it looks > good? > > :lines "5-10" will include the lines from 5 to 10, 10 excluded. > :lines "-10" will include the lines from 1 to 10, 10 excluded. > :lines "5-" will include the lines from 1 to the end of the file. > > HTH, > Puneeth > lines.diff.txt>_______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten