all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Do I have a correct configuration for auto-complete, auto-indent and yasnippet to use the tab key?
@ 2014-03-18 18:10 Jorge Araya Navarro
  2014-03-19  7:51 ` lee
  0 siblings, 1 reply; 6+ messages in thread
From: Jorge Araya Navarro @ 2014-03-18 18:10 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]

Hello!

I am a happy user of GNU Emacs. So far I have a really good configuration on my Emacs, but I have the impression that auto-complete mode, auto-indent mode and yasnippet mode are not working together as they should to not enter into conflict when the tab key is pressed. For instance, when I'm writing python code, I usually press the tab key to auto complete the name of some variable, however, Emacs does nothing and if I press the key again it change the indentation, and if I press the tab key again, it changes the indentation again, and so on. If I write a word like the if statement yasnippet does nothing. This not happen for the for loop statement, and def statement though.

I just want to be sure that these three packages can work together as they should, in certain order: first auto-complete, then yasnippet and finally auto-indent. But I don't know enough elisp to achieve this!

Here are my emacs configuration files:

init.el: http://elcodigo.deshackra.com/emacs/src/e9e1192510accaef6b09b1b495b9189f7f6dc050/emacs.d/init.el?at=default
keys.el (holds the configuration for keybindings): http://elcodigo.deshackra.com/emacs/src/e9e1192510accaef6b09b1b495b9189f7f6dc050/emacs.d/keys.el?at=default
conf-modes/* (a directory with configuration commands for every mode installed on Emacs): http://elcodigo.deshackra.com/emacs/src/e9e1192510accaef6b09b1b495b9189f7f6dc050/emacs.d/conf-modes/?at=default
varl.el (filled with load-file commands to load every file on conf-modes/ as needed): http://elcodigo.deshackra.com/emacs/src/e9e1192510accaef6b09b1b495b9189f7f6dc050/emacs.d/varl.el?at=default

Any help will be very appreciated!

Pax et bonum.

P.S. Just for the record: http://elcodigo.deshackra.com is just a cname for bitbucket.org :) my emacs conf can be found at https://bitbucket.org/shackra/emacs

[-- Attachment #2: vcard --]
[-- Type: text/x-vcard, Size: 172 bytes --]

BEGIN:VCARD
VERSION:2.1
N:Araya Navarro;Jorge;;;;
FN:Jorge  Araya Navarro
ADR;HOME:;;;;;;Costa Rica
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:Costa Rica
BDAY:19901228
END:VCARD

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

* Re: Do I have a correct configuration for auto-complete, auto-indent and yasnippet to use the tab key?
  2014-03-18 18:10 Do I have a correct configuration for auto-complete, auto-indent and yasnippet to use the tab key? Jorge Araya Navarro
@ 2014-03-19  7:51 ` lee
  2014-03-19 16:43   ` Jorge Araya Navarro
  0 siblings, 1 reply; 6+ messages in thread
From: lee @ 2014-03-19  7:51 UTC (permalink / raw)
  To: help-gnu-emacs

"Jorge Araya Navarro" <kartelo@gmx.com> writes:

> Hello!
>
> I am a happy user of GNU Emacs. So far I have a really good
> configuration on my Emacs, but I have the impression that
> auto-complete mode, auto-indent mode and yasnippet mode are not
> working together as they should to not enter into conflict when the
> tab key is pressed. For instance, when I'm writing python code, I
> usually press the tab key to auto complete the name of some variable,
> however, Emacs does nothing and if I press the key again it change the
> indentation, and if I press the tab key again, it changes the
> indentation again, and so on. If I write a word like the if statement
> yasnippet does nothing. This not happen for the for loop statement,
> and def statement though.

It would depend on which versions of auto-complete and yasnippet you`re
using.  I had to install them from their repos on github because there
was an incompatibility.  See


https://github.com/capitaomorte/yasnippet
https://github.com/auto-complete/auto-complete


Other than that, what your TAB key does would depend on what it`s bound
to.  In my case, it`s bound to `yas-expand', probably because I have .  It does what I think it
should.  I`m still working on figuring out all the possibilities with
these modes, though.


