dictionaries-common versions of ispell.el and flyspell.el break recent emacsen

Bug #619015 reported by PeterPall
194
This bug affects 36 people
Affects Status Importance Assigned to Milestone
dictionaries-common (Debian)
Fix Released
Unknown
dictionaries-common (Ubuntu)
Fix Released
Undecided
Unassigned
Maverick
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: dictionaries-common

Emacs users who want to use flyspell (wavy underlines under misspelled words as you type) cannot on Maverick. The root cause was a change in the Emacs Lisp syntax which breaks older versions of dictionaries-common.

TEST CASE: start Emacs, type Esc x flyspell-mode <ret> or equivalently enable Flyspell from Customize or the menu.

Failure scenario: an error message "Enabling flyspell-mode gave an error." (sic)

Success scenario: "Starting new ispell process ..."

A minimal patch is attached to this bug. Upgrading dictionaries-common to upstream 1.5.12 should be equivalent. Natty now ships 1.5.15 (bug #660367). Maverick has 1.5.11.

The fix in 1.5.12 should be compatible with older Emacs versions; emacs22 (and to a limited extent xemacs21) should continue to work, while this fixes flyspell for emacs23 and emacs-snapshot users.

--- Previous version of Bug Description: ---

Please remove the following files from dictionaries-common:

/usr/share/emacs/site-lisp/dictionaries-common/debian-ispell.el
/usr/share/emacs/site-lisp/dictionaries-common/flyspell.el
/usr/share/emacs/site-lisp/dictionaries-common/ispell.el

They are already provided with the emacs packages (emacs23-common and emacs-snapshot-common) and the versions provided with dictionaries-common are currently incompatible with the ones that are included in the emacs23-package:
When these files are installed any attempt to enable on-the-fly spell checking e.G. by M-x flyspell-mode will result in a generic error message:

Enabling flyspell-mode gave an error.

No debug info. And even if debug-on-error is set the error message is generated without setting any trigger for the debugger. Took me 2 hours to track this error down.

WORKAROUND: to fix this in a live system, remove the byte-compiled .elc files for your emacs flavor, too. For example, if you use emacs23;

cd /usr/share/emacs23/site-lisp/dictionaries-common
sudo rm *.el *.elc

After removing the files spell checking while typing in emacs works fine again.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: dictionaries-common 1.5.11ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-15.21-generic 2.6.35.1
Uname: Linux 2.6.35-15-generic i686
Architecture: i386
Date: Tue Aug 17 03:51:38 2010
EcryptfsInUse: Yes
PackageArchitecture: all
ProcEnviron:
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: dictionaries-common

Revision history for this message
PeterPall (peterpall) wrote :
Revision history for this message
PeterPall (peterpall) wrote :

Tested all combinations of all files:

/usr/share/emacs/site-lisp/dictionaries-common/debian-ispell.el

seems not to be needed for anything, but of the three files mentioned above this file alone does not seem to do any harm.

PeterPall (peterpall)
Changed in dictionaries-common (Ubuntu):
status: New → Confirmed
Revision history for this message
Roger Binns (ubuntu-rogerbinns) wrote :

I hadn't spotted you hitting this on Maverick. Everything worked fine for me on Lucid but on upgrade to Maverick flyspell got broken. In the two months since the problem was reported it was not fixed. Sigh.

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

I tried removing the files

/usr/share/emacs/site-lisp/dictionaries-common/debian-ispell.el
/usr/share/emacs/site-lisp/dictionaries-common/flyspell.el
/usr/share/emacs/site-lisp/dictionaries-common/ispell.el

after reinstaling emacs and dictionaries-common, but flyspell still does not work. Is there a workaround, or should I do something additionally to removing those files?

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

I suppose you have seen the following bug in Debian:

http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;bug=591925

where it seems that it is explained what is going on (a function that changed in emacs that neede two arguments and now needs only one). I also tried the workaround suggested there in comment #54 but it did not work for me in Maverick.

Revision history for this message
Paul Leger (pleger) wrote :

Hi all,
       I also tried the workaround but it did not work for me. Is any there some solution for this bug? I need this feature soon because my Englich is so vad.

Thank you!

Revision history for this message
era (era) wrote :

You have to remove the byte-compiled *.elc files too. Updating bug description.

description: updated
Revision history for this message
vseguip (vseguip) wrote :

After upgrading to maverick I had this ug. The fix reporte in Debian bug 591925 worked for me.

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

I confirm that the workaround works after removing also the byte-compiled files (*.elc) which I hadn't done in my comment #5

Revision history for this message
Rudy Neeser (the-river) wrote :

I also noticed this bug when upgrading to Maverick. I can also confirm that the deleting the *.el and *.elc fixes the problem.

Revision history for this message
era (era) wrote :

The upstream bug http://bugs.debian.org/592720 was fixed in dictionaries-common 1.5.12 http://packages.debian.org/changelogs/pool/main/d/dictionaries-common/current/changelog

The fix for this bug is the only difference between dictionaries-common 1.5.11 (which is what Ubuntu currently ships) and 1.5.12. Debian is currently at 1.5.14.

The upstream fix is to keep these files in dictionaries-common (they are included to override the ones in emacs, for a more or less good reason) but fix the incompatibility introduced by a syntax change in upstream Emacs (alleged to have occurred in 23.2, but obviously affecting emacs23 23.1+1-4ubuntu7).

I guess this might not qualify for an SRU, but should definitely be eligible to be uploaded to -backports.

Revision history for this message
era (era) wrote :

Pending on bug #660357

era (era)
summary: - Remove redundant Emacs-Lisp files that break flyspell
+ dictionaries-common versions of ispell.el and flyspell.el break recent
+ emacsen
Revision history for this message
Brian Carlson (abutilize) wrote :

This patch to flyspell.el worked for me.

(NOTE you will have to recompile the elisp, as well, or the existing .elc file(s) will get used)

You can also "work around the problem" by adding this to your .emacs
(setq flyspell-issue-welcome-flag nil) ;; assumes you don't care about a welcome message when flyspell-mode is enabled

Revision history for this message
Douglas Bagnall (douglasbagnall) wrote :

Installing Debian's 1.5.14 package from http://packages.debian.org/sid/dictionaries-common worked for me.

Their patch[1] is a little more complicated than Brian Carlson's one as it tries to take into account 2 Gnu Emacs versions and Xemacs. See http://git.debian.org/?p=dict-common/dictionaries-common.git;a=commitdiff;h=6923a768933b92c68fbd5bcaa04021c1d5c5a6e4

Revision history for this message
Paul Leger (pleger) wrote :

I confirm this package works.
Thank you Douglas!

tags: added: patch
Revision history for this message
era (era) wrote :

This bug was fixed with bug #660357 for Natty, but getting a fix for Maverick would be highly valuable.

Changed in dictionaries-common (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
era (era) wrote :

Submitted bug #666204 to request a backport for Maverick.

Revision history for this message
era (era) wrote :

Updated package description in accordance with instructions at https://wiki.ubuntu.com/StableReleaseUpdates

I'm unsure whether this should be an SRU or a backport; this kind of seems to fall between the cracks. I'm trying both approaches now; apologies if I am wasting too much of everybody's time this way.

description: updated
Revision history for this message
Evan Broder (broder) wrote :

This seems like a good candidate for an SRU to me. The fix is isolated and short, which helps give this a low likelihood of regression. Some small mangling of Debian's version is necessary to fit with our version numbering scheme.

The attached debdiff should fix this for Maverick.

Revision history for this message
Benjamin Drung (bdrung) wrote :

The patch failed to apply to 580_flyspell.el_called-interactively-p.dpatch. Please update your debdiff.

Revision history for this message
Evan Broder (broder) wrote :

Sorry about that. Looks like I accidentally converted tabs to spaces or something.

Please try the newly attached debdiff instead.

Revision history for this message
Luke Yelavich (themuso) wrote :

Thanks for your work, reviewing this now. All being well, tiw ill be uploaded to maverick-proposed.

Changed in dictionaries-common (Ubuntu Maverick):
assignee: nobody → Luke Yelavich (themuso)
status: New → In Progress
Revision history for this message
Luke Yelavich (themuso) wrote :

This package failed to build for me, build log attached. If you could have a look to see what the problem is, and attempt to fix it, that would be great.

I am unsubscribing ubuntu-sponsors for now. Please re-subscribe ubuntu-sponsors when you have a new debdiff ready for review.

Thanks again for your work.

Changed in dictionaries-common (Ubuntu Maverick):
assignee: Luke Yelavich (themuso) → nobody
status: In Progress → Incomplete
Revision history for this message
Luke Yelavich (themuso) wrote :

Seems I may have a broken chroot. Unfortunately I don't have time to look into it at the moment. Marking as new for another pilot/sponsor to pick up. Sorry about not being able to action this bug any further.

Changed in dictionaries-common (Ubuntu Maverick):
status: Incomplete → New
Revision history for this message
Cédric M. Campos (cedricmc) wrote :

Bug is still active on Maverick since it is still at "dictionaries-common 1.5.11ubuntu1".

WORKAROUND: install the Debian package http://packages.debian.org/sid/dictionaries-common

Changed in dictionaries-common (Ubuntu Maverick):
status: New → Confirmed
Revision history for this message
3ntix (francesco-3ntini) wrote :

I've kubuntu natty fresh installed. The bug is come back.
How I can solve the problem?

Revision history for this message
Paul Leger (pleger) wrote : Re: [Bug 619015] Re: dictionaries-common versions of ispell.el and flyspell.el break recent emacsen

Hi,
    Mmmm... I have fresh installation of Ubuntu Natty, I don't have
this bug. Are Ubuntu or Kubuntu different in something?

On Tue, Jun 7, 2011 at 1:01 PM, 3ntix <email address hidden> wrote:
> I've kubuntu natty fresh installed. The bug is come back.
> How I can solve the problem?
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/619015
>
> Title:
>  dictionaries-common versions of ispell.el and flyspell.el break recent
>  emacsen
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/dictionaries-common/+bug/619015/+subscribe
>

--
Paul Leger

Revision history for this message
era (era) wrote :

Natty has 1.9.3 and it should be the same whether you use Kubuntu or Xubuntu.

3ntix: Please file a separate bug report, you are probably seeing a different problem.

Changed in dictionaries-common (Debian):
status: Unknown → Fix Released
tags: added: testcase
Changed in dictionaries-common (Ubuntu Maverick):
status: Confirmed → Fix Released
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.