unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Auto complete not starting
@ 2010-08-09 18:03 Andrea Crotti
  2010-08-09 20:27 ` Andrea Crotti
  0 siblings, 1 reply; 8+ messages in thread
From: Andrea Crotti @ 2010-08-09 18:03 UTC (permalink / raw)
  To: help-gnu-emacs

I'm in very funny situation, since I've updated auto-complete and
yasnippet some time ago it didn't work as it used to be, being normally
too slow.

Now I don't know how I fixed this and it works like a charm, but if I
start another emacs instance I still have the same problem.
Given that now I know it's fixable I would like to get it done finally.


What my configuration looks like now:

--8<---------------cut here---------------start------------->8---
;;; Require
(require 'auto-complete)
;; Various configurations
(require 'auto-complete-config)
(ac-config-default)

(setq ac-auto-start 2)                  ;automatically start
(setq ac-override-local-map nil)        ;don't override local map
(setq ac-use-menu-map t)
(setq ac-candidate-limit 20)
;; Default settings
(define-key ac-menu-map "\C-n" 'ac-next)
(define-key ac-menu-map "\C-p" 'ac-previous)  

;; making it a bit faster
(setq ac-delay 0.1)
(setq ac-auto-show-menu 0.4)
(setq ac-quick-help-delay 0.5)
;; using a dictionary (emtpy now)
(add-to-list 'ac-dictionary-directories (concat conf "auto-complete/dict"))

(setq-default ac-sources
              (append ac-sources '(ac-source-yasnippet)))

(dolist
    (my-ac-mode '(nesc-mode org-mode html-mode xml-mode))
  (add-to-list 'ac-modes my-ac-mode))

            
; this is used for trigger ac actions from org-mode also
(add-to-list 'ac-trigger-commands 'org-self-insert-command)

;; using a nice function is ac-config
(dolist (hook (list
               'lisp-interaction-mode-hook
               'ielm-mode-hook
               ))
  (add-hook hook 'ac-emacs-lisp-mode-setup))
--8<---------------cut here---------------end--------------->8---


And now the funny thing is that in the new emacs it doesn't start at
all, I have to run manually
ac-complete-(functios|yasnippet) etc etc...
Any iidea??

If I could do a DIFF between two global configurations (or maybe dump
the actual one) it would be grat also...




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

* Re: Auto complete not starting
  2010-08-09 18:03 Auto complete not starting Andrea Crotti
@ 2010-08-09 20:27 ` Andrea Crotti
  2010-08-09 20:32   ` Deniz Dogan
  2010-08-09 20:34   ` Richard Riley
  0 siblings, 2 replies; 8+ messages in thread
From: Andrea Crotti @ 2010-08-09 20:27 UTC (permalink / raw)
  To: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

[...]

It's getting really crazy, if I use emacs -Q and I load this
configuration everything works nicely, but when I load the whole
configuration something gets stuck in the middle, but what can that be?

Any idea?




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

* Re: Auto complete not starting
  2010-08-09 20:27 ` Andrea Crotti
@ 2010-08-09 20:32   ` Deniz Dogan
  2010-08-09 20:34   ` Richard Riley
  1 sibling, 0 replies; 8+ messages in thread
From: Deniz Dogan @ 2010-08-09 20:32 UTC (permalink / raw)
  To: Andrea Crotti; +Cc: help-gnu-emacs

2010/8/9 Andrea Crotti <andrea.crotti.0@gmail.com>
>
> Andrea Crotti <andrea.crotti.0@gmail.com> writes:
>
> [...]
>
> It's getting really crazy, if I use emacs -Q and I load this
> configuration everything works nicely, but when I load the whole
> configuration something gets stuck in the middle, but what can that be?
>
> Any idea?
>
>

The people in #emacs on freenode usually suggest this:

"To find a problematic form in your .emacs: comment out half, and try
to reproduce the problem. You should now know which half causes the
problem. Recurse as necessary. Don't use this to find the cause of a
lisp error; instead start emacs with --debug-init. In other words, if
an error is not signalled, use bisect."

--
Deniz Dogan



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

* Re: Auto complete not starting
  2010-08-09 20:27 ` Andrea Crotti
  2010-08-09 20:32   ` Deniz Dogan
@ 2010-08-09 20:34   ` Richard Riley
  2010-08-09 21:00     ` Andrea Crotti
  2010-08-09 21:14     ` Andrea Crotti
  1 sibling, 2 replies; 8+ messages in thread
From: Richard Riley @ 2010-08-09 20:34 UTC (permalink / raw)
  To: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> Andrea Crotti <andrea.crotti.0@gmail.com> writes:
>
> [...]
>
> It's getting really crazy, if I use emacs -Q and I load this
> configuration everything works nicely, but when I load the whole
> configuration something gets stuck in the middle, but what can that be?
>
> Any idea?
>


Be more specific. What exactly doesn't work? What do you see?

Do you also have semantic completion mechanisms enabled?

They seem to cause havoc.

(On that note I customised semantic in emacs 24
to turn off global idle completion and that saved custom object crashed
the emacs startup).





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

* Re: Auto complete not starting
  2010-08-09 20:34   ` Richard Riley
@ 2010-08-09 21:00     ` Andrea Crotti
  2010-08-09 21:39       ` Dan Davison
  2010-08-09 21:14     ` Andrea Crotti
  1 sibling, 1 reply; 8+ messages in thread
