From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: line numbers Date: Mon, 01 May 2006 05:43:25 +0300 Organization: SunSITE.dk - Supporting Open source Message-ID: <86bquiv50y.fsf@gothmog.pc> References: <87zmi2iuhi.fsf@localhost.localdomain> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146454866 27950 80.91.229.2 (1 May 2006 03:41:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 May 2006 03:41:06 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 01 05:40:47 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FaPH8-0008B0-G0 for geh-help-gnu-emacs@m.gmane.org; Mon, 01 May 2006 05:40:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaPH8-00020N-1I for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Apr 2006 23:40:42 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!news.glorb.com!dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) Cancel-Lock: sha1:LuqbPwEiCtgkOdFnyFs0HyntWyY= Original-Lines: 22 Original-NNTP-Posting-Host: 62.103.39.226 Original-X-Trace: news.sunsite.dk DXC=KK@l@9]nJS3OVgHIS4l:13YSB=nbEKnk; ]l:<0?f@AA3L^Mj72:ak; I7eU]76nT6d; jI9i?BW\dWWoa]K9 Original-X-Complaints-To: staff@sunsite.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:139108 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:34729 Archived-At: On 01 May 2006 08:11:53 +1000, Gary Wessle wrote: > Hi > who can I place numbers of lines to the left of a paragraph so when I > copy/paste, the numbers stays with the text? I don't know if there's an easier way, but I usually filter the buffer through ``cat -n'' and copy the resulting numbered lines that I need. M-< M-> C-u M-| cat -n RET ;; beginning-of-buffer ;; end-of-buffer ;; prefix , shell-command-on-region "cat -n" When a prefix is passed to it (even an empty prefix), the shell-command-on-region command runs the shell command, passing the region as plain text input to it, and then replaces the region with the output of the shell command. - Giorgos