help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: add-hook


From: Richard Riley
Subject: Re: add-hook
Date: Mon, 06 Jun 2011 01:33:27 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux)

address@hidden (daniele.g) writes:

> Richard Riley <address@hidden> writes:
>
>> address@hidden (daniele.g) writes:
>>
>>> Richard Riley <address@hidden> writes:
>>>
>>>> I think I mentioned it before, but auto-complete has an excellent
>>>> completion mechanism which you can share/use across all modes for
>>>> consistency and you can easily set the completion sources to use the
>>>> semantic completion candidates in addition to the more common sources
>>>> like dabbrev.
>>>
>>> Yes, you did. But it seems it doesn't work as it promises. It seems it
>>> autompletes symbols only in a per session way (every time I start
>>> editing a new file it resets all the simbols previously gathered),
>>> and,
>>
>> What gathered symbols does semantic maintain?
>
> The ones I had written in the current session.
>
>>> What it's worst, its scope is limited on the open buffer, it doesn't
>>> look for in included headers.
>>>
>>> But maybe it's only my emacs that is misconfigured.
>>
>> I suspect it is.
>>
>> As I said, it can use the semantic back end completion sets.
>
> Have you an .emacs file to show me.
> Thanks

sure.

I stopped using semantic as I found it tripping over too often (in
parsing files, not in completion candidates). But I'm using javascript
and php and last I heard it doesnt really work with either.And I dont
know what a "bovine thingy" is ;) ...

So here's related completion stuff - it probably could be cleaned up.

from my .emacs equivalent:

  (add-to-list 'load-path "~/.emacs.d/auto-complete")
  (require 'auto-complete)
  (require 'auto-complete-config)
  (ac-config-default)
  (add-to-list 'ac-dictionary-directories "~/.emacs.d/auto-complete/dict")
  (setq-default
   ac-sources '(
                ac-source-abbrev
                ac-source-gtags
                ac-source-dictionary
                ac-source-words-in-all-buffer
                ac-source-words-in-buffer
                )
   )

  (global-auto-complete-mode t)


and in my custom.el

 '(ac-auto-show-menu 0.1)
 '(ac-auto-start 5)
 '(ac-candidate-limit 10)
 '(ac-dictionary-files (quote ("~/.dict" "/etc/dictionaries-common/words")))
 '(ac-menu-height 20)
 '(ac-modes (quote (emacs-lisp-mode lisp-interaction-mode c-mode cc-mode 
c++-mode java-mode malabar-mode clojure-mode scala-mode scheme-mode ocaml-mode 
tuareg-mode haskell-mode perl-mode cperl-mode python-mode ruby-mode 
ecmascript-mode javascript-mode js-mode js2-mode php-mode css-mode 
makefile-mode sh-mode fortran-mode f90-mode ada-mode xml-mode sgml-mode 
jde-mode org-mode jde-mode latex-mode ledger-mode mail-mode message-mode 
text-mode)))
 '(ac-use-fuzzy nil)
 '(ac-user-dictionary-files (quote ("~/.dict" 
"/etc/dictionaries-common/words")))

I have only good things to say about auto-complete and its support.

regards

r.




reply via email to

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