Created attachment 488606 [details]
Do not try to set vim's encoding option in a modeline
Description of problem:
ldapvi is hardcoded to insert a vim modeline into the text
it sends to your editor. This modeline tries to set vim's
"encoding" option to "utf-8".
In July of last year, vim was changed to disallow setting the
"encoding" option in a modeline. The reason this change
was made is that setting this option once a file has been
loaded may corrupt the existing text in the buffer. You
can set the "fileencoding" option instead, which will affect
the encoding used when the file is written back out, but
there's no good reason for ldapvi to do that because if it
managed to select an incorrect encoding while loading the
file, the relevant data has been lost already.
Information about the relevant vim change may be found here:
The version of vim including that change is now in Fedora,
and the result is that any time a non-root user runs ldapvi
with vim as their editor, they get an error before startup
telling them that setting "encoding" in a modeline isn't supported,
and there's no way for them to fix that (vim doesn't use
modelines when run as root).
A patch was offered to the ldapvi mailman list in January
to change to setting "fileencoding", and subsequently the list
agreed that ldapvi should simply not try to set any encoding
with vim. You can see this discussion and the withdrawn patch
Unfortunately, the last ldapvi release was four years ago, and
the last commit to its repository is coming up on its two-year
anniversary. Since no help appears to be forthcoming from
upstream, would you please consider applying the attached trivial
patch to ldapvi in Fedora so that users can stop getting the
annoying error every single time they use the program?
Thanks in advance!
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. With EDITOR/VISUAL set to 'vim', run ldapvi with a query
that will return at least one record, as a non-root user.
"""Error detected while processing modelines:
E520: Not allowed in a modeline: encoding=utf-8
I'm running into this annoying issue as well. Updating the release field to F15 so this doesn't auto-close when F13 goes EOL.
ldapvi-1.7-12.fc13 has been submitted as an update for Fedora 13.
ldapvi-1.7-12.fc14 has been submitted as an update for Fedora 14.
ldapvi-1.7-12.fc15 has been submitted as an update for Fedora 15.
ldapvi-1.7-12.el4 has been submitted as an update for Fedora EPEL 4.
ldapvi-1.7-12.el5 has been submitted as an update for Fedora EPEL 5.
ldapvi-1.7-12.el6 has been submitted as an update for Fedora EPEL 6.
ldapvi-1.7-12.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
* should fix your issue,
* was pushed to the Fedora 13 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ldapvi-1.7-12.fc13'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
ldapvi-1.7-12.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
ldapvi-1.7-12.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
ldapvi-1.7-12.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
ldapvi-1.7-12.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.
ldapvi-1.7-12.el4 has been pushed to the Fedora EPEL 4 stable repository. If problems still persist, please make note of it in this bug report.