all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* refactoring tool
@ 2005-12-08  0:58 Pedro Sa da Costa
  0 siblings, 0 replies; 9+ messages in thread
From: Pedro Sa da Costa @ 2005-12-08  0:58 UTC (permalink / raw)


I'm sorry to ask again, but there is any refactoring tool for emacs, 
besides xrefactory?

Emacs does have code completion? If not, what tool can i install? And, 
what is the shortcut key for this feature?


Can anybody give me the reasons why emacs is better than eclipse? I 
think that is hard to find tools for emacs, know how to use them, and 
hard to install and configure.
Because i have many work in the job, i don't have many time to learn 
advanced features of emacs . So, i'm forced to use eclipse, because it's 
easy to install the plugins, and i think that exists more plugins for 
eclipse than for emacs. My  co-workers also use eclipse. But, my desire 
is to be an emacs geek. What can i do to win this handicap, and learn 
the emacs advanced features? Any advices? What is the best book to learn 
emacs? And, how can anybody deal with plenty of shortcuts keys that 
emacs has? Isn't too much for anybody's head?


Thanks,
Pedro

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: refactoring tool
       [not found] <mailman.18382.1134003534.20277.help-gnu-emacs@gnu.org>
@ 2005-12-08  9:09 ` Anselm Helbig
  2005-12-08 13:51   ` Lennart Borgman
  2005-12-08 14:10 ` PT
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Anselm Helbig @ 2005-12-08  9:09 UTC (permalink / raw)


hi pedro!

At Thu, 08 Dec 2005 00:58:02 +0000,
Pedro Sa da Costa wrote:
> 
> I'm sorry to ask again, but there is any refactoring tool for emacs, 
> besides xrefactory?

sorry, i can't help you there. you can do a search-and-replace with
regexps over a directory tree (see the emacs manual about dired for
this), but maybe that's not enough for you. 


> Emacs does have code completion? If not, what tool can i install? And, 
> what is the shortcut key for this feature?

emacs has code completion for quite some languages. that's not so much
a feature of emacs, but a feature of the programming modes for these
languages (and many, many of them are part of emacs, so, uh, well...).

completion is usually triggered with M-TAB. and dabbrev-expand is
really useful, which is by default bound to M-/. 

the latter always works, but for real code completion you have to
choose the right mode. generally speaking, there's the TAGS feature,
but you have to generate and load an index (a `TAGS' file) before you
can use it. then there's `semantic', which i never used myself, with a
general lexer written in lisp. for xml, there's the great nxml-mode,
which uses rng schemas. 

> Can anybody give me the reasons why emacs is better than eclipse? I 
> think that is hard to find tools for emacs, know how to use them, and 
> hard to install and configure.

why do you ask us if emacs /is better than/ eclipse? this is a matter
of taste, and furthermore, maybe eclipse is a better tool for some
jobs, and emacs for other ones. 

> Because i have many work in the job, i don't have many time to learn
> advanced features of emacs . So, i'm forced to use eclipse, because
> it's easy to install the plugins, and i think that exists more
> plugins for eclipse than for emacs. My co-workers also use eclipse.

> But, my desire is to be an emacs geek.

aha. 8-) but you don't have time to learn, and find it unnecessarily
complex? so where does that desire to be an emacs geek come from?

> What can i do to win this handicap, and learn the emacs advanced
> features? Any advices? What is the best book to learn emacs? And,
> how can anybody deal with plenty of shortcuts keys that emacs has?
> Isn't too much for anybody's head?

it can't be stressed enough: the info manual is really excellent. and
it's always available. it is well written, has examples and can be
used for learning as well as a reference. 

furthermore, emacs is not only free software, but in the way it is
designed, it is extremely open to the user, meaning, with a few
keystrokes you can find out what function a certain key calls, what
this function is supposed to do, and then look up the file in which it
is defined.

you don't have to know all of the keystrokes there are in all the
modes you are using. you just have to know what functions you want to
use, and then it's easy to look them up. C-h i, C-h m, C-h a, C-h k
and C-h f are your friends.

they did call emacs self-documenting for a reason. 

about the emacs-vs-eclipse issue, there are some endless discussions
on usenet you could look up. search for them on google groups... oh,
sorry, you said, you did not have much time. 8-)

ok, why do _I_ like emacs better than eclipse? openness, hackability,
everything is keyboard driven, feels fast (compared with eclipse),
also usable for simple tasks/system administration, great text
manipulation functions, lisp rocks. cons: well, integration of modern
gui widgets would be nice. 

hope that helps. 8-)

kind regards and: happy hacking!

anselm

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: refactoring tool
  2005-12-08  9:09 ` refactoring tool Anselm Helbig
@ 2005-12-08 13:51   ` Lennart Borgman
  0 siblings, 0 replies; 9+ messages in thread
