From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Smith Newsgroups: gmane.emacs.help Subject: Anyone have a 'move-line' function? Date: Tue, 02 May 2006 14:44:16 -0400 Message-ID: <4457A880.9000603@martnet.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1146610098 12351 80.91.229.2 (2 May 2006 22:48:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 May 2006 22:48:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 03 00:48:16 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 1Fb3fA-000367-8f for geh-help-gnu-emacs@m.gmane.org; Wed, 03 May 2006 00:48:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fb3f9-00020l-SL for geh-help-gnu-emacs@m.gmane.org; Tue, 02 May 2006 18:48:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fazr5-0004YJ-PG for help-gnu-emacs@gnu.org; Tue, 02 May 2006 14:44:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fazr3-0004XR-VT for help-gnu-emacs@gnu.org; Tue, 02 May 2006 14:44:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fazr3-0004XM-Qd for help-gnu-emacs@gnu.org; Tue, 02 May 2006 14:44:13 -0400 Original-Received: from [207.19.97.106] (helo=home.martnet.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FazrG-0000po-SW for help-gnu-emacs@gnu.org; Tue, 02 May 2006 14:44:26 -0400 Original-Received: from [127.0.0.1] (postoffice.martnet.com [207.19.97.107]) by home.martnet.com (8.13.4/8.13.4/Debian-3) with ESMTP id k42Ii3Md030208 for ; Tue, 2 May 2006 14:44:03 -0400 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.2) Gecko/20060405 SeaMonkey/1.0.1 Original-To: help-gnu-emacs@gnu.org X-Mailman-Approved-At: Tue, 02 May 2006 18:47:38 -0400 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:34753 Archived-At: I'd like a function that moves the current line up (or down) in a buffer. I just make do with kill/yank or transpose-lines, but sometimes I'd just like to hit a key and move the line, preferably without losing point. As an exercise, I played with writing such a function, and I have something that works but it turns out to be fairly tricky to get it exactly right. So if there's something already done, or I've missed something obvious (most likely), I'll study that before I keep banging away.