Modeline scanning behavior does not match documentation (off-by-one error?)

Bug #367160 reported by Jonathan Rascher
2
Affects Status Importance Assigned to Milestone
gedit
Fix Released
Medium
gedit (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gedit

The modelines plugin doesn't quite work as documented in the gedit manual. Modelines are not recognized on some lines where there should be, and they are recognized on some lines where they should not be.

Expected results (according to the documentation):
* Emacs modelines are recognized on the first two lines of a file.
* Vim modelines are recognized on the first and last three lines of a file.
* Kate modelines are recognized on the first and last ten lines of a file.

Actual results:
* Emacs modelines are recognized on the first line of a file.
* Vim modelines are recognized on the first two and last four lines of a file.
* Kate modelines are recognized on the first nine and last ten lines of a file.

Perhaps the most annoying effect of this bug is that only the first line of a file is scanned for an Emacs modeline. This makes it impossible to use Emacs modelines in files that must begin with shebang lines.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/gedit
Package: gedit 2.26.1-0ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gedit
Uname: Linux 2.6.28-11-generic x86_64

Revision history for this message
Jonathan Rascher (bcat) wrote :
description: updated
description: updated
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for your bug report. This bug has been reported to the developers of the software. You can track it and make comments here: http://bugzilla.gnome.org/show_bug.cgi?id=580494

Changed in gedit (Ubuntu):
importance: Undecided → Low
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
status: New → Triaged
Changed in gedit:
status: Unknown → New
Revision history for this message
Pedro Villavicencio (pedro) wrote :

this has been fixed upstream, thanks for reporting.

Changed in gedit (Ubuntu):
status: Triaged → Fix Committed
Changed in gedit:
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gedit - 2.27.1-0ubuntu1

---------------
gedit (2.27.1-0ubuntu1) karmic; urgency=low

  * New upstream release: (LP: #380924)
    - Remove the mmap document loader (Paolo Borelli)
    - Remove open location dialog and sample plugin (Paolo Borelli)
    - Added public API for document saving (Jesse van den Kieboom)
    - Put external tools in a submenu (Jesse van den Kieboom)
    - Added language support for external tools (Jesse van den Kieboom)
    - Implemented asynchronous reading and writing on external tools (Jesse van den Kieboom)
    - Add Quick Open plugin (Jesse van den Kieboom)
    - Misc bugfixes
    - New and updated translations
  * debian/patches/90_autoconf.patch
    - updated for new version
  * Launchpad bugs fixed:
    - various crasher bugs (LP: #348536, LP: #368262, LP: #368495)
    - fix modeline scanning (LP: #367160)

 -- Andreas Moog <email address hidden> Wed, 27 May 2009 14:00:44 +0200

Changed in gedit (Ubuntu):
status: Fix Committed → Fix Released
Changed in gedit:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.