From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felix Dietrich Newsgroups: gmane.emacs.help Subject: Re: ispell select Emacs dictionary on Debian Date: Sun, 01 Aug 2021 14:46:43 +0200 Message-ID: <87bl6hgwng.fsf@sperrhaken.name> References: <8735s63leh.fsf@zoho.eu> <874kcli3uk.fsf@sperrhaken.name> <87pmv725un.fsf@zoho.eu> <87lf5v24xb.fsf_-_@zoho.eu> <87y29uggv0.fsf@sperrhaken.name> <87k0ldylab.fsf@zoho.eu> <87r1fkgwtp.fsf@sperrhaken.name> <877dh680yf.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17251"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 01 14:47:53 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mAAsi-0004ET-IO for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 01 Aug 2021 14:47:52 +0200 Original-Received: from localhost ([::1]:44396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAAsh-0001uu-E5 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 01 Aug 2021 08:47:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAAro-0001um-TE for help-gnu-emacs@gnu.org; Sun, 01 Aug 2021 08:46:58 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.135]:57733) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAArl-0005WP-9L for help-gnu-emacs@gnu.org; Sun, 01 Aug 2021 08:46:56 -0400 Original-Received: from localhost ([78.55.181.184]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N45th-1nA0e83AzB-0100uk for ; Sun, 01 Aug 2021 14:46:49 +0200 In-Reply-To: <877dh680yf.fsf@zoho.eu> (Emanuel Berg via Users list for the's message of "Sun, 01 Aug 2021 02:26:16 +0200") X-Provags-ID: V03:K1:BSLH7r9+veWzhmek6ef/jRI52dz4VfpkmjpHlbqcUADMbd3Un0u lFvRAkaWUCN/rREM5o4dkMoymnynMxy5vKMO1tGdZ4bndYM/eGR/Akq6bsDe64dWCeUttvS Pq10KMayDsE5mAhWJosk3BDdOUayQfbgnLIHC088v2vv22rvqGLynyNEKpSXzRrAYgBWKJa hzwOKl0AwgTWM1ixcs9NA== X-UI-Out-Filterresults: notjunk:1;V03:K0:1Ff4zfsVjMw=:vj+Fjjo45LVp4jG8CFZ2Yq uAnYwwNm4uVxknteM9Eggm2Olc78/jV3OCxv++2WgfyIJ9oSsH4tCftQHqEeM6u9eMp5Z1wr7 x1M5U5mpghn07iRauAprBQaNuExyLl0COqSMSr6WuOhpWVsfkLhCDxiD55ptbAHEWZKvowMEF 5UbW33jjnARSV+/SoKSU/izICgvS9G/aZAAyCx0m/sDPoUvElSHHqZUyJ7TB3eSa8XXp9Ow/y YFycHNvAmZpPLmgClMqfZTpz0NUihkq6EeaWwEUqaCeA9icV2k7ynfnjAPyW85niItSCZnImJ wFcXSs0lnrn5BGnp23DpnIEOhDxAN9OrQ8x2r7zUESzDA0T8kE+QXxl4w+NwEt8X35MpW+/X/ i/VevfeYaS31BAG88t/UQMw4tInSpWg+KSkh9Qk+sXmqBVV85ntO1C9NIXWVEML9Xth8dT665 ZhMwBT6XqMEpqSVDLiVRFfNJCGK25Nw02GLaCPwU+V+c/3A8rV/0H04u1/dcN4AI1nYeBH3Qq JfEwgUeS7PbXt3JyD7Xid+I4zwt97sVnZX6sgXzvahlTphBUHhU/n27xJWm3RkEn9FXq8ntNK GPXlS/4mbHPoK8iTn3SZidAcqx+uHxOP1lw8seaJ4pSbLghJ+N8EMNkOFW+DzCejidabQC85B 2fKT78twisDleBxoTBpsQ3PluKszfZL8UalcuB+UJxvvEmsRB5Vp3ji3ZYT+TvjB/Vv7KHwP/ aIhTNdE98yfrfr/DPcnbNM9Ft2GwQzjO60lVeYoMMhWNkgeGY/ua8I/wZng1NANaMINjoDWw Received-SPF: none client-ip=212.227.126.135; envelope-from=felix.dietrich@sperrhaken.name; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132266 Archived-At: Emanuel Berg via Users list for the GNU Emacs text editor writes: > Felix Dietrich wrote: > >> For testing purposes, start Emacs with the =E2=80=9C-q=E2=80=9D >> (=E2=80=9C--no-init-file=E2=80=9D) switch. Do the dictionaries show up t= hen >> in the dialog of =E2=80=98ispell-change-dictionary=E2=80=99? > > A lot of dictionaries show up with -q! No idea why, and > interestingly, american-insane and the other installed do not. > >> That file, /var/cache/dictionaries-common/emacsen-ispell-dicts.el, >> has as its last line >>=20 >> (setq debian-hunspell-dictionary (debian-ispell-get-hunspell-default)) >>=20 >> but the function "debian-ispell-get-hunspell-default" is undefined. >> Do you use a custom built Emacs or the Debian package? > > It is installed from source! This means that the Debian specific initialisation is not run: the Debian Emacs package installs a custom =E2=80=9Cstartup.el=E2=80=9D file that loads =E2=80=9Cdebian-startup=E2=80=9D [1], which loads the Debian specific confi= guration; this is why the function =E2=80=98debian-ispell-get-hunspell-default=E2=80=99 is no= t defined. If you want to use the Debian dictionary configuration, you may try to load the necessary code manually: (progn (load-file "/usr/share/dictionaries-common/site-elisp/debian-ispell.e= l") (load-file "/var/cache/dictionaries-common/emacsen-ispell-dicts.el") (setq ispell-program-name "ispell") ; [2] ) I don=CA=BCt think you can load all the Debian start-up files, if you have installed Emacs below /usr/local/: I suspect =E2=80=98debian-pkg-add-load-p= ath-item=E2=80=99 [3] will not be able to add Debian specific paths to =E2=80=98load-path=E2= =80=99 at the correct position. There may be other issues as well. Another solution, maybe more appropriate for a custom installation, could be to add the dictionaries you are interested in, and that are not already in =E2=80=98ispell-dictionary-base-alist=E2=80=99, manually to =E2=80=98ispell= -local-dictionary-alist=E2=80=99. Copy the necessary information from emacsen-ispell-dicts.el [4] (or extract it manually or programmatically from the pertinent files in /var/lib/dictionaries-common/ispell/): (setq ispell-local-dictionary-alist '(("american-large" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "american-large") nil utf-8))) >>> PS. The Swedish dictionary doesn't work either. It saysff >>> "ispell-init-process: Illegal format hash table >>> /usr/lib/ispell/svenska.hash - expected magic2 0x9602, >>> got 0x414c" >> >> Does not work for me either. Seems like a bug. Please report it. >> > A bug where, in Debian's wswedish? The broken hash file belongs to the =E2=80=9Ciswedish=E2=80=9D package. Th= erefore, I would file the bug report against =E2=80=9Ciswedish=E2=80=9D. (Incidentall= y, both =E2=80=9Cwswedish=E2=80=9D and =E2=80=9Ciswedish=E2=80=9D are actually buil= t from the same Debian source package.) Footnotes: [1] [2] This forces =E2=80=98ispell-set-spellchecker-params=E2=80=99 to run an= d sets =E2=80=98ispell-dictionary-alist=E2=80=99 appropriately. [3] In debian-startup.el: [4] /var/cache/dictionaries-common/emacsen-ispell-dicts.el --=20 Felix Dietrich