[Top][All Lists]

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

Re: How do i run independent commands on the same defun?

From: Lennart Borgman (gmail)
Subject: Re: How do i run independent commands on the same defun?
Date: Sun, 22 Jun 2008 19:33:40 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071031 Thunderbird/ Mnenhy/

Hugo Mezarina wrote:
See... I want to run independent commads on the same defun...
I want to write a function to do this:

   copy a region of the current buffer
   generete a new buffer
   paste that region in that new buffer
   sort the fields of the new region

I want to do this inside of the body of a function. I'd like to know if there is a function like the one a propose on the next lines: eval-next-lines

(defun copy-and-sort-in-newbuff (original-buff field-name)
        (generate-new-buffer (concat original-buff "-" field-name))
       (set-buffer original-buff)
       (copy-region-as-kill  (point-min) (point-max))
       (set-buffer (concat original-buff "-" field_name))
       (sort-fields -1 (point-min)(point-max))

If there is another way to do this... plesase let me know...

I might be misunderstanding you, but I think there is no need for "eval-next-lines". That is what the defun does by default.

Though there are some other small problems in your code that you have to play with a bit :-)

I know it is rookie problem...but it is my current state on this field...

The interesting thing about a rocket is that it starts somewhere and goes somewhere else.

I appreciate your help on this!

Thank you.


reply via email to

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