Bug 691958 - ldapvi illegally tries to set vim encoding option in a modeline (with patch)
Summary: ldapvi illegally tries to set vim encoding option in a modeline (with patch)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ldapvi
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matěj Cepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-30 00:06 UTC by Mitchell Berger
Modified: 2018-04-11 19:11 UTC (History)
3 users (show)

Fixed In Version: ldapvi-1.7-12.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-02 18:52:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Do not try to set vim's encoding option in a modeline (412 bytes, patch)
2011-03-30 00:06 UTC, Mitchell Berger
no flags Details | Diff

Description Mitchell Berger 2011-03-30 00:06:59 UTC
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:
http://code.google.com/p/vim/source/detail?r=2b2cd34569eb97cbdb5f6500436923d19fdf8fbd&path=/src/option.c

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
here:

http://lists.askja.de/pipermail/ldapvi/2011-January/000089.html

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):
ldapvi-1.7-10.fc13

How reproducible:
100%

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.
  
Actual results:
"""Error detected while processing modelines:
line    1:
E520: Not allowed in a modeline: encoding=utf-8
"""

Comment 1 Jason Tibbitts 2011-05-12 17:13:39 UTC
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.

Comment 2 Fedora Update System 2011-05-12 22:30:00 UTC
ldapvi-1.7-12.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/ldapvi-1.7-12.fc13

Comment 3 Fedora Update System 2011-05-12 22:31:22 UTC
ldapvi-1.7-12.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/ldapvi-1.7-12.fc14

Comment 4 Fedora Update System 2011-05-12 22:32:19 UTC
ldapvi-1.7-12.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/ldapvi-1.7-12.fc15

Comment 5 Fedora Update System 2011-05-12 22:32:52 UTC
ldapvi-1.7-12.el4 has been submitted as an update for Fedora EPEL 4.
https://admin.fedoraproject.org/updates/ldapvi-1.7-12.el4

Comment 6 Fedora Update System 2011-05-12 22:33:20 UTC
ldapvi-1.7-12.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/ldapvi-1.7-12.el5

Comment 7 Fedora Update System 2011-05-12 22:33:55 UTC
ldapvi-1.7-12.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/ldapvi-1.7-12.el6

Comment 8 Fedora Update System 2011-05-13 23:06:59 UTC
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.

Comment 9 Fedora Update System 2011-05-13 23:14:20 UTC
Package ldapvi-1.7-12.fc13:
* 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:
https://admin.fedoraproject.org/updates/ldapvi-1.7-12.fc13
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2011-05-19 05:02:59 UTC
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.

Comment 11 Fedora Update System 2011-06-02 18:52:54 UTC
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.

Comment 12 Fedora Update System 2011-06-02 19:03:39 UTC
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.

Comment 13 Fedora Update System 2011-06-02 19:03:47 UTC
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.

Comment 14 Fedora Update System 2011-06-02 19:04:01 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.