! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
invalid vim modeline in desktop entry files
Status:
RESOLVED: DUPLICATE

Comments

Description Peter Mattern 2013-12-29 15:13:22 CET
The Desktop Entry files Thunar-bulk-rename, Thunar and Thunar-folder-handler contain a modeline intended to be used by vim
     # vi:set encoding=UTF-8:
Setting the endocing option by modelines was disallowed some time ago, though [1]. Thus vim refuses to open these files if its option modeline is set which is afaik default on all distributions.
For background information about vim disallowing the encoding option, see e. g.
Red Hat bug report 691958 [2] which discusses the very same problem for ldapvi.

The Problem can be stopped by using fileencoding instead of encoding. Of course, it can also be stopped by omitting the modeline as a whole, but I'm not sure whether this would make sense.

It also affects the Volume Manager's thunar-volman-settings file, but I thought it wouldn't make sense to open another bug report just for this single file.

Steps to reproduce
- Make sure the availabe vim version has option modeline enabled. This can be
  checked by running 'set modeline?' in command mode and set by a line
  'set modeline' in ~/.vimrc.
- Open one of the said files. vim will throw an error message and query whether the
  file should really be opened.
- Change the modeline as stated above or completely remove it.
- Reopen the modified files with vim. The error message will have gone.

[1] code.google.com/p/vim/source/detail?r=2b2cd34569eb97cbdb5f6500436923d19fdf8fbd
[2] bugzilla.redhat.com/show_bug.cgi?id=691958
Comment 1 Theo Linkspfeifer editbugs 2019-06-24 23:28:27 CEST

*** This bug has been marked as a duplicate of bug 15466 ***

Bug #10586

Reported by:
Peter Mattern
Reported on: 2013-12-29
Last modified on: 2019-06-24

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Attachments

Additional information