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: Kevin Rodgers
Subject: Re: Line Copy to Another Buffer
Date: Wed, 11 Sep 2002 17:23:39 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Joe Casadonte wrote:

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.


Why is that necessary?  The line-*-positions don't affect point, and
append-to-buffer doesn't select the COPY-BUFFER buffer.

--
Kevin Rodgers <address@hidden>



reply via email to

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