From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Andrus Newsgroups: gmane.emacs.devel Subject: Re: line-move-down-up Date: Tue, 19 Apr 2011 10:20:37 +0200 Message-ID: <86A92122-FB88-43D9-B187-423835B6F671@gmail.com> References: <87fwpfpr7e.fsf@uwakimon.sk.tsukuba.ac.jp> <87d3kjpnef.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-5-624007235 X-Trace: dough.gmane.org 1303201257 22521 80.91.229.12 (19 Apr 2011 08:20:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 19 Apr 2011 08:20:57 +0000 (UTC) To: Emacs Dev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 19 10:20:53 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QC6B0-0001M6-7L for ged-emacs-devel@m.gmane.org; Tue, 19 Apr 2011 10:20:50 +0200 Original-Received: from localhost ([::1]:58991 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QC6Az-0002lf-Ho for ged-emacs-devel@m.gmane.org; Tue, 19 Apr 2011 04:20:49 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:47617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QC6Av-0002lP-7J for emacs-devel@gnu.org; Tue, 19 Apr 2011 04:20:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QC6At-00070t-PA for emacs-devel@gnu.org; Tue, 19 Apr 2011 04:20:45 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:49621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QC6At-00070e-Er for emacs-devel@gnu.org; Tue, 19 Apr 2011 04:20:43 -0400 Original-Received: by bwz17 with SMTP id 17so5350935bwz.0 for ; Tue, 19 Apr 2011 01:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:mime-version:content-type:subject:date :in-reply-to:to:references:message-id:x-mailer; bh=aKWRpblRJOH+nK2r5KOEvPCcyTEG70i8j4v8NfYJUrg=; b=gDw1KZzoS8erggh4SCBwvcb1geyKnnYHMoNyVJTOF4SKV2elWom9ToV/lweO7SNK+I tss2kISr5vdED7q5LQ2SlyHwsZz8hBYnxCsXBZF9zX9pnNoa5mz/nR4aka2+DNvpjMgz pf6dMGGtPOIaGB8JcLs+xunkROd3zpI3fgiw0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; b=j4vuBIEFP3aNfUMXHek7SykLmQ1w1UGewTbWKKM0hhYdEXf8Cms+RdsErj3iyllE8b QtJEftf/D4EPZ3yg5its7SuiFZdTgQyRARLDy3DPYp5xxoMC89ClzhuBUS6mK0zIEgtt dC/Rx9uvUoualijRNtojypfC/F77dUFLj5q1s= Original-Received: by 10.204.25.20 with SMTP id x20mr2221627bkb.112.1303201241024; Tue, 19 Apr 2011 01:20:41 -0700 (PDT) Original-Received: from [10.0.2.16] (catv-80-98-187-105.catv.broadband.hu [80.98.187.105]) by mx.google.com with ESMTPS id t1sm3674340bkx.7.2011.04.19.01.20.38 (version=SSLv3 cipher=OTHER); Tue, 19 Apr 2011 01:20:39 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1084) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:138569 Archived-At: --Apple-Mail-5-624007235 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Apr 18, 2011, at 5:56 PM, Alin Soare wrote: > 2011/4/18 Stephen J. Turnbull > Alin Soare writes: >=20 > > > look better: > > > > (define-key global-map [(meta up)] (lambda (&optional n) = (interactive "P") > > (line-move-down (if (numberp n) (- n) -1)))) >=20 > Yeah, sorry about that. >=20 > > But, yes. You are right. > > > > Transpose-lines does the job, but not as I wish. >=20 > Of course it doesn't. All defaults suck for somebody. That's what > .emacs is for. >=20 > If you want to impose the burden of maintenance on the team, you need > to explain why your version is an improvement for a lot of people. >=20 > I used the meta + up-down, using the model of spreadsheets of = org-mode, that I use. It is the most convenient conbination for me. >=20 > If I use C-x C-t, the cursor goes down, while the line goes up. I = cannot move the line the second time. >=20 > And this only transposes the line, not move the line. >=20 > I need move, not transpose, and I cannot find this in emacs. I also use this functionality, but I get it from drag-stuff.el (not = written by me) which has the advantage of being on = http://tromey.com/elpa/ . It also has functionality for dragging words = and region, though I rarely use it. The only problem it has (for me) is = that it interferes with org-mode's M-up/down, but you can fix that by = setting `drag-stuff-except-modes'. I have thought about adding the ability to drag defun's and such, but so = far haven't taken the time. -Ivan= --Apple-Mail-5-624007235 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
On Apr 18, 2011, at 5:56 PM, Alin Soare wrote:

2011/4/18 Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
Alin Soare writes:

 > > look better:
 >
 > (define-key global-map [(meta up)] (lambda (&optional n) (interactive "P")
 > (line-move-down (if (numberp n) (- n) -1))))

Yeah, sorry about that.

 > But, yes. You are right.
 >
 > Transpose-lines does the job, but not as I wish.

Of course it doesn't.  All defaults suck for somebody.  That's what
.emacs is for.

If you want to impose the burden of maintenance on the team, you need
to explain why your version is an improvement for a lot of people.

I used the meta + up-down, using the model of spreadsheets of org-mode, that I use. It is the most convenient conbination for me.

If I use C-x C-t, the cursor goes down, while the line goes up. I cannot move the line the second time.

And this only transposes the line, not move the line.

I need move, not transpose, and I cannot find this in emacs.

I also use this functionality, but I get it from drag-stuff.el (not written by me) which has the advantage of being on http://tromey.com/elpa/ .  It also has functionality for dragging words and region, though I rarely use it.  The only problem it has (for me) is that it interferes with org-mode's M-up/down, but you can fix that by setting `drag-stuff-except-modes'.

I have thought about adding the ability to drag defun's and such, but so far haven't taken the time.

-Ivan
--Apple-Mail-5-624007235--