E227: mapping already exists for ~@�SSpecChangelog

351 views
Skip to first unread message

Vít Ondruch

unread,
May 12, 2014, 11:10:47 AM5/12/14
to vim...@googlegroups.com
Hi,

Edditing .spec file, going into some file using "gt" and return back by "b#", I always get this annoying error:

> "ruby.spec" 1551L, 54263C
> Error detected while processing /usr/share/vim/vim74/ftplugin/spec.vim:
> line 20:
> E227: mapping already exists for ~@�SSpecChangelog
> Press ENTER or type command to continue

(Yes, there are displayed some weird characters in front of SSpecChangelog). I am currently using:

$ rpm -q vim-enhanced
vim-enhanced-7.4.258-2.fc21.x86_64

but I observe this bug for some while already, may be since 7.4? Not sure.

Any help appreciated.



Vít

Christian Brabandt

unread,
May 12, 2014, 11:22:29 AM5/12/14
to vim...@googlegroups.com, Vít Ondruch
Looks like the specific vim ftplugin does not guard against renmapping
the
same sequence again.

Please report as issue at the maintainer (you'll find his contact data
inside the plugin) and he'll send updates to Bram for inclusion.

Best,
Christian

Vít Ondruch

unread,
May 12, 2014, 11:42:24 AM5/12/14
to vim...@googlegroups.com, Vít Ondruch
Dne pondělí, 12. května 2014 17:22:29 UTC+2 Christian Brabandt napsal(a):
> Am 2014-05-12 17:10, schrieb Vít Ondruch:
>
> > Hi,
>
> >
>
> > Edditing .spec file, going into some file using "gt" and return back
>
> > by "b#", I always get this annoying error:
>
> >
>
> >> "ruby.spec" 1551L, 54263C
>
> >> Error detected while processing
>
> >> /usr/share/vim/vim74/ftplugin/spec.vim:
>
> >> line 20:
>
> >> E227: mapping already exists for ~@�SSpecChangelog
>
> >> Press ENTER or type command to continue
>
> >
>
> > (Yes, there are displayed some weird characters in front of
>
> > SSpecChangelog). I am currently using:
>
> >
>
> > $ rpm -q vim-enhanced
>
> > vim-enhanced-7.4.258-2.fc21.x86_64
>
> >
>
> > but I observe this bug for some while already, may be since 7.4? Not
>
> > sure.
>
> >
>
> > Any help appreciated.
>
>
>
> Looks like the specific vim ftplugin does not guard against renmapping
>
> the
>
> same sequence again.

Yes, that was my first thought as well, but there is:


if !hasmapto("<Plug>SpecChangelog")
map <buffer> <LocalLeader>c <Plug>SpecChangelog
endif


which looks as a guard to me. But I'm not expert :)

>
>
>
> Please report as issue at the maintainer (you'll find his contact data
>
> inside the plugin) and he'll send updates to Bram for inclusion.
>

I forwarded the issue to Gustavo Niemeyer, listed in the file, hopefully he will chime in.


Thanks


Vít

Christian Brabandt

unread,
May 12, 2014, 11:52:03 AM5/12/14
to vim...@googlegroups.com, Vít Ondruch
It does. But not the following line (which BTW, is exactly the line
given
in the error message):

noremap <buffer> <unique> <script> <Plug>SpecChangelog :call
<SID>SpecChangelog("")<CR>

Note, the <unique>, which makes Vim throw an error.

Best,
Christian

Tony Mechelynck

unread,
May 12, 2014, 11:55:06 AM5/12/14
to vim...@googlegroups.com
You might want to try compiling Vim from Bram's own official sources, see
http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm
The current Vim version/patchlevel is 7.4.283 as of this writing.

If with this "Bram's official" Vim you don't get the error, then you
might want to report it to your Linux distro
(https://bugzilla.redhat.com/ for RedHat or Fedora;
https://bugzilla.novell.com/ for SUSE Enterprise or openSUSE; etc.).
Before opening a new bug report, search Bugzilla for an existing one on
the same subject.

It is quite possible to have both Bram's Vim (in /usr/local/bin/ and
/usr/local/share/vim/vim74/) and your distro's Vim (in /usr/bin/ and
/usr/share/vim/vim74/) installed on the same machine. /usr/local/bin
usually comes ahead of /usr/bin in the $PATH so you'll run Bram's Vim by
default, unless you explicitly invoke the other one.


Best regards,
Tony.
--
Johnson's law:
Systems resemble the organizations that create them.

Vít Ondruch

unread,
May 13, 2014, 2:16:17 AM5/13/14
to vim...@googlegroups.com, Vít Ondruch, i.gnaten...@gmail.com
Dne pondělí, 12. května 2014 17:52:03 UTC+2 Christian Brabandt napsal(a):
Ahh, you are right indeed. Thanks! So here is the patch fixing the issue.

Adding Igor Gnatenko, the current maintainer into CC. Hopefully he can review.

Vít

spec-vim-fix-mapping-already-exist-error.patch

Igor Gnatenko

unread,
May 13, 2014, 6:55:41 AM5/13/14
to Vít Ondruch, vim...@googlegroups.com
Thank you for the patch. Looks good to me. I'll send updated plugin to
Bram. But in Fedora maintainer Karsten Hopp unfortunately doesn't
updating spec plugin. Could you open bug in RHBZ for updating spec
plugin from upstream ?
>
> Vít
>
Reviewed-by: Igor Gnatenko <i.gnaten...@gmail.com>

--
-Igor Gnatenko

Vít Ondruch

unread,
May 14, 2014, 5:43:41 AM5/14/14
to vim...@googlegroups.com, Vít Ondruch
Dne úterý, 13. května 2014 12:55:41 UTC+2 Igor Gnatenko napsal(a):
> Thank you for the patch. Looks good to me. I'll send updated plugin to
> Bram.

Thanks.

> But in Fedora maintainer Karsten Hopp unfortunately doesn't
> updating spec plugin. Could you open bug in RHBZ for updating spec
> plugin from upstream ?

I have lived with that error for some time already, so I can wait for official VIM update :) Thanks.



Vít

Vít Ondruch

unread,
Aug 16, 2014, 10:02:09 AM8/16/14
to vim...@googlegroups.com, v.on...@gmail.com
Dne úterý, 13. května 2014 12:55:41 UTC+2 Igor Gnatenko napsal(a):
Hi Igor,

I recently update my VIM to 7.4.402:

$ rpm -q vim-X11
vim-X11-7.4.402-1.fc22.x86_64

but this is not fixed yet. What is the status of the patch?


Regards,


Vít
Reply all
Reply to author
Forward
0 new messages