POV-Ray : Newsgroups : povray.off-topic : Emacs : Re: Emacs Server Time
29 Sep 2024 02:22:10 EDT (-0400)
  Re: Emacs  
From: Tor Olav Kristensen
Date: 15 Apr 2009 10:39:38
Message: <49e5f1aa$1@news.povray.org>
Invisible wrote:
> Tor Olav Kristensen wrote:
>> Invisible wrote:
>> ...
>>> Or you have a grid of numbers, and you want to add another column in 
>>> the middle. Or stuff like that. Since Emacs == Lisp, it seems that 
>>> you could probably spend 20 minutes writing some code that would do 
>>> what you want. 
>> ...
>>
>>
http://www.gnu.org/software/emacs/manual/html_node/emacs/Text-Based-Tables.html#Text-Based-Tables

> 
> 
> Close, but not quite what I was thinking of.
> 
> I was thinking more like you have some text such as
> 
>   case x of
>     5 -> return [(1, 4), (2, 3)]
>     6 -> return [(1, 5), (2, 4), (3, 3)]
>     7 -> return [(1, 6), (2, 5), (3, 4)]
> 
> and you suddenly decide you need to change that to
> 
>   case x of
>     5 -> return $ Just [(1, 4), (2, 3)]
>     6 -> return $ Just [(1, 5), (2, 4), (3, 3)]
>     7 -> return $ Just [(1, 6), (2, 5), (3, 4)]
> 
> It's kinda tedious to do this by hand. (Depending on just how many times 
> you need to do it, obviously...)

Have a look at this:

http://www.gnu.org/software/emacs/manual/html_node/emacs/Rectangles.html

(The text cursor is the "point" and you can put a "mark" in the text with C-space.)

-- 
Tor Olav
http://subcube.com


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.