[Sorry, I was halfway through writing this post and google groups posted it for me.]
I've got a problem with this snippet, intended for latex-mode:
# -*- mode: snippet -*- # name: set # key: set # binding: "C-?" # -- \{ `yas/selected-text`$1 \\}$0
The "name" part works OK, so I can expand "set" in latex-mode, but not the binding. Here's what I get in *Messages* after loading with C-c C- c in snippet-mode or yas/reload-all:
[yas] warning: keybinding "C-?" invalid for snippet "set" since keymap "latex-mode-map" does not (yet?) exist.
How come? Thanks,
Jim On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
I think this is because the keymap is called LaTeX-mode-map, not latex- mode-map. This is annoying because the mode is called latex-mode, not LaTeX-mode and I am guessing you derive the name of the keymap from the path? Defining latex-mode-map fixes it:
(setq latex-mode-map LaTeX-mode-map)
Jim
On Mar 12, 1:28 pm, Jim Burton <jimburt...@gmail.com> wrote:
> The "name" part works OK, so I can expand "set" in latex-mode, but not > the binding. Here's what I get in *Messages* after loading with C-c C- > c in snippet-mode or yas/reload-all:
> [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > "latex-mode-map" does not (yet?) exist.
> How come? Thanks,
> Jim > On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
> > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > > "latex-mode-map" does not (yet?) exist.
On Mar 22, 1:01 pm, Jim Burton <jimburt...@gmail.com> wrote:
> I think this is because the keymap is called LaTeX-mode-map, not latex- > mode-map. This is annoying because the mode is called latex-mode, not > LaTeX-mode and I am guessing you derive the name of the keymap from > the path? Defining latex-mode-map fixes it:
> (setq latex-mode-map LaTeX-mode-map)
This only works if it is evaluated after the keymap is defined and before yas is loaded, but it seems the keymap isn't defined until you visit a tex file? The only way I can get the keybinding set when I open a tex file is to add
> > The "name" part works OK, so I can expand "set" in latex-mode, but not > > the binding. Here's what I get in *Messages* after loading with C-c C- > > c in snippet-mode or yas/reload-all:
> > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > > "latex-mode-map" does not (yet?) exist.
> > How come? Thanks,
> > Jim > > On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
> > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > > > "latex-mode-map" does not (yet?) exist.
On Mon, Mar 22, 2010 at 2:21 PM, Jim Burton <jimburt...@gmail.com> wrote: > On Mar 22, 1:01 pm, Jim Burton <jimburt...@gmail.com> wrote: >> I think this is because the keymap is called LaTeX-mode-map, not latex- >> mode-map. This is annoying because the mode is called latex-mode, not >> LaTeX-mode and I am guessing you derive the name of the keymap from >> the path? Defining latex-mode-map fixes it:
>> (setq latex-mode-map LaTeX-mode-map)
> This only works if it is evaluated after the keymap is defined and > before yas is loaded, but it seems the keymap isn't defined until you > visit a tex file? The only way I can get the keybinding set when I > open a tex file is to add
>> > The "name" part works OK, so I can expand "set" in latex-mode, but not >> > the binding. Here's what I get in *Messages* after loading with C-c C- >> > c in snippet-mode or yas/reload-all:
>> > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap >> > "latex-mode-map" does not (yet?) exist.
>> > How come? Thanks,
>> > Jim >> > On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
>> > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap >> > > "latex-mode-map" does not (yet?) exist.
> -- > 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-snippet@googlegroups.com. > To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.
Thinking about this some more, it seems not to be (only) related to the name of the keymap but the way yas adds bindings to keymaps -- should it not do so by adding a define-key to the _hook_ for each mode?
Jim
On Mar 22, 1:21 pm, Jim Burton <jimburt...@gmail.com> wrote:
> On Mar 22, 1:01 pm, Jim Burton <jimburt...@gmail.com> wrote:
> > I think this is because the keymap is called LaTeX-mode-map, not latex- > > mode-map. This is annoying because the mode is called latex-mode, not > > LaTeX-mode and I am guessing you derive the name of the keymap from > > the path? Defining latex-mode-map fixes it:
> > (setq latex-mode-map LaTeX-mode-map)
> This only works if it is evaluated after the keymap is defined and > before yas is loaded, but it seems the keymap isn't defined until you > visit a tex file? The only way I can get the keybinding set when I > open a tex file is to add
> > > The "name" part works OK, so I can expand "set" in latex-mode, but not > > > the binding. Here's what I get in *Messages* after loading with C-c C- > > > c in snippet-mode or yas/reload-all:
> > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > > > "latex-mode-map" does not (yet?) exist.
> > > How come? Thanks,
> > > Jim > > > On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
> > > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > > > > "latex-mode-map" does not (yet?) exist.
On Mon, Mar 22, 2010 at 3:58 PM, Jim Burton <jimburt...@gmail.com> wrote: > Thinking about this some more, it seems not to be (only) related to > the name of the keymap but the way yas adds bindings to keymaps -- > should it not do so by adding a define-key to the _hook_ for each > mode?
Errr, yes, more or less, it's complicated, but anyway in the trunk and upcoming 0.7 this problem no longer exists, as a variable called emulation-mode-maps-alist is used, which simplifies the whole issue and correctly insulates the mode's maps of all yasnippet interference.
I suspect you're using 0.6something, so I encourage you to try out the trunk:
and experiment heavily with keybindings since that's one of the most underused features. Notice that in the new version, multiple snippets, even across different modes, can share the same keybinding.
> On Mar 22, 1:21 pm, Jim Burton <jimburt...@gmail.com> wrote: >> On Mar 22, 1:01 pm, Jim Burton <jimburt...@gmail.com> wrote:
>> > I think this is because the keymap is called LaTeX-mode-map, not latex- >> > mode-map. This is annoying because the mode is called latex-mode, not >> > LaTeX-mode and I am guessing you derive the name of the keymap from >> > the path? Defining latex-mode-map fixes it:
>> > (setq latex-mode-map LaTeX-mode-map)
>> This only works if it is evaluated after the keymap is defined and >> before yas is loaded, but it seems the keymap isn't defined until you >> visit a tex file? The only way I can get the keybinding set when I >> open a tex file is to add
>> > > The "name" part works OK, so I can expand "set" in latex-mode, but not >> > > the binding. Here's what I get in *Messages* after loading with C-c C- >> > > c in snippet-mode or yas/reload-all:
>> > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap >> > > "latex-mode-map" does not (yet?) exist.
>> > > How come? Thanks,
>> > > Jim >> > > On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
>> > > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap >> > > > "latex-mode-map" does not (yet?) exist.
> -- > 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-snippet@googlegroups.com. > To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.
On Mar 22, 3:13 pm, João Távora <joaotav...@gmail.com> wrote:
> On Mon, Mar 22, 2010 at 3:58 PM, Jim Burton <jimburt...@gmail.com> wrote: > > Thinking about this some more, it seems not to be (only) related to > > the name of the keymap but the way yas adds bindings to keymaps -- > > should it not do so by adding a define-key to the _hook_ for each > > mode?
> Errr, yes, more or less, it's complicated, but anyway in the trunk and > upcoming 0.7 this problem no longer exists, as a variable called > emulation-mode-maps-alist is used, which simplifies the whole issue > and correctly insulates the mode's maps of all yasnippet interference.
> I suspect you're using 0.6something, so I encourage you to try out the trunk:
> Notice that in the new version, multiple snippets, > even across different modes, can share the same keybinding.
> Bye! > J
> > Jim
> > On Mar 22, 1:21 pm, Jim Burton <jimburt...@gmail.com> wrote: > >> On Mar 22, 1:01 pm, Jim Burton <jimburt...@gmail.com> wrote:
> >> > I think this is because the keymap is called LaTeX-mode-map, not latex- > >> > mode-map. This is annoying because the mode is called latex-mode, not > >> > LaTeX-mode and I am guessing you derive the name of the keymap from > >> > the path? Defining latex-mode-map fixes it:
> >> > (setq latex-mode-map LaTeX-mode-map)
> >> This only works if it is evaluated after the keymap is defined and > >> before yas is loaded, but it seems the keymap isn't defined until you > >> visit a tex file? The only way I can get the keybinding set when I > >> open a tex file is to add
> >> > > The "name" part works OK, so I can expand "set" in latex-mode, but not > >> > > the binding. Here's what I get in *Messages* after loading with C-c C- > >> > > c in snippet-mode or yas/reload-all:
> >> > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > >> > > "latex-mode-map" does not (yet?) exist.
> >> > > How come? Thanks,
> >> > > Jim > >> > > On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
> >> > > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > >> > > > "latex-mode-map" does not (yet?) exist.
> > -- > > 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-snippet@googlegroups.com. > > To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
The version from svn seems to be broken for me. Loading a tex document I get no yas menu and none of the snippets aredefined. I have added the defvaralias to LaTeX-mode-hook, and get this in *Messages*:
[...] [yas] Warning: the "# group:" is no longer supported! [80 times] For information about GNU Emacs and the GNU system, type C-h C-a. Loading tramp...done Automatic display of crossref information was turned on Starting new Ispell process [default] ... File mode specification error: (void-variable latex-mode-map) Applying style hooks... Loading /home/jim/sdf-git/papers/thesis/auto/main.el (source)...done Applying style hooks... done File mode specification error: (void-variable latex-mode-map) [end of messages]
Removing the defvaralias has no effect.
Jim
On Mar 22, 3:13 pm, João Távora <joaotav...@gmail.com> wrote:
> On Mon, Mar 22, 2010 at 3:58 PM, Jim Burton <jimburt...@gmail.com> wrote: > > Thinking about this some more, it seems not to be (only) related to > > the name of the keymap but the way yas adds bindings to keymaps -- > > should it not do so by adding a define-key to the _hook_ for each > > mode?
> Errr, yes, more or less, it's complicated, but anyway in the trunk and > upcoming 0.7 this problem no longer exists, as a variable called > emulation-mode-maps-alist is used, which simplifies the whole issue > and correctly insulates the mode's maps of all yasnippet interference.
> I suspect you're using 0.6something, so I encourage you to try out the trunk:
> and experiment heavily with keybindings since that's one of the most > underused features. Notice that in the new version, multiple snippets, > even across different modes, can share the same keybinding.
> Bye! > J
> > Jim
> > On Mar 22, 1:21 pm, Jim Burton <jimburt...@gmail.com> wrote: > >> On Mar 22, 1:01 pm, Jim Burton <jimburt...@gmail.com> wrote:
> >> > I think this is because the keymap is called LaTeX-mode-map, not latex- > >> > mode-map. This is annoying because the mode is called latex-mode, not > >> > LaTeX-mode and I am guessing you derive the name of the keymap from > >> > the path? Defining latex-mode-map fixes it:
> >> > (setq latex-mode-map LaTeX-mode-map)
> >> This only works if it is evaluated after the keymap is defined and > >> before yas is loaded, but it seems the keymap isn't defined until you > >> visit a tex file? The only way I can get the keybinding set when I > >> open a tex file is to add
> >> > > The "name" part works OK, so I can expand "set" in latex-mode, but not > >> > > the binding. Here's what I get in *Messages* after loading with C-c C- > >> > > c in snippet-mode or yas/reload-all:
> >> > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > >> > > "latex-mode-map" does not (yet?) exist.
> >> > > How come? Thanks,
> >> > > Jim > >> > > On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
> >> > > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > >> > > > "latex-mode-map" does not (yet?) exist.
> > -- > > 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-snippet@googlegroups.com. > > To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
If it doesn't happen, then its a problem with your previous config. It if still happens, post a zip of your latex snippets here, or better yet, all your snippet dirs, as long as they're relatively small.
PS: I don't think the defvaralias matters anymore. It was just a workaround for 0.6.1, did you try it?
On Mon, Mar 22, 2010 at 4:41 PM, Jim Burton <jimburt...@gmail.com> wrote: > The version from svn seems to be broken for me. Loading a tex document > I get no yas menu and none of the snippets aredefined. I have added > the defvaralias to LaTeX-mode-hook, and get this in *Messages*:
> [...] > [yas] Warning: the "# group:" is no longer supported! [80 times] > For information about GNU Emacs and the GNU system, type C-h C-a. > Loading tramp...done > Automatic display of crossref information was turned on > Starting new Ispell process [default] ... > File mode specification error: (void-variable latex-mode-map) > Applying style hooks... > Loading /home/jim/sdf-git/papers/thesis/auto/main.el (source)...done > Applying style hooks... done > File mode specification error: (void-variable latex-mode-map) > [end of messages]
> Removing the defvaralias has no effect.
> Jim
> On Mar 22, 3:13 pm, João Távora <joaotav...@gmail.com> wrote: >> On Mon, Mar 22, 2010 at 3:58 PM, Jim Burton <jimburt...@gmail.com> wrote: >> > Thinking about this some more, it seems not to be (only) related to >> > the name of the keymap but the way yas adds bindings to keymaps -- >> > should it not do so by adding a define-key to the _hook_ for each >> > mode?
>> Errr, yes, more or less, it's complicated, but anyway in the trunk and >> upcoming 0.7 this problem no longer exists, as a variable called >> emulation-mode-maps-alist is used, which simplifies the whole issue >> and correctly insulates the mode's maps of all yasnippet interference.
>> I suspect you're using 0.6something, so I encourage you to try out the trunk:
>> and experiment heavily with keybindings since that's one of the most >> underused features. Notice that in the new version, multiple snippets, >> even across different modes, can share the same keybinding.
>> Bye! >> J
>> > Jim
>> > On Mar 22, 1:21 pm, Jim Burton <jimburt...@gmail.com> wrote: >> >> On Mar 22, 1:01 pm, Jim Burton <jimburt...@gmail.com> wrote:
>> >> > I think this is because the keymap is called LaTeX-mode-map, not latex- >> >> > mode-map. This is annoying because the mode is called latex-mode, not >> >> > LaTeX-mode and I am guessing you derive the name of the keymap from >> >> > the path? Defining latex-mode-map fixes it:
>> >> > (setq latex-mode-map LaTeX-mode-map)
>> >> This only works if it is evaluated after the keymap is defined and >> >> before yas is loaded, but it seems the keymap isn't defined until you >> >> visit a tex file? The only way I can get the keybinding set when I >> >> open a tex file is to add
>> >> > > The "name" part works OK, so I can expand "set" in latex-mode, but not >> >> > > the binding. Here's what I get in *Messages* after loading with C-c C- >> >> > > c in snippet-mode or yas/reload-all:
>> >> > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap >> >> > > "latex-mode-map" does not (yet?) exist.
>> >> > > How come? Thanks,
>> >> > > Jim >> >> > > On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
>> >> > > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap >> >> > > > "latex-mode-map" does not (yet?) exist.
>> > -- >> > 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-snippet@googlegroups.com. >> > To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. >> > For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
>> -- >> João Távora
> -- > 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-snippet@googlegroups.com. > To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.
On Mar 22, 5:08 pm, João Távora <joaotav...@gmail.com> wrote:
> Obviously, being a version currently under development, you must bear > with some instabilities. :-) can you reproduce this with a clean > emacs -Q run?
> like "emacs -Q -l yasnippet.el -l simpleinit.el"
This loads without any errors (*Messages* contains the warnings from before but no errors). I can see two problems though: there are no submenus beneath text-mode, just a long list with every snippet listed, and although I can select a snippet from the menu, neither tab- expansion or bindings work. I'm using Gnu Emacs 23.0.91.1.
> If it doesn't happen, then its a problem with your previous config. It > if still happens, post a zip of your latex snippets here, or better > yet, all your snippet dirs, as long as they're relatively small.
> PS: I don't think the defvaralias matters anymore. It was just a > workaround for 0.6.1, did you try it?
Yes I did, and 0.6.1c is working fine for me with that, so I'm quite happy to stick to that version for now.
> On Mon, Mar 22, 2010 at 4:41 PM, Jim Burton <jimburt...@gmail.com> wrote: > > The version from svn seems to be broken for me. Loading a tex document > > I get no yas menu and none of the snippets aredefined. I have added > > the defvaralias to LaTeX-mode-hook, and get this in *Messages*:
> > [...] > > [yas] Warning: the "# group:" is no longer supported! [80 times] > > For information about GNU Emacs and the GNU system, type C-h C-a. > > Loading tramp...done > > Automatic display of crossref information was turned on > > Starting new Ispell process [default] ... > > File mode specification error: (void-variable latex-mode-map) > > Applying style hooks... > > Loading /home/jim/sdf-git/papers/thesis/auto/main.el (source)...done > > Applying style hooks... done > > File mode specification error: (void-variable latex-mode-map) > > [end of messages]
> > Removing the defvaralias has no effect.
> > Jim
> > On Mar 22, 3:13 pm, João Távora <joaotav...@gmail.com> wrote: > >> On Mon, Mar 22, 2010 at 3:58 PM, Jim Burton <jimburt...@gmail.com> wrote: > >> > Thinking about this some more, it seems not to be (only) related to > >> > the name of the keymap but the way yas adds bindings to keymaps -- > >> > should it not do so by adding a define-key to the _hook_ for each > >> > mode?
> >> Errr, yes, more or less, it's complicated, but anyway in the trunk and > >> upcoming 0.7 this problem no longer exists, as a variable called > >> emulation-mode-maps-alist is used, which simplifies the whole issue > >> and correctly insulates the mode's maps of all yasnippet interference.
> >> I suspect you're using 0.6something, so I encourage you to try out the trunk:
> >> and experiment heavily with keybindings since that's one of the most > >> underused features. Notice that in the new version, multiple snippets, > >> even across different modes, can share the same keybinding.
> >> Bye! > >> J
> >> > Jim
> >> > On Mar 22, 1:21 pm, Jim Burton <jimburt...@gmail.com> wrote: > >> >> On Mar 22, 1:01 pm, Jim Burton <jimburt...@gmail.com> wrote:
> >> >> > I think this is because the keymap is called LaTeX-mode-map, not latex- > >> >> > mode-map. This is annoying because the mode is called latex-mode, not > >> >> > LaTeX-mode and I am guessing you derive the name of the keymap from > >> >> > the path? Defining latex-mode-map fixes it:
> >> >> > (setq latex-mode-map LaTeX-mode-map)
> >> >> This only works if it is evaluated after the keymap is defined and > >> >> before yas is loaded, but it seems the keymap isn't defined until you > >> >> visit a tex file? The only way I can get the keybinding set when I > >> >> open a tex file is to add
> >> >> > > The "name" part works OK, so I can expand "set" in latex-mode, but not > >> >> > > the binding. Here's what I get in *Messages* after loading with C-c C- > >> >> > > c in snippet-mode or yas/reload-all:
> >> >> > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > >> >> > > "latex-mode-map" does not (yet?) exist.
> >> >> > > How come? Thanks,
> >> >> > > Jim > >> >> > > On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
> >> >> > > > [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > >> >> > > > "latex-mode-map" does not (yet?) exist.
> >> > -- > >> > 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-snippet@googlegroups.com. > >> > To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. > >> > For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
> >> -- > >> João Távora
> > -- > > 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-snippet@googlegroups.com. > > To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
> On Mar 22, 5:08 pm, João Távora <joaotav...@gmail.com> wrote: >> Obviously, being a version currently under development, you must bear >> with some instabilities. :-) can you reproduce this with a clean >> emacs -Q run?
>> like "emacs -Q -l yasnippet.el -l simpleinit.el"
> This loads without any errors (*Messages* contains the warnings from > before but no errors). I can see two problems though: there are no > submenus beneath text-mode, just a long list with every snippet > listed, and although I can select a snippet from the menu, neither tab- > expansion or bindings work. I'm using Gnu Emacs 23.0.91.1.
>> If it doesn't happen, then its a problem with your previous config. It >> if still happens, post a zip of your latex snippets here, or better >> yet, all your snippet dirs, as long as they're relatively small.
>> PS: I don't think the defvaralias matters anymore. It was just a >> workaround for 0.6.1, did you try it?
> Yes I did, and 0.6.1c is working fine for me with that, so I'm quite > happy to stick to that version for now.
> Thanks,
> Jim
>> Thanks! >> J
>> On Mon, Mar 22, 2010 at 4:41 PM, Jim Burton <jimburt...@gmail.com> wrote: >>> The version from svn seems to be broken for me. Loading a tex document >>> I get no yas menu and none of the snippets aredefined. I have added >>> the defvaralias to LaTeX-mode-hook, and get this in *Messages*:
>>> [...] >>> [yas] Warning: the "# group:" is no longer supported! [80 times] >>> For information about GNU Emacs and the GNU system, type C-h C-a. >>> Loading tramp...done >>> Automatic display of crossref information was turned on >>> Starting new Ispell process [default] ... >>> File mode specification error: (void-variable latex-mode-map) >>> Applying style hooks... >>> Loading /home/jim/sdf-git/papers/thesis/auto/main.el (source)...done >>> Applying style hooks... done >>> File mode specification error: (void-variable latex-mode-map) >>> [end of messages]
>>> Removing the defvaralias has no effect.
>>> Jim
>>> On Mar 22, 3:13 pm, João Távora <joaotav...@gmail.com> wrote: >>>> On Mon, Mar 22, 2010 at 3:58 PM, Jim Burton <jimburt...@gmail.com> wrote: >>>>> Thinking about this some more, it seems not to be (only) related to >>>>> the name of the keymap but the way yas adds bindings to keymaps -- >>>>> should it not do so by adding a define-key to the _hook_ for each >>>>> mode?
>>>> Errr, yes, more or less, it's complicated, but anyway in the trunk and >>>> upcoming 0.7 this problem no longer exists, as a variable called >>>> emulation-mode-maps-alist is used, which simplifies the whole issue >>>> and correctly insulates the mode's maps of all yasnippet interference.
>>>> I suspect you're using 0.6something, so I encourage you to try out the trunk:
>>>> and experiment heavily with keybindings since that's one of the most >>>> underused features. Notice that in the new version, multiple snippets, >>>> even across different modes, can share the same keybinding.
>>>> Bye! >>>> J
>>>>> Jim
>>>>> On Mar 22, 1:21 pm, Jim Burton <jimburt...@gmail.com> wrote: >>>>>> On Mar 22, 1:01 pm, Jim Burton <jimburt...@gmail.com> wrote:
>>>>>>> I think this is because the keymap is called LaTeX-mode-map, not latex- >>>>>>> mode-map. This is annoying because the mode is called latex-mode, not >>>>>>> LaTeX-mode and I am guessing you derive the name of the keymap from >>>>>>> the path? Defining latex-mode-map fixes it:
>>>>>>> (setq latex-mode-map LaTeX-mode-map)
>>>>>> This only works if it is evaluated after the keymap is defined and >>>>>> before yas is loaded, but it seems the keymap isn't defined until you >>>>>> visit a tex file? The only way I can get the keybinding set when I >>>>>> open a tex file is to add
>>>>>>>> The "name" part works OK, so I can expand "set" in latex-mode, but not >>>>>>>> the binding. Here's what I get in *Messages* after loading with C-c C- >>>>>>>> c in snippet-mode or yas/reload-all:
>>>>>>>> [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap >>>>>>>> "latex-mode-map" does not (yet?) exist.
>>>>>>>> How come? Thanks,
>>>>>>>> Jim >>>>>>>> On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
>>>>>>>>> [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap >>>>>>>>> "latex-mode-map" does not (yet?) exist.
>>>>> -- >>>>> 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-snippet@googlegroups.com. >>>>> To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. >>>>> For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
>>>> -- >>>> João Távora
>>> -- >>> 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-snippet@googlegroups.com. >>> To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. >>> For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
>> -- >> João Távora
> -- > 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-snippet@googlegroups.com. > To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.
I was using my own snippets and I discovered that there was a non- snippet file in amongst them, a lisp file generated by AUCTeX (I think I accidentally compiled one of the snippet files somehow). Removing this file fixed the problem.
Thanks for your help.
Jim
On Mar 22, 10:45 pm, João Távora <joaotav...@gmail.com> wrote:
> If you used your own snippet collection please post it here so I can debug this problem.
> Thanks, > Joao
> On Mar 22, 2010, at 6:32 PM, Jim Burton wrote:
> > On Mar 22, 5:08 pm, João Távora <joaotav...@gmail.com> wrote: > >> Obviously, being a version currently under development, you must bear > >> with some instabilities. :-) can you reproduce this with a clean > >> emacs -Q run?
> >> like "emacs -Q -l yasnippet.el -l simpleinit.el"
> > This loads without any errors (*Messages* contains the warnings from > > before but no errors). I can see two problems though: there are no > > submenus beneath text-mode, just a long list with every snippet > > listed, and although I can select a snippet from the menu, neither tab- > > expansion or bindings work. I'm using Gnu Emacs 23.0.91.1.
> >> If it doesn't happen, then its a problem with your previous config. It > >> if still happens, post a zip of your latex snippets here, or better > >> yet, all your snippet dirs, as long as they're relatively small.
> >> PS: I don't think the defvaralias matters anymore. It was just a > >> workaround for 0.6.1, did you try it?
> > Yes I did, and 0.6.1c is working fine for me with that, so I'm quite > > happy to stick to that version for now.
> > Thanks,
> > Jim
> >> Thanks! > >> J
> >> On Mon, Mar 22, 2010 at 4:41 PM, Jim Burton <jimburt...@gmail.com> wrote: > >>> The version from svn seems to be broken for me. Loading a tex document > >>> I get no yas menu and none of the snippets aredefined. I have added > >>> the defvaralias to LaTeX-mode-hook, and get this in *Messages*:
> >>> [...] > >>> [yas] Warning: the "# group:" is no longer supported! [80 times] > >>> For information about GNU Emacs and the GNU system, type C-h C-a. > >>> Loading tramp...done > >>> Automatic display of crossref information was turned on > >>> Starting new Ispell process [default] ... > >>> File mode specification error: (void-variable latex-mode-map) > >>> Applying style hooks... > >>> Loading /home/jim/sdf-git/papers/thesis/auto/main.el (source)...done > >>> Applying style hooks... done > >>> File mode specification error: (void-variable latex-mode-map) > >>> [end of messages]
> >>> Removing the defvaralias has no effect.
> >>> Jim
> >>> On Mar 22, 3:13 pm, João Távora <joaotav...@gmail.com> wrote: > >>>> On Mon, Mar 22, 2010 at 3:58 PM, Jim Burton <jimburt...@gmail.com> wrote: > >>>>> Thinking about this some more, it seems not to be (only) related to > >>>>> the name of the keymap but the way yas adds bindings to keymaps -- > >>>>> should it not do so by adding a define-key to the _hook_ for each > >>>>> mode?
> >>>> Errr, yes, more or less, it's complicated, but anyway in the trunk and > >>>> upcoming 0.7 this problem no longer exists, as a variable called > >>>> emulation-mode-maps-alist is used, which simplifies the whole issue > >>>> and correctly insulates the mode's maps of all yasnippet interference.
> >>>> I suspect you're using 0.6something, so I encourage you to try out the trunk:
> >>>> and experiment heavily with keybindings since that's one of the most > >>>> underused features. Notice that in the new version, multiple snippets, > >>>> even across different modes, can share the same keybinding.
> >>>> Bye! > >>>> J
> >>>>> Jim
> >>>>> On Mar 22, 1:21 pm, Jim Burton <jimburt...@gmail.com> wrote: > >>>>>> On Mar 22, 1:01 pm, Jim Burton <jimburt...@gmail.com> wrote:
> >>>>>>> I think this is because the keymap is called LaTeX-mode-map, not latex- > >>>>>>> mode-map. This is annoying because the mode is called latex-mode, not > >>>>>>> LaTeX-mode and I am guessing you derive the name of the keymap from > >>>>>>> the path? Defining latex-mode-map fixes it:
> >>>>>>> (setq latex-mode-map LaTeX-mode-map)
> >>>>>> This only works if it is evaluated after the keymap is defined and > >>>>>> before yas is loaded, but it seems the keymap isn't defined until you > >>>>>> visit a tex file? The only way I can get the keybinding set when I > >>>>>> open a tex file is to add
> >>>>>>>> The "name" part works OK, so I can expand "set" in latex-mode, but not > >>>>>>>> the binding. Here's what I get in *Messages* after loading with C-c C- > >>>>>>>> c in snippet-mode or yas/reload-all:
> >>>>>>>> [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > >>>>>>>> "latex-mode-map" does not (yet?) exist.
> >>>>>>>> How come? Thanks,
> >>>>>>>> Jim > >>>>>>>> On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
> >>>>>>>>> [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap > >>>>>>>>> "latex-mode-map" does not (yet?) exist.
> >>>>> -- > >>>>> 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-snippet@googlegroups.com. > >>>>> To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. > >>>>> For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
> >>>> -- > >>>> João Távora
> >>> -- > >>> 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-snippet@googlegroups.com. > >>> To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. > >>> For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
> >> -- > >> João Távora
> > -- > > 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-snippet@googlegroups.com. > > To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
OK, so just to confirm. You *can* use the svn trunk (upcoming 0.7) correctly with your AUCTeX snippets, together with the bundled snippets.
It's strange about that file, but I'm glad it works. From the behaviour you described earlier (big list of snippets under text-mode), I would have guessed you tried to use the 0.6 snippet collection with 0.7, which is incompatible and would produce just that, since the hierarchy organization has been completely replaced by the used of ".yas-parents".
So have fun and report any strange behaviour here, João
On Tue, Mar 23, 2010 at 11:59 AM, Jim Burton <jimburt...@gmail.com> wrote: > I was using my own snippets and I discovered that there was a non- > snippet file in amongst them, a lisp file generated by AUCTeX (I think > I accidentally compiled one of the snippet files somehow). Removing > this file fixed the problem.
> Thanks for your help.
> Jim
> On Mar 22, 10:45 pm, João Távora <joaotav...@gmail.com> wrote: >> Did you use your own snippets or the snippets in the trunk? In other words, what did you use as
>> If you used your own snippet collection please post it here so I can debug this problem.
>> Thanks, >> Joao
>> On Mar 22, 2010, at 6:32 PM, Jim Burton wrote:
>> > On Mar 22, 5:08 pm, João Távora <joaotav...@gmail.com> wrote: >> >> Obviously, being a version currently under development, you must bear >> >> with some instabilities. :-) can you reproduce this with a clean >> >> emacs -Q run?
>> >> like "emacs -Q -l yasnippet.el -l simpleinit.el"
>> > This loads without any errors (*Messages* contains the warnings from >> > before but no errors). I can see two problems though: there are no >> > submenus beneath text-mode, just a long list with every snippet >> > listed, and although I can select a snippet from the menu, neither tab- >> > expansion or bindings work. I'm using Gnu Emacs 23.0.91.1.
>> >> If it doesn't happen, then its a problem with your previous config. It >> >> if still happens, post a zip of your latex snippets here, or better >> >> yet, all your snippet dirs, as long as they're relatively small.
>> >> PS: I don't think the defvaralias matters anymore. It was just a >> >> workaround for 0.6.1, did you try it?
>> > Yes I did, and 0.6.1c is working fine for me with that, so I'm quite >> > happy to stick to that version for now.
>> > Thanks,
>> > Jim
>> >> Thanks! >> >> J
>> >> On Mon, Mar 22, 2010 at 4:41 PM, Jim Burton <jimburt...@gmail.com> wrote: >> >>> The version from svn seems to be broken for me. Loading a tex document >> >>> I get no yas menu and none of the snippets aredefined. I have added >> >>> the defvaralias to LaTeX-mode-hook, and get this in *Messages*:
>> >>> [...] >> >>> [yas] Warning: the "# group:" is no longer supported! [80 times] >> >>> For information about GNU Emacs and the GNU system, type C-h C-a. >> >>> Loading tramp...done >> >>> Automatic display of crossref information was turned on >> >>> Starting new Ispell process [default] ... >> >>> File mode specification error: (void-variable latex-mode-map) >> >>> Applying style hooks... >> >>> Loading /home/jim/sdf-git/papers/thesis/auto/main.el (source)...done >> >>> Applying style hooks... done >> >>> File mode specification error: (void-variable latex-mode-map) >> >>> [end of messages]
>> >>> Removing the defvaralias has no effect.
>> >>> Jim
>> >>> On Mar 22, 3:13 pm, João Távora <joaotav...@gmail.com> wrote: >> >>>> On Mon, Mar 22, 2010 at 3:58 PM, Jim Burton <jimburt...@gmail.com> wrote: >> >>>>> Thinking about this some more, it seems not to be (only) related to >> >>>>> the name of the keymap but the way yas adds bindings to keymaps -- >> >>>>> should it not do so by adding a define-key to the _hook_ for each >> >>>>> mode?
>> >>>> Errr, yes, more or less, it's complicated, but anyway in the trunk and >> >>>> upcoming 0.7 this problem no longer exists, as a variable called >> >>>> emulation-mode-maps-alist is used, which simplifies the whole issue >> >>>> and correctly insulates the mode's maps of all yasnippet interference.
>> >>>> I suspect you're using 0.6something, so I encourage you to try out the trunk:
>> >>>> and experiment heavily with keybindings since that's one of the most >> >>>> underused features. Notice that in the new version, multiple snippets, >> >>>> even across different modes, can share the same keybinding.
>> >>>> Bye! >> >>>> J
>> >>>>> Jim
>> >>>>> On Mar 22, 1:21 pm, Jim Burton <jimburt...@gmail.com> wrote: >> >>>>>> On Mar 22, 1:01 pm, Jim Burton <jimburt...@gmail.com> wrote:
>> >>>>>>> I think this is because the keymap is called LaTeX-mode-map, not latex- >> >>>>>>> mode-map. This is annoying because the mode is called latex-mode, not >> >>>>>>> LaTeX-mode and I am guessing you derive the name of the keymap from >> >>>>>>> the path? Defining latex-mode-map fixes it:
>> >>>>>>> (setq latex-mode-map LaTeX-mode-map)
>> >>>>>> This only works if it is evaluated after the keymap is defined and >> >>>>>> before yas is loaded, but it seems the keymap isn't defined until you >> >>>>>> visit a tex file? The only way I can get the keybinding set when I >> >>>>>> open a tex file is to add
>> >>>>>>>> The "name" part works OK, so I can expand "set" in latex-mode, but not >> >>>>>>>> the binding. Here's what I get in *Messages* after loading with C-c C- >> >>>>>>>> c in snippet-mode or yas/reload-all:
>> >>>>>>>> [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap >> >>>>>>>> "latex-mode-map" does not (yet?) exist.
>> >>>>>>>> How come? Thanks,
>> >>>>>>>> Jim >> >>>>>>>> On Mar 12, 1:23 pm, Jim Burton <jimburt...@gmail.com> wrote:
>> >>>>>>>>> [yas] warning: keybinding "C-?" invalid for snippet "set" since keymap >> >>>>>>>>> "latex-mode-map" does not (yet?) exist.
>> >>>>> -- >> >>>>> 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-snippet@googlegroups.com. >> >>>>> To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. >> >>>>> For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
>> >>>> -- >> >>>> João Távora
>> >>> -- >> >>> 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-snippet@googlegroups.com. >> >>> To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. >> >>> For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
>> >> -- >> >> João Távora
>> > -- >> > 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-snippet@googlegroups.com. >> > To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. >> > For more options, visit this group athttp://groups.google.com/group/smart-snippet?hl=en.
> -- > 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-snippet@googlegroups.com. > To unsubscribe from this group, send email to smart-snippet+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.