help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: line numbers


From: Giorgos Keramidas
Subject: Re: line numbers
Date: Mon, 01 May 2006 05:43:25 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix)

On 01 May 2006 08:11:53 +1000, Gary Wessle <phddas@yahoo.com> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]