;; yasnippet /w autocomplete
;;
(add-to-list 'load-path "~/emacs/yasnippet")
(require 'yasnippet)
(yas-global-mode 1)

(add-to-list 'load-path "~/emacs/auto-complete")
(require 'auto-complete-config)
(ac-config-default)
(setq ac-menu-height 20)


-- 
Knowledge is volatile and fluid.  Software is power.



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

* Re: Do I have a correct configuration for auto-complete, auto-indent and yasnippet to use the tab key?
  2014-03-19  7:51 ` lee
@ 2014-03-19 16:43   ` Jorge Araya Navarro
  2014-03-21  4:28     ` Dmitry Gutov
  0 siblings, 1 reply; 6+ messages in thread
From: Jorge Araya Navarro @ 2014-03-19 16:43 UTC (permalink / raw)
  To: help-gnu-emacs

Well, I'm using those packages from MELPA. auto-complete (20140314.802),
auto-indent (20131220) and yasnippet (20140314.255) and yasnippet-bundle
(0.6.1) running on GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+
Version 3.10.7) of 2014-01-28 on var-lib-archbuild-extra-x86_64-juergen 
-- 
Pax et bonum.
Jorge Araya Navarro.
Diseñador publicitario, programador Python/C++ y colaborador en Parabola
GNU/Linux-libre. 

El mié, 19-03-2014 a las 08:51 +0100, lee escribió:

> "Jorge Araya Navarro" <kartelo@gmx.com> writes:
> 
> > Hello!
> >
> > I am a happy user of GNU Emacs. So far I have a really good
> > configuration on my Emacs, but I have the impression that
> > auto-complete mode, auto-indent mode and yasnippet mode are not
> > working together as they should to not enter into conflict when the
> > tab key is pressed. For instance, when I'm writing python code, I
> > usually press the tab key to auto complete the name of some variable,
> > however, Emacs does nothing and if I press the key again it change the
> > indentation, and if I press the tab key again, it changes the
> > indentation again, and so on. If I write a word like the if statement
> > yasnippet does nothing. This not happen for the for loop statement,
> > and def statement though.
> 
> It would depend on which versions of auto-complete and yasnippet you`re
> using.  I had to install them from their repos on github because there
> was an incompatibility.  See
> 
> 
> https://github.com/capitaomorte/yasnippet
> https://github.com/auto-complete/auto-complete
> 
> 
> Other than that, what your TAB key does would depend on what it`s bound
> to.  In my case, it`s bound to `yas-expand', probably because I have .  It does what I think it
> should.  I`m still working on figuring out all the possibilities with
> these modes, though.
> 
> 
> ;; yasnippet /w autocomplete
> ;;
> (add-to-list 'load-path "~/emacs/yasnippet")
> (require 'yasnippet)
> (yas-global-mode 1)
> 
> (add-to-list 'load-path "~/emacs/auto-complete")
> (require 'auto-complete-config)
> (ac-config-default)
> (setq ac-menu-height 20)
> 
> 


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

* Re: Do I have a correct configuration for auto-complete, auto-indent and yasnippet to use the tab key?
  2014-03-19 16:43   ` Jorge Araya Navarro
@ 2014-03-21  4:28     ` Dmitry Gutov
  2014-03-21  9:04       ` Jorge Araya Navarro
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2014-03-21  4:28 UTC (permalink / raw)
  To: Jorge Araya Navarro; +Cc: help-gnu-emacs

Jorge Araya Navarro <elcorreo@deshackra.com> writes:

> yasnippet-bundle (0.6.1)

Don't.

This is old, unsupported, and probably incompatible with the latest
Yasnippet, which you have installed.



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

* Re: Do I have a correct configuration for auto-complete, auto-indent and yasnippet to use the tab key?
  2014-03-21  4:28     ` Dmitry Gutov
@ 2014-03-21  9:04       ` Jorge Araya Navarro
  2014-03-21 10:38         ` lee
  0 siblings, 1 reply; 6+ messages in thread
From: Jorge Araya Navarro @ 2014-03-21  9:04 UTC (permalink / raw)
  To: help-gnu-emacs

I deleted the package, but, my emacs started to fail at loading it! 
-- 
Pax et bonum.
Jorge Araya Navarro.
Diseñador publicitario, programador Python/C++ y colaborador en Parabola
GNU/Linux-libre. 

El vie, 21-03-2014 a las 06:28 +0200, Dmitry Gutov escribió:

> Jorge Araya Navarro <elcorreo@deshackra.com> writes:
> 
> > yasnippet-bundle (0.6.1)
> 
> Don't.
> 
> This is old, unsupported, and probably incompatible with the latest
> Yasnippet, which you have installed.


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

* Re: Do I have a correct configuration for auto-complete, auto-indent and yasnippet to use the tab key?
  2014-03-21  9:04       ` Jorge Araya Navarro
@ 2014-03-21 10:38         ` lee
  0 siblings, 0 replies; 6+ messages in thread
From: lee @ 2014-03-21 10:38 UTC (permalink / raw)
  To: help-gnu-emacs

Jorge Araya Navarro <elcorreo@deshackra.com> writes:

> I deleted the package, but, my emacs started to fail at loading it! 

Seems like it cannot load something that has been deleted.

To install yasnippet and auto-complete, I followed the instructions in
their respective repos, and it`s working fine since.  IIRC, you might
want to pull auto-complete recursively to get some library for popups
which has its own instructions.  The documentation points that out.


-- 
Knowledge is volatile and fluid.  Software is power.



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

end of thread, other threads:[~2014-03-21 10:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-18 18:10 Do I have a correct configuration for auto-complete, auto-indent and yasnippet to use the tab key? Jorge Araya Navarro
2014-03-19  7:51 ` lee
2014-03-19 16:43   ` Jorge Araya Navarro
2014-03-21  4:28     ` Dmitry Gutov
2014-03-21  9:04       ` Jorge Araya Navarro
2014-03-21 10:38         ` lee

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.