alexmurray / emacs-snap

GNU Emacs in a snap
https://snapcraft.io/emacs
73 stars 12 forks source link

emacs beta snap not working with hunspell 1.7 #13

Closed egh closed 4 years ago

egh commented 4 years ago

Steps to reproduce:

  1. install beta (27) emacs sudo snap install emacs --classic
  2. Ensure running hunspell 1.7: hunspell --version
  3. Run emacs -q (not emacs -Q)
  4. Eval (setq ispell-program-name "hunspell")
  5. M-x flyspell-mode

Expected results: flyspell mode enabled. Actual result:

Error enabling Flyspell mode:
(ispell-phaf: No matching entry for nil.
)

This is because of the issue https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33493 which should have been fixed in emacs 27. However for some reason this package includes a version of ispell.el that does not have this fix at /snap/emacs/current/usr/share/emacs/site-lisp/dictionaries-common

Note this works when running emacs -Q, because that prevents loading this local override.

alexmurray commented 4 years ago

Are you sure this is not a problem with emacs upstream? The emacs snap does not modify anything and ships exactly what is provided in emacs git (and the beta channel uses the emacs-27 branch from https://github.com/emacs-mirror/emacs/tree/emacs-27) - is this fix present there? From what I can see it doesn't look like it is there - if so can you please file a bug upstream so it can be included in emacs-27 and then I can just rebuild the beta channel from that?

egh commented 4 years ago

I'm new to snaps so I don't really understand. The bug is fixed upstream (see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33493) and there is definitely code in the snap that is not fixed.

Where does the file /snap/emacs/current/usr/share/emacs/site-lisp/dictionaries-common/ispell.el come from? It's not part of upstream emacs

$ cd emacs
$ git remote show origin
* remote origin
  Fetch URL: git://git.sv.gnu.org/emacs.git
...
$ git checkout emacs-27
Already on 'emacs-27'
Your branch is up to date with 'origin/emacs-27'.
$ find . -name ispell.el
./lisp/textmodes/ispell.el
alexmurray commented 4 years ago

Oh I wonder if this is coming from perhaps a staged copy of dictionaries-common from the Ubuntu archive? Let me see what I can do...

alexmurray commented 4 years ago

This is fixed by https://github.com/alexmurray/emacs-snap/commit/2e396ccfb0456e31785fd20983cac253363bb69a - which should be available on the next build for the beta channel - this is currently rebuilding now so expect a fixed version available in the next hour or two and then you should just be able to snap refresh --beta emacs to get it.

egh commented 4 years ago

Thank you, that's fixed it!