From: Lennart Borgman @ 2005-12-08 13:51 UTC (permalink / raw)
  Cc: help-gnu-emacs

Anselm Helbig wrote:

>hi pedro!
>
>At Thu, 08 Dec 2005 00:58:02 +0000,
>Pedro Sa da Costa wrote:
>  
>
>>I'm sorry to ask again, but there is any refactoring tool for emacs, 
>>besides xrefactory?
>>    
>>
>
>sorry, i can't help you there. you can do a search-and-replace with
>regexps over a directory tree (see the emacs manual about dired for
>this), but maybe that's not enough for you. 
>  
>
If not, maybe something like this will help you:

    http://www.unixgods.org/~tilo/replace_string/

That is a perl module. And this makes me wonder if anyone knows an elisp 
or perl translator between perl and emacs style regexps?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: refactoring tool
       [not found] <mailman.18382.1134003534.20277.help-gnu-emacs@gnu.org>
  2005-12-08  9:09 ` refactoring tool Anselm Helbig
@ 2005-12-08 14:10 ` PT
  2005-12-09  9:05 ` Alan Mackenzie
  2005-12-10  2:18 ` Aquila Deus
  3 siblings, 0 replies; 9+ messages in thread
From: PT @ 2005-12-08 14:10 UTC (permalink / raw)


> Because i have many work in the job, i don't have many time to learn advanced features of emacs

Stick with Eclipse. Emacs takes time to learn properly and you won't
see the benefits if you can't devote enough time to learn it.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: refactoring tool
       [not found] <mailman.18382.1134003534.20277.help-gnu-emacs@gnu.org>
  2005-12-08  9:09 ` refactoring tool Anselm Helbig
  2005-12-08 14:10 ` PT
@ 2005-12-09  9:05 ` Alan Mackenzie
  2005-12-09 15:35   ` Ian Zimmerman
  2005-12-10  2:18 ` Aquila Deus
  3 siblings, 1 reply; 9+ messages in thread
From: Alan Mackenzie @ 2005-12-09  9:05 UTC (permalink / raw)


Pedro Sa da Costa <pedrosacosta@netcabo.pt> wrote on Thu, 08 Dec 2005
00:58:02 +0000:
> I'm sorry to ask again, but there is any refactoring tool for emacs,
> besides xrefactory?

> Emacs does have code completion? If not, what tool can i install? And, 
> what is the shortcut key for this feature?

> Can anybody give me the reasons why emacs is better than eclipse?

I don't know much about Eclipse, but I'd like to find out.  The last time
I looked at the Eclipse web site I couldn't find any solid information -
there were just endless chains of pointers to pages talking about the
like of how easy it is to "embed apples" (or something like that), but
nowhere an answer to questions like "what's the key sequence to go to the
beginning of a function?".

As for Emacs, it will run on "any" system, and has modes for "all"
programming languages (including things like makefiles and shell
scripts), and many, many useful utilities (like for applying patches and
so on).  You don't need to use the mouse to use Emacs; you don't need a
window system for Emacs.  The documentation for Emacs is very good
indeed.

> I think that is hard to find tools for emacs, know how to use them, and
> hard to install and configure.

It is hard to configure Emacs, it is hard to learn it, it is
astonishingly easy to use, once configured and learnt.

> Because i have many work in the job, i don't have many time to learn 
> advanced features of emacs.

Maybe Emacs isn't for you, then.  You won't get much benefit from it
without putting a lot of time and effort into learning it.  But you don't
need do a 3 month course of study before you can start using Emacs - you
can learn enough to start using it in a mere hour or two, providing
you're willing to keep learning as you go along.

> So, i'm forced to use eclipse, because it's easy to install the
> plugins, and i think that exists more plugins for eclipse than for
> emacs.

That's unlikely, because Emacs has existed for over 20 years.

> My  co-workers also use eclipse. But, my desire is to be an emacs geek.
> What can i do to win this handicap, and learn the emacs advanced
> features? Any advices? What is the best book to learn emacs?

Start Emacs, and press C-h t (that's "control-h t") to get the tutorial.
Work through it.  After that there's C-h i to get you to the "info"
system, where you should select the menu item "emacs".  Just don't expect
to get through it in a single evening.

> And, how can anybody deal with plenty of shortcuts keys that emacs has?
> Isn't too much for anybody's head?

We call them "key sequences" in Emacs, not "shortcuts".  They're not
difficult to learn as long as you don't try to learn them all at once.
After all, you've probably learnt about 20,000 words in your native
language, including how to spell them.  Fifty or a hundred key sequences
is _nothing_ by comparison.

> Thanks,
> Pedro

-- 
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: refactoring tool
  2005-12-09  9:05 ` Alan Mackenzie
