Context sensitive completion - IDE

Registered by Andreas Roehler

Hi,

pasting this mail by Wolfgang Bangerth concerning C++, as it addresses the needs of python-mode likewise IMHO,

Source: http://www.dealii.org/~archiver/dealii/msg06854.html

Andreas

;;;;;;;;;;;;;

> apart from being more accessible for newcomers, did you find any
> functionality of KDevelop which is not yet available in Emacs?

Oh, absolutely, and that from all I know will also never be available in
emacs. [1]

There are two primary points of deviation:
- emacs more or less only considers a file at a time, whereas KDevelop
considers "projects" (that may consist of many files, thousands in our case)
as a unit
- KDevelop "understands" C++. It parses these thousands of files and stores
available classes and methods, it remembers the data types of variables, and
cross references everything.

These two things are remarkably powerful. For example:
- You can define a class member variable (say, C::x of type A) in a header
file; if you're editing member function C::foo in the implementation file and
type "x.", KDevelop remembers what "x" is and that it is of type "A" and will
offer you to complete "x." with A's member functions and variables.

- You can hover your mouse over a symbol and it offers to show you where this
symbol is declared and all the places where it is used. In the example above,
if you typed "x.some_member()" and hovered over "some_member", it will
remember that this refers to A::some_member.

- I've really come to like the "Quick open" functionality: you just throw a
(part of a) function name at it and it will open the file where the function
is defined or declared, at the correct location within the file.

I think there is little that could not in principle also be implemented in
emacs but much as I love emacs (I've used it for 19 years now and will
continue to use it for many things) let's face it: (i) emacs development moves
at a glacial pace, (ii) the tyrrany of a certain old-time maintainer of emacs
isn't helping in this regard, and (iii) it isn't a *graphical* environment,
with all the concomitant difficulties in displaying some kinds of information.
There is a reason why our students don't want to use it :-)

Cheers
  W.

[1] I believe the last version of emacs actually has an IDE-like mode though I
must admit that I haven't used it.

-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@xxxxxxxxxxxxx
                                 www: http://www.math.tamu.edu/~bangerth/

;;;;;;;;;;

Blueprint information

Status:
Started
Approver:
None
Priority:
Medium
Drafter:
None
Direction:
Needs approval
Assignee:
Andreas Roehler
Definition:
New
Series goal:
None
Implementation:
Good progress
Milestone target:
milestone icon 6.2.1
Started by
Andreas Roehler

Whiteboard

Am 05.12.2011 01:38, schrieb Brendan Miller:
> On Sat, Dec 3, 2011 at 11:31 PM, Andreas Röhler
> <email address hidden> wrote:
>> Am 03.12.2011 22:58, schrieb Brendan Miller:
>>
>>> M-TAB does does smart autocompletion in emacs.
>>>
>>
>> would call that rather completion, while auto-completion starts by
>> themselves - just auto
>>
>> BTW we are preparing it,
>>
>> https://blueprints.launchpad.net/python-mode/+spec/context-sensitive-completion
>
> Kind of off topic, but that email comparing emacs and kdevelop for C++
> is very misleading because emacs already has the features he is
> talking about in kdevelop, that's what CEDET does, and because also
> kdevelop is for QT which does not use modern C++. QT predates standard
> C++ and the standard library, so it duplicates a lot of stuff without
> modern C++ features like templates and namespaces. For this reason,
> I'm not sure whether kdevelop is designed to handle modern C++ code
> bases (can't say I've tried it though).
>
> That email also seems to imply that emacs development is slow, and
> complains about "the tyrrany[sic] of a certain old-time maintainer of
> emacs"... Actually, I've found emacs development to be moving pretty
> quickly; emacs 24 is almost out with a ton of new features. Also,
> Richard Stallman is no longer the maintainer of emacs, and the new guy
> seems very proactive about updating the way emacs works. A whole slew
> of fundamental changes have been made recently...
>

#############

Am 19.04.2012 07:22, schrieb Les Harris:
> Jambunathan K<email address hidden> writes:
>
>> Could you please share your autocomplete configuration as well? It
>> could serve as a good starting point for people like me interested in
>> exploring CEDET (and whatever else that goes well with it).
>
> Certainly, it's not much.
>
> ;; Autocomplete
> (require 'auto-complete-config)
> (add-to-list 'ac-dictionary-directories (expand-file-name
> "~/.emacs.d/elpa/auto-complete-1.4.20110207/dict"))
> (setq ac-comphist-file (expand-file-name
> "~/.emacs.d/ac-comphist.dat"))
> (ac-config-default)
>
> That's my Autocomplete configuration. It's available via ELPA or
> EmacsWiki.
>
> The AC-Semantic backend is handed in my c-mode-hook which I posted
> previously.
>
> Previous versions of CEDET (and Autocomplete mode) required much more
> manual configuration. It all works more or less 'out of the box' now.
>

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.