what is control + click in netbeans to emacs the same equivalent work?

5 risposte [Ultimo contenuto]
saravia
Offline
Iscritto: 11/06/2016

maybe is easy what this equivalent work play in much programming languages...

using emacs 25.2

albertoefg
Offline
Iscritto: 04/21/2016

Maybe if you describe what are you trying to do. I've never used netbeans.

ADFENO
Offline
Iscritto: 12/31/2012

If you mean something similar to "go to source/definition", this mostly
depends on programming language, and if the Emacs mode being used to
deal with that programming language has also implemented support for
that. The key here is to install the programming language Emacs mode
related to the programming language you want to work with.

For Java (and many other languages), there is an editor-agnostic way:
GNU GLOBAL: [[https://www.gnu.org/software/global/]].

Please be aware that I'm not a developer, so I might not be able to
answer particular questions regarding neither GNU Emacs nor GNU GLOBAL.

--
- [[https://libreplanet.org/wiki/User:Adfeno]]
- Palestrante e consultor sobre /software/ livre (não confundir com
gratis).
- "WhatsApp"? Ele não é livre, por isso não uso. Iguais a ele prefiro
GNU Ring, ou Tox. Quer outras formas de contato? Adicione o vCard
que está no endereço acima aos teus contatos.
- Pretende me enviar arquivos .doc, .ppt, .cdr, ou .mp3? OK, eu
aceito, mas não repasso. Entrego apenas em formatos favoráveis ao
/software/ livre. Favor entrar em contato em caso de dúvida.

saravia
Offline
Iscritto: 11/06/2016

thanks, works fine

ADFENO
Offline
Iscritto: 12/31/2012

You're welcome. :)

marioxcc
Offline
Iscritto: 08/13/2014

Hello.

I do not know what Ctrl+click does in NetBeans. Another user seems to imply that it finds the definition of the identifier clicked (function name, etc.).

There are several ways to do this in GNU Emacs.

The traditional way is using the etags program to generate a data-base of the definitions and then loading that in Emacs. Many software have a “tags” target in the Makefile so you can do “make tags” but you can also call etags manually. There are also other implementations of the same functionality of etags. This method is described in §28.3 Find Identifier References of the GNU Emacs manual. The main command is accessed through “M-.”. The disadvantage of etags is that it has to be rebuilt manually and (AFAIK) it does not automatically find definitions in system files.

Another way built-in into Emacs is using imenu. This works only for definitions in the same buffer (file).

The most powerful way that works for many programming languages is probably with Semantic mode. I have never used it to any meaningful extent. It has a section in the GNU Emacs manual and a manual of its own.

Additionally, many major modes that are capable of interactive evaluation (for example, SLIME) have their own implementation of “go to the definition of this identifier”. Obviously the details depend on the major mode.

If you need more help, subscribe to the help-gnu-emacs mailing list and ask there.