POV-Ray : Newsgroups : povray.off-topic : Emacs Server Time
28 Sep 2024 22:20:00 EDT (-0400)
  Emacs (Message 61 to 70 of 349)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Tor Olav Kristensen
Subject: Re: Emacs
Date: 15 Apr 2009 08:16:40
Message: <49e5d028$1@news.povray.org>
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

-- 
Tor Olav
http://subcube.com


Post a reply to this message

From: Invisible
Subject: Re: Emacs
Date: 15 Apr 2009 08:20:57
Message: <49e5d129$1@news.povray.org>
>> Er, no... HOW DO YOU TYPE THAT? What buttons is it actually telling 
>> you to press?
> 
> Control-u 10 Control-f

So, hold control, tap U, release control, tap 1 and then 0, hold 
control, tap F, and then release control?


Post a reply to this message

From: Invisible
Subject: Re: Emacs
Date: 15 Apr 2009 08:24:53
Message: <49e5d215$1@news.povray.org>
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...)


Post a reply to this message

From: Bill Pragnell
Subject: Re: Emacs
Date: 15 Apr 2009 08:30:01
Message: <web.49e5d30bbe8f6db96dd25f0b0@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> OK. But it would be nice if the text itself was crisp and readable, no?

Looks fine to me.

> Being stuck with one ugly terminal font would just annoy me.

Fair enough. I'm sure you can change this too, mind.

> By the way... what kind of keyboard actually has a Meta key?

Um, I think it's just the extra behaviour-modifier key of your choice.

> Emacs is a Lisp interpretter running a text editor application written
> in Lisp. If you just want to change some setting, you can probably get
> away with adjusting a variable. But if you want to alter something there
> isn't a setting for... you need to modify the source code.

I'm no expert, but I strongly suspect that there's a setting for everything,
including mountain-moving!

> take you hours to figure out which secret hidden setting changes the
> thing that's annoying you. (Or even whether there *is* a setting to
> change a particular behaviour...)

Yup, well, you can't make things powerful *and* easy. :-P

> > on-screen. (Like Scotty bringing up a 3D model of transparent aluminium in 4
> > seconds work - name that movie!)
> I don't know the title. Whichever Star Trek movie it was that featured
> time travel.

Ha, you only get 1/2.


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Emacs
Date: 15 Apr 2009 08:30:41
Message: <49e5d371$1@news.povray.org>
Invisible wrote:
...
> One feature I actually *want* and that no known editor seems to have is 
> the ability to do stuff to tabular data easily. Like, if you suddenly 
> decide that you need to append the same piece of text to all 10 lines. 
...

If you do the following keystrokes:

C-home        // beginning-of-buffer
down          // next-line
C-k           // kill-line
C-y           // yank
down          // next-line
C-x (         // start-kbd-macro
down          // next-line
C-e           // move-end-of-line
C-y           // yank
C-x )         // kmacro-end-macro
C-u           // universal-argument
9             // 9
C-x e         // kmacro-end-and-call-macro

- while editing this text:

This is the first line in buffer.
This is the text to be appended.

Line A.
Line B.
Line C.
Line D.
Line E.
Line F.
Line G.
Line H.
Line I.
Line J.

  - you get this:

This is the first line in buffer.
This is the text to be appended.

Line A.This is the text to be appended.
Line B.This is the text to be appended.
Line C.This is the text to be appended.
Line D.This is the text to be appended.
Line E.This is the text to be appended.
Line F.This is the text to be appended.
Line G.This is the text to be appended.
Line H.This is the text to be appended.
Line I.This is the text to be appended.
Line J.This is the text to be appended.


-- 
Tor Olav
http://subcube.com


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Emacs
Date: 15 Apr 2009 08:35:49
Message: <49e5d4a5$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...)

Couldn't you just mark the region
- and then do a search for "return" and replace with "return $ Just" ?

-- 
Tor Olav
http://subcube.com


Post a reply to this message

From: scott
Subject: Re: Emacs
Date: 15 Apr 2009 08:39:06
Message: <49e5d56a$1@news.povray.org>
> 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...)

In all editors I've used (including POV - try it!), you would hold down the 
Alt key, then click and drag from the top [ to the bottom [ to mark the 
region you want to type into.  Then when you type it gets inserted on every 
line in that region.


Post a reply to this message

From: jute
Subject: Re: Emacs
Date: 15 Apr 2009 08:45:01
Message: <web.49e5d66ebe8f6db9f43b014e0@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> What is it, exactly, that makes Emacs so fantastic? What does it
> actually *do* beyond being a text editor?

It's intelligent wrt your code in a way that no other editor I know is.


Post a reply to this message

From: Invisible
Subject: Re: Emacs
Date: 15 Apr 2009 08:47:28
Message: <49e5d760$1@news.povray.org>
>> Emacs is a Lisp interpretter running a text editor application written
>> in Lisp. If you just want to change some setting, you can probably get
>> away with adjusting a variable. But if you want to alter something there
>> isn't a setting for... you need to modify the source code.
> 
> I'm no expert, but I strongly suspect that there's a setting for everything,
> including mountain-moving!

Well, we'll see.

> Yup, well, you can't make things powerful *and* easy. :-P

I'm not so sure. ;-)

>>> on-screen. (Like Scotty bringing up a 3D model of transparent aluminium in 4
>>> seconds work - name that movie!)
>> I don't know the title. Whichever Star Trek movie it was that featured
>> time travel.
> 
> Ha, you only get 1/2.

Random guess: The search for Spock?


Post a reply to this message

From: Invisible
Subject: Re: Emacs
Date: 15 Apr 2009 08:49:55
Message: <49e5d7f3$1@news.povray.org>
>> What is it, exactly, that makes Emacs so fantastic? What does it
>> actually *do* beyond being a text editor?
> 
> It's intelligent wrt your code in a way that no other editor I know is.

Well, I guess... how many other editors are programmable enough to 
implement SkyNet? ;-)


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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