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

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

Re: Line Copy to Another Buffer


From: Joe Casadonte
Subject: Re: Line Copy to Another Buffer
Date: 11 Sep 2002 13:56:28 -0400
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2

On Tue, 10 Sep 2002, Kai Gro├čjohann wrote:

> Hm?  It's almost impossible to copy the line to another buffer
> without using the region (or a region-like feature).
>
> (defun art-copy-line ()
>   (interactive)
>   (append-to-buffer "COPY-BUFFER" (line-beginning-position)
>                                   (line-end-position)))

Through a save-excursion around that and you're set.

I have some crude code that does cut-copy-paste on the current region
or the current line, if there's no region (assumes transient-mark-mode
is on and mark-even-if-inactive is nil).  If anyone's interested, let
me know.

--
Regards,

joe
Joe Casadonte
address@hidden

------------------------------------------------------------------------------
         Llama Fresh Farms => http://www.northbound-train.com
   Gay Media Resource List => http://www.northbound-train.com/gaymedia.html
            Perl for Win32 => http://www.northbound-train.com/perlwin32.html
               Emacs Stuff => http://www.northbound-train.com/emacs.html
          Music CD Trading => http://www.northbound-train.com/cdr.html
------------------------------------------------------------------------------
                       Live Free, that's the message!
------------------------------------------------------------------------------


reply via email to

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