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

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

Re: Anyone have a 'move-line' function?


From: liyer . vijay
Subject: Re: Anyone have a 'move-line' function?
Date: 4 May 2006 17:09:18 -0700
User-agent: G2/0.2

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



reply via email to

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