Expanding with hippie-expand

22 views
Skip to first unread message

pi2...@piprime.fr

unread,
Dec 3, 2009, 6:28:44 AM12/3/09
to smart-...@googlegroups.com
Hi again,

In my .emacs I put�:
(add-to-list 'hippie-expand-try-functions-list 'yas/hippie-try-expand)
and I replace the default key binding M-/ from dabbrev-expand to
hippie-expand�: (global-set-key "\M-/" 'hippie-expand)

Trying foo<M-/><M-/> fails when "foo" is recognized as a snippet key�:
Wrong type argument: integerp, nil

What I have missed�?

8<------8<------8<------8<------8<------8<------8<------8<------8<------
C-h v yas/version<ret>
yas/version is a variable defined in `yasnippet.el'.
Its value is "0.6.1b"

M-x emacs-version<ret>
GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3) of \
2009-11-28 on elegiac, modified by Debian
8<------8<------8<------8<------8<------8<------8<------8<------8<------

Thanks,
--
Philippe Ivaldi.
http://www.piprime.fr/

João Távora

unread,
Dec 3, 2009, 10:00:20 AM12/3/09
to smart-...@googlegroups.com
I can't reproduce this. First, try reproducing with a clean emacs run
(emacs -Q -l yasnippet.el , for example). The enable debug output with
"M-x toggle-debug-on-error" and post the backtrace here. Also post the
contents of your "foo" snippet and indicate what mode it applies to.

Thanks!
Joao
> --
>
> You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" group.
> To post to this group, send email to smart-...@googlegroups.com.
> To unsubscribe from this group, send email to smart-snippe...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.
>
>
>



--
João Távora

pi2...@piprime.fr

unread,
Dec 3, 2009, 12:30:55 PM12/3/09
to smart-...@googlegroups.com
Le 03 d�ソスcembre 2009, Jo�ソスo T�ソスvora �ソスcrivit :

> I can't reproduce this. First, try reproducing with a clean emacs run
> (emacs -Q -l yasnippet.el , for example).

I've used this simplified startup version but yasnippet no longer work
correctly :-(
8<------8<------8<------8<------8<------8<------8<------8<------8<------
(setq max-lisp-eval-depth 9999
max-specpdl-size max-lisp-eval-depth)

(setq user-init-file (expand-file-name "~/emacs.d/init.el"))
(defvar user-init-dir (file-name-directory user-init-file) "")

(defun cuid (FILENAME)
""
(concat user-init-dir FILENAME))

(setq load-path (append load-path (list (cuid "etc")
(cuid "site-lisp"))))

;; http://code.google.com/p/yasnippet/
(when (file-exists-p (cuid "site-lisp/yasnippet"))
(add-to-list 'load-path (cuid "site-lisp/yasnippet"))
(setq yas/root-directory (cuid "site-lisp/pi-snippets"))
(require 'yasnippet)
(yas/load-directory yas/root-directory))

(when (locate-library (cuid "site-lisp/php-mode/php-mode.el"))
(add-to-list 'load-path (cuid "site-lisp/php-mode/"))
(require 'php-mode)
(autoload 'php-mode "php-mode" "Major mode for editing PHP code." t)
(add-to-list 'auto-mode-alist
'("\\.php[345]\\'\\|\\.php\\'\\|\\.phtml\\'" . php-mode)))
8<------8<------8<------8<------8<------8<------8<------8<------8<------

> The enable debug output with
> "M-x toggle-debug-on-error"

Done�ソス!

> and post the backtrace here. Also post the
> contents of your "foo" snippet and indicate what mode it applies to.

In php-mode: sess<TAB>
8<------8<------8<------8<------8<------8<------8<------8<------8<------
Debug on Error enabled globally
Entering debugger...
debugger-setup-buffer: Buffer exceeds maximum size
8<------8<------8<------8<------8<------8<------8<------8<------8<------
Nothing else.

Retrying after M-x toggle-debug-on-error
8<------8<------8<------8<------8<------8<------8<------8<------8<------
Debug on Error disabled globally
cl-safe-expr-p: Lisp nesting exceeds `max-lisp-eval-depth'
8<------8<------8<------8<------8<------8<------8<------8<------8<------

The snippets in php-mode are those found here:
http://hg.apgwoz.com/yasnippet-php-mode/

With the directory php-mode make empty, the problem persists�ソス!

I don't understand now why Yasnippet does no longer work in php-mode! I
don't speak about hippie-expand...

Notes:
* Yasnippet works in html-mode...
* I use the php-mode http://php-mode.sourceforge.net/

Thank for your help,

João Távora

unread,
Dec 4, 2009, 9:51:27 AM12/4/09
to smart-...@googlegroups.com
Try with yasnippet-bundle then:

step 1: $ emacs -Q -l yasnippet-bundle.el
step 2: type "(add-to-list 'hippie-expand-try-functions-list
'yas/hippie-try-expand)|
step 3: M-x eval-buffer
step 4: use hippie-expand to expand a snippet.

I'm verry sorry, but if this does not trigger your error, you're on
your own (or someone else might help you).
It probably has something to do with your pi-snippets. I cannot
provide support for software outside of yasnippet.

Actually, to be honest, I cannot grant much support for yasnippet itself.
Bye
j


On Thu, Dec 3, 2009 at 6:30 PM, <pi2...@piprime.fr> wrote:
> Le 03 décembre 2009, João Távora écrivit :
> Done !
>
>> and post the backtrace here. Also post the
>> contents of your "foo" snippet and indicate what mode it applies to.
>
> In php-mode: sess<TAB>
> 8<------8<------8<------8<------8<------8<------8<------8<------8<------
> Debug on Error enabled globally
> Entering debugger...
> debugger-setup-buffer: Buffer exceeds maximum size
> 8<------8<------8<------8<------8<------8<------8<------8<------8<------
> Nothing else.
>
> Retrying after M-x toggle-debug-on-error
> 8<------8<------8<------8<------8<------8<------8<------8<------8<------
> Debug on Error disabled globally
> cl-safe-expr-p: Lisp nesting exceeds `max-lisp-eval-depth'
> 8<------8<------8<------8<------8<------8<------8<------8<------8<------
>
> The snippets in php-mode are those found here:
> http://hg.apgwoz.com/yasnippet-php-mode/
>
> With the directory php-mode make empty, the problem persists !
>
> I don't understand now why Yasnippet does no longer work in php-mode! I
> don't speak about hippie-expand...
>
> Notes:
> * Yasnippet works in html-mode...
> * I use the php-mode http://php-mode.sourceforge.net/
>
> Thank for your help,
> --
>   Philippe Ivaldi.
> http://www.piprime.fr/
>

pi2...@piprime.fr

unread,
Dec 11, 2009, 5:43:24 PM12/11/09
to smart-...@googlegroups.com
Hi,

> It probably has something to do with your pi-snippets.

You're right�!
I had the directory ~/emacs.d/site-lisp/pi-snippets/text-mode/php-mode/php-mode
so there was a recursive loop with php-mode.

Sorry for the noise and thank for your help,
Reply all
Reply to author
Forward
0 new messages