Bug 1213399

Summary: emacs-nox: missing hunspell dictionary prevents opening files given as command line argument
Product: [openSUSE] openSUSE Distribution Reporter: Giovanni Gherdovich <giovanni.gherdovich>
Component: DevelopmentAssignee: E-mail List <screening-team-bugs>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Leap 15.4   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Giovanni Gherdovich 2023-07-17 18:26:29 UTC
On a fresh Leap 15.4 installation (the flavor chosen on the installer is "text-based server"), after installing the package emacs-nox the following command fails to open my-existing-file:

    emacs my-existing-file

Emacs opens the *scratch* buffer instead of the desired file. The *Messages* buffer contains the following:

    ispell-find-hunspell-dictionaries: Can't find Hunspell dictionary with a .aff affix file

After commenting the following snippet from /usr/share/emacs/site-lisp/site-start.el then opening a file from the command line (as opposed to C-x C-f) works again:

    ;; Preload dynamic (i)Spell menu
    ;; -----------------------------
    (if (not (load "/usr/lib/ispell/ispell-emacs-menu.el" t t))
	(cond ((or (executable-find "aspell")
		   (executable-find "hunspell")
		   (executable-find "ispell"))
	       (load "ispell" t t))))

The following command shows the hunspell search path for dictionaries, and the dictionaries found. It seem to say that no dictionary is available, in particular the "en_US" dictionary is missing.

    $ unspell -D

    SEARCH PATH:
    .::
    /usr/share/hunspell:
    /usr/share/myspell:
    /usr/share/myspell/dicts:
    /Library/Spelling:
    /root/.openoffice.org/3/user/wordbook:
    /root/.openoffice.org2/user/wordbook:
    /root/.openoffice.org2.0/user/wordbook:
    /root/Library/Spelling:
    /opt/openoffice.org/basis3.0/share/dict/ooo:
    /usr/lib/openoffice.org/basis3.0/share/dict/ooo:
    /opt/openoffice.org2.4/share/dict/ooo:
    /usr/lib/openoffice.org2.4/share/dict/ooo:
    /opt/openoffice.org2.3/share/dict/ooo:
    /usr/lib/openoffice.org2.3/share/dict/ooo:
    /opt/openoffice.org2.2/share/dict/ooo:
    /usr/lib/openoffice.org2.2/share/dict/ooo:
    /opt/openoffice.org2.1/share/dict/ooo:
    /usr/lib/openoffice.org2.1/share/dict/ooo:
    /opt/openoffice.org2.0/share/dict/ooo:
    /usr/lib/openoffice.org2.0/share/dict/ooo

    AVAILABLE DICTIONARIES (path is not mandatory for -d option):
    Can't open affix or dictionary files for dictionary named "en_US".

It looks to me that either ispell shouldn't be loaded by emacs-nox, or the "en_US" dictionary should be provided the hunspell package.

What do you think?
Comment 1 Giovanni Gherdovich 2023-07-17 18:29:11 UTC
Hello Werner, please see the previous comment for the description of my problem. How do you think it should be solved?
Comment 2 Dr. Werner Fink 2023-07-18 06:06:28 UTC
(In reply to Giovanni Gherdovich from comment #1)
> Hello Werner, please see the previous comment for the description of my
> problem. How do you think it should be solved?

IMHO this is a duplicate of bug bsc#1199209
Comment 3 Dr. Werner Fink 2023-07-18 06:28:02 UTC
(In reply to Dr. Werner Fink from comment #2)
> (In reply to Giovanni Gherdovich from comment #1)
> > Hello Werner, please see the previous comment for the description of my
> > problem. How do you think it should be solved?
> 
> IMHO this is a duplicate of bug bsc#1199209

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