unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: liyer.vijay@gmail.com
Subject: Re: Anyone have a 'move-line' function?
Date: 4 May 2006 17:09:18 -0700	[thread overview]
Message-ID: <1146787758.256891.60790@j33g2000cwa.googlegroups.com> (raw)
In-Reply-To: <mailman.1411.1146756636.9609.help-gnu-emacs@gnu.org>

Joe Smith wrote:
> Mathias Dahl wrote:
> > The following is quite ugly but seems to work. ...
>
> liyer.vijay@gmail.com wrote:
> > Here's a solution that doesn't add to the kill-ring ...
>
> Here's what I came up with--after studying your suggestions and
> adapting what I had; Vijay's is simpler but it goes a little weird at
> the file edges: moving the last line down adds empty lines; moving the
> first line up gives an error and leaves point on line 2.

Yes, I noticed that myself today.  transpose-lines has weird behaviour
at the end of the buffer: with one argument, it correctly transposes
but adds a newline.  With a prefix argument, it completely weirds
everything out.  I didn't know about this earlier.

> Thanks again. Comments/corrections welcome.
>
> delete-and-extract-region

This is a function I hadn't known about.  Thanks :-)

Cheers
Vijay

> Can we quote you on that?
A long time ago, someone in the Lisp industry told me it was poor form
quote people; it suggests that they lack value.
	-- Kent M Pitman <pitman@world.std.com> in comp.lang.lisp

  parent reply	other threads:[~2006-05-05  0:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1234.1146610060.9609.help-gnu-emacs@gnu.org>
2006-05-02 23:33 ` Anyone have a 'move-line' function? Bastien
2006-05-03  3:46   ` Joe Smith
     [not found]   ` <mailman.1250.1146628814.9609.help-gnu-emacs@gnu.org>
2006-05-03  8:17     ` Mathias Dahl
2006-05-03 21:03     ` liyer.vijay
2006-05-04 15:29       ` Joe Smith
2006-05-04 16:24         ` John Conrad
2006-05-04 20:03           ` Joe Smith
     [not found]       ` <mailman.1411.1146756636.9609.help-gnu-emacs@gnu.org>
2006-05-05  0:09         ` liyer.vijay [this message]
2006-05-04 12:11 Bourgneuf Francois
  -- strict thread matches above, loose matches on Subject: below --
2006-05-02 18:44 Joe Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1146787758.256891.60790@j33g2000cwa.googlegroups.com \
    --to=liyer.vijay@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).