From: Andrea Crotti @ 2010-08-09 21:00 UTC (permalink / raw)
  To: help-gnu-emacs

Richard Riley <rileyrg@gmail.com> writes:

>
>
> Be more specific. What exactly doesn't work? What do you see?
>
> Do you also have semantic completion mechanisms enabled?
>
> They seem to cause havoc.
>
> (On that note I customised semantic in emacs 24
> to turn off global idle completion and that saved custom object crashed
> the emacs startup).

I also thought about that but I guess it's not, if I disable completely
cedet I get the same problem.

Using the bisect method is not so easy since the configuration is 1500
lines now, and is generated by an org-file.

Maybe if I archive the entries it should be the same as commenting,
let's see if I can come up with something.




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

* Re: Auto complete not starting
  2010-08-09 20:34   ` Richard Riley
  2010-08-09 21:00     ` Andrea Crotti
@ 2010-08-09 21:14     ` Andrea Crotti
  1 sibling, 0 replies; 8+ messages in thread
From: Andrea Crotti @ 2010-08-09 21:14 UTC (permalink / raw)
  To: help-gnu-emacs

Richard Riley <rileyrg@gmail.com> writes:
>
> Be more specific. What exactly doesn't work? What do you see?
>
> Do you also have semantic completion mechanisms enabled?
>
> They seem to cause havoc.
>
> (On that note I customised semantic in emacs 24
> to turn off global idle completion and that saved custom object crashed
> the emacs startup).

I forgot to answer, it doesn't work because it doesn't show up the menu
unless I actually use ac-start.
The configuration is this enormous thing here
http://github.com/AndreaCrotti/Emacs-configuration/blob/master/miniconf.org
But too big to have a look, it must be something really stupid.

I already tried to remove yasnippet, cedet and the various defadvice,
but it's not that...

The thing that on my actual running emacs works nicely is the most
annoying, I would like just to diff or copy to that conf...
Here btw the "ac-sources" variable in an emacs-lisp-mode buffer

(ac-source-features ac-source-functions ac-source-yasnippet
ac-source-variables ac-source-symbols ac-source-yasnippet
ac-source-imenu ac-source-abbrev ac-source-words-in-buffer
ac-source-files-in-current-dir ac-source-filename)




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

* Re: Auto complete not starting
  2010-08-09 21:00     ` Andrea Crotti
@ 2010-08-09 21:39       ` Dan Davison
  2010-08-09 22:05         ` Andrea Crotti
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Davison @ 2010-08-09 21:39 UTC (permalink / raw)
  To: Andrea Crotti; +Cc: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> Richard Riley <rileyrg@gmail.com> writes:
>
>>
>>
>> Be more specific. What exactly doesn't work? What do you see?
>>
>> Do you also have semantic completion mechanisms enabled?
>>
>> They seem to cause havoc.
>>
>> (On that note I customised semantic in emacs 24
>> to turn off global idle completion and that saved custom object crashed
>> the emacs startup).
>
> I also thought about that but I guess it's not, if I disable completely
> cedet I get the same problem.
>
> Using the bisect method is not so easy since the configuration is 1500
> lines now, and is generated by an org-file.

Org extracts (tangles) a .el file from the org file, so you can
temporarily set this .el file as your ~/.emacs.el file and proceed as if
org had never been involved in your emacs config (e.g. proceed to use
bisection).

Dan

>
> Maybe if I archive the entries it should be the same as commenting,
> let's see if I can come up with something.



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

* Re: Auto complete not starting
  2010-08-09 21:39       ` Dan Davison
@ 2010-08-09 22:05         ` Andrea Crotti
  0 siblings, 0 replies; 8+ messages in thread
From: Andrea Crotti @ 2010-08-09 22:05 UTC (permalink / raw)
  To: help-gnu-emacs

Dan Davison <davison@stats.ox.ac.uk> writes:

>
> Org extracts (tangles) a .el file from the org file, so you can
> temporarily set this .el file as your ~/.emacs.el file and proceed as if
> org had never been involved in your emacs config (e.g. proceed to use
> bisection).
>
> Dan
>

Thanks God finally is fixed, it was the damn flyspell-prog-mode (which
is pretty cool anyway).

But the most funny part is that I was reading the code of auto-complete,
and almost incidentally I evaluated the ac-flyspell-workaround function,
and that's why it was working on this emacs instance.
Fore the future here is how they both go together.

--8<---------------cut here---------------start------------->8---
(defcustom to-spell-langs
  '(emacs-lisp-mode-hook python-mode-hook c-mode-hook nesc-mode-hook java-mode-hook jde-mode-hook haskell-mode-hook)
  "Set of programming modes for which I want to enable spelling in comments and strings"
  :type 'list)
  
(dolist (lang-hook to-spell-langs)
  (add-hook  lang-hook 'flyspell-prog-mode))

(require 'auto-complete)
(ac-flyspell-workaround)
--8<---------------cut here---------------end--------------->8---




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

end of thread, other threads:[~2010-08-09 22:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-09 18:03 Auto complete not starting Andrea Crotti
2010-08-09 20:27 ` Andrea Crotti
2010-08-09 20:32   ` Deniz Dogan
2010-08-09 20:34   ` Richard Riley
2010-08-09 21:00     ` Andrea Crotti
2010-08-09 21:39       ` Dan Davison
2010-08-09 22:05         ` Andrea Crotti
2010-08-09 21:14     ` Andrea Crotti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).