@ 2005-12-09 15:35   ` Ian Zimmerman
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Zimmerman @ 2005-12-09 15:35 UTC (permalink / raw)
  Cc: help-gnu-emacs

On 12/9/05, Alan Mackenzie <acm@muc.de> wrote:
> After all, you've probably learnt about 20,000 words in your native
> language, including how to spell them.

Oh, but that was before age 10 ... I bet I could've mastered Emacs _and_
Eclipse had I started that early <grin>

--
"Political systems do not deal easily
with long term threats,
even if they have a probability of 100%"
James Schlesinger, a former director of the CIA

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: refactoring tool
       [not found] <mailman.18382.1134003534.20277.help-gnu-emacs@gnu.org>
                   ` (2 preceding siblings ...)
  2005-12-09  9:05 ` Alan Mackenzie
@ 2005-12-10  2:18 ` Aquila Deus
  2005-12-10 20:47   ` rob wahoo
  3 siblings, 1 reply; 9+ messages in thread
From: Aquila Deus @ 2005-12-10  2:18 UTC (permalink / raw)


Pedro Sa da Costa wrote:
> I'm sorry to ask again, but there is any refactoring tool for emacs,
> besides xrefactory?

There is one for python, dunno about others.

>
> Emacs does have code completion? If not, what tool can i install? And,
> what is the shortcut key for this feature?

here => http://cedet.sourceforge.net/intellisense.shtml

I'm going to try out it myself :)

>
>
> Can anybody give me the reasons why emacs is better than eclipse? I
> think that is hard to find tools for emacs, know how to use them, and
> hard to install and configure.
> Because i have many work in the job, i don't have many time to learn
> advanced features of emacs . So, i'm forced to use eclipse, because it's
> easy to install the plugins, and i think that exists more plugins for
> eclipse than for emacs. My  co-workers also use eclipse. But, my desire
> is to be an emacs geek. What can i do to win this handicap, and learn
> the emacs advanced features? Any advices? What is the best book to learn
> emacs? And, how can anybody deal with plenty of shortcuts keys that
> emacs has? Isn't too much for anybody's head?

I found Eclipse is rather confusing....

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: refactoring tool
  2005-12-10  2:18 ` Aquila Deus
@ 2005-12-10 20:47   ` rob wahoo
  0 siblings, 0 replies; 9+ messages in thread
From: rob wahoo @ 2005-12-10 20:47 UTC (permalink / raw)


The JDEE, Java Development Environment for Emacs, supports code
completion via the use of Java reflection. I find that I use
dabbrev-expand more often, but it's useful if you have forgotten the
name of a method for a class.

The JDEE doesn't have automated refactoring, but it does have functions
that allow you to obtain a call tree for a specific method.

Emacs has a steep learning curve. It's easier to learn if you have
someone in the office that is an evangelist, and can help show you some
of the amazing macros he/she has collected /written over the years.

Good luck... Take the leap.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* refactoring tool
@ 2010-10-02 14:59 Andreas Röhler
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Röhler @ 2010-10-02 14:59 UTC (permalink / raw)
  To: help-gnu-emacs


Hi,

playing with some tests, the following function
--slightly shortened here-- came out:

(defun python-modes-beginning-of-block-or-clause-test (&optional arg)
   (interactive)
   ;; ...
   (let ((erg 1658))
     (set-buffer "python-modes-test")
   ;; ...
     (goto-char erg)
     (assert (eq 77 (- erg (setq erg (py-beginning-of-block-or-clause)))))
     (assert (eq 124 (- erg (setq erg (py-beginning-of-block-or-clause)))))
     (assert (eq 124 (- erg (setq erg (py-beginning-of-block-or-clause)))))
     (assert (eq 42 (- erg (setq erg (py-beginning-of-block-or-clause))))))
   (message "%s" "python-modes-beginning-of-block-or-clause-test passed!"))

As it's visible, the whole thing could be written much
shorter using a list '(77 124 124 42).

Would call this procedure of changing into a more effective
form refactoring.

Is there a tool for Emacs Lisp?

Thanks


Andreas

--
https://code.launchpad.net/~a-roehler/python-mode/python-mode-components
https://code.launchpad.net/s-x-emacs-werkstatt/





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-10-02 14:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.18382.1134003534.20277.help-gnu-emacs@gnu.org>
2005-12-08  9:09 ` refactoring tool Anselm Helbig
2005-12-08 13:51   ` Lennart Borgman
2005-12-08 14:10 ` PT
2005-12-09  9:05 ` Alan Mackenzie
2005-12-09 15:35   ` Ian Zimmerman
2005-12-10  2:18 ` Aquila Deus
2005-12-10 20:47   ` rob wahoo
2010-10-02 14:59 Andreas Röhler
  -- strict thread matches above, loose matches on Subject: below --
2005-12-08  0:58 Pedro Sa da Costa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.