From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 17 13:37:49 2010 Received: (at submit) by debbugs.gnu.org; 17 Oct 2010 17:37:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7XB6-00066D-Rj for submit@debbugs.gnu.org; Sun, 17 Oct 2010 13:37:49 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7XB4-000668-Fc for submit@debbugs.gnu.org; Sun, 17 Oct 2010 13:37:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7XEc-0005cq-Bg for submit@debbugs.gnu.org; Sun, 17 Oct 2010 13:41:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:34269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7XEc-0005ce-8s for submit@debbugs.gnu.org; Sun, 17 Oct 2010 13:41:26 -0400 Received: from [140.186.70.92] (port=56361 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7XEa-0001fC-DK for bug-gnu-emacs@gnu.org; Sun, 17 Oct 2010 13:41:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7XEW-0005bN-Iz for bug-gnu-emacs@gnu.org; Sun, 17 Oct 2010 13:41:21 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:38647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7XEW-0005bE-Ei for bug-gnu-emacs@gnu.org; Sun, 17 Oct 2010 13:41:20 -0400 Received: by ewy5 with SMTP id 5so63467ewy.0 for ; Sun, 17 Oct 2010 10:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :message-id:mime-version:content-type; bh=33DmeO/dvH3I4U9g/KlDZHExwze0QQHk2lDlfpVrXyc=; b=alCQPw0vB5m6oEi/cECu4cICsIuDhY/nxC2cu2v6saEtaE7atG000eQlYW/xW59mXq cYvgn0JEYX48QS7ScroGUhpN7kre2VmbDimDiLQ6D6p/DWlBNE0EUBG84/c4GAZLUccp DY5ybEx7dlVkuoxVbOqRE/c8HqnkDapEy1evQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type; b=ZgCpfDsKmPJTTwjkI8qvYHDJw8lY2Vw/IvhATNhyiIVVB0kffXgl9yOto/buyCMtLC iV85YG0231fgAeATdoBkdNL0yS4XfDy5cJMn44OUvXWzLN/0e3ShNb9bc4ZiXlgIdj7P PqNR8490ZhVgt+aZKSJQT5hDJIVvlN5jZan3o= Received: by 10.14.47.79 with SMTP id s55mr1905146eeb.44.1287337278982; Sun, 17 Oct 2010 10:41:18 -0700 (PDT) Received: from localhost (c786A47C1.dhcp.bluecom.no [193.71.106.120]) by mx.google.com with ESMTPS id q54sm17537107eeh.12.2010.10.17.10.41.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 17 Oct 2010 10:41:18 -0700 (PDT) From: Knut Anders Hatlen To: bug-gnu-emacs@gnu.org Subject: 24.0.50; Regression: Many dictionaries not found by ispell.el Date: Sun, 17 Oct 2010 19:41:16 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) On a system with Aspell 0.60.6 with English dictionaries installed, evaluating the following expression successfully changes the dictionary on Emacs 23.2: (progn (require 'ispell) (ispell-change-dictionary "british-ize")) On Emacs 24 it fails: Debugger entered--Lisp error: (error "Undefined dictionary: british-ize") signal(error ("Undefined dictionary: british-ize")) error("Undefined dictionary: %s" "british-ize") ispell-change-dictionary("british-ize") (progn (require (quote ispell)) (ispell-change-dictionary "british-ize")) Comparing ispell-dictionary-alist on Emacs 23.2 and Emacs 24, it looks like the following dictionaries are not found by ispell.el on Emacs 24: canadian canadian-wo_accents canadian-w_accents british-wo_accents british-w_accents british-ize british-ize-wo_accents british-ize-w_accents british-ise british-ise-wo_accents british-ise-w_accents american-wo_accents american-w_accents en_CA en_CA-w_accents en_CA-wo_accents en_GB en_GB-ise en_GB-ise-w_accents en_GB-ise-wo_accents en_GB-ize en_GB-ize-w_accents en_GB-ize-wo_accents en_GB-w_accents en_GB-wo_accents en_US en_US-w_accents en_US-wo_accents The new behaviour was introduced by this change: ------------------------------------------------------------ revno: 100614 committer: Agustin martin branch nick: trunk timestamp: Thu 2010-06-17 16:44:34 +0200 message: ispell.el (ispell-aspell-find-dictionary): Fix regexp for full xx_YY search. This is needed for languages like Portuguese where there are aspell dicts for pt_BR and pt_PT, not for plain pt. If we strip country part `ispell-aspell-find-dictionary' does not find dicts for portuguese. ------------------------------------------------------------ In GNU Emacs 24.0.50.1 (x86_64-pc-solaris2.11, GTK+ Version 2.20.0) of 2010-10-17 on ugle Windowing system distributor `Oracle Corporation, based on X.Org Foundation sources', version 11.0.10707000 configured using `configure '--build=x86_64-pc-solaris2.11' '--prefix=/opt/emacs24' '--with-imagemagick' 'PKG_CONFIG_PATH=/usr/lib/64/pkgconfig' 'CC=/usr/gcc/4.3/bin/gcc -m64' 'build_alias=x86_64-pc-solaris2.11'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=iiimx locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: x r e p o r t - e m a c s Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr message sendmail regexp-opt rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) -- Knut Anders From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 18 07:19:08 2010 Received: (at 7230) by debbugs.gnu.org; 18 Oct 2010 11:19:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7nkB-0004lP-R8 for submit@debbugs.gnu.org; Mon, 18 Oct 2010 07:19:08 -0400 Received: from fibonacci.ccupm.upm.es ([138.100.198.70] helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7nk9-0004l3-Ni for 7230@debbugs.gnu.org; Mon, 18 Oct 2010 07:19:06 -0400 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/fibonacci-001) with ESMTP id o9IBMl86004254; Mon, 18 Oct 2010 13:22:47 +0200 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id 477D4462D9; Mon, 18 Oct 2010 13:22:47 +0200 (CEST) Date: Mon, 18 Oct 2010 13:22:47 +0200 From: Agustin Martin To: Knut Anders Hatlen , 7230@debbugs.gnu.org Subject: Re: bug#7230: 24.0.50; Regression: Many dictionaries not found by ispell.el Message-ID: <20101018112247.GA14951@agmartin.aq.upm.es> References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 7230 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Oct 17, 2010 at 07:41:16PM +0200, Knut Anders Hatlen wrote: > > On a system with Aspell 0.60.6 with English dictionaries installed, > evaluating the following expression successfully changes the dictionary > on Emacs 23.2: > > (progn > (require 'ispell) > (ispell-change-dictionary "british-ize")) > > On Emacs 24 it fails: Thanks for noticing and sorry for the bug. I thought it was behaving correctly since a lot of English variants were listed and unfortunately did not notice that some of them were missing, my fault. I really wonder how no one found this before. This change was introduced to deal with portuguese, that has no pt.dat, but pt_BR or pt_PT. I am currently playing with attached patch, that tries different .dat matches. This should be better than before, and deal with former case plus portuguese. Will test a bit more and commit if no problems appear. -- Agustin --LQksG6bCIzRHxTLp Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ispell-el_diferent-dat-files.diff" --- ispell.el.orig 2010-10-18 13:20:35.000000000 +0200 +++ ispell.el 2010-10-18 13:20:45.000000000 +0200 @@ -983,17 +983,30 @@ (car (split-string (buffer-string))))) (defun ispell-aspell-find-dictionary (dict-name) + "Create a list of properties for a given aspell dictionary." + ;; Make sure this is defined + (or ispell-aspell-data-dir + (setq ispell-aspell-data-dir + (ispell-get-aspell-config-value "data-dir"))) ;; This returns nil if the data file does not exist. ;; Can someone please explain the return value format when the ;; file does exist -- rms? - (let* ((lang ;; Strip out variant, etc. - (and (string-match "^[[:alpha:]_]+" dict-name) - (match-string 0 dict-name))) + (let* ((datafile1 + (concat ispell-aspell-data-dir "/" + ;; Strip out variant, country code, etc. + (and (string-match "^[[:alpha:]]+" dict-name) + (match-string 0 dict-name)) ".dat")) + (datafile2 + (concat ispell-aspell-data-dir "/" + ;; Strip out anything but xx_YY. + (and (string-match "^[[:alpha:]_]+" dict-name) + (match-string 0 dict-name)) ".dat")) (data-file - (concat (or ispell-aspell-data-dir - (setq ispell-aspell-data-dir - (ispell-get-aspell-config-value "data-dir"))) - "/" lang ".dat")) + (if (file-readable-p datafile1) + datafile1 + (if (file-readable-p datafile2) + datafile2 + "No dat file found"))) otherchars) (condition-case () (with-temp-buffer --LQksG6bCIzRHxTLp-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 18 12:13:07 2010 Received: (at 7230-done) by debbugs.gnu.org; 18 Oct 2010 16:13:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7sKh-0007eW-6S for submit@debbugs.gnu.org; Mon, 18 Oct 2010 12:13:07 -0400 Received: from edison.ccupm.upm.es ([138.100.198.71] helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7sKf-0007eA-4t for 7230-done@debbugs.gnu.org; Mon, 18 Oct 2010 12:13:06 -0400 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/edison-001) with ESMTP id o9IGGl7b016425; Mon, 18 Oct 2010 18:16:47 +0200 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id 868314645D; Mon, 18 Oct 2010 18:16:47 +0200 (CEST) Date: Mon, 18 Oct 2010 18:16:47 +0200 From: Agustin Martin To: Knut Anders Hatlen , 7230-done@debbugs.gnu.org Subject: Re: bug#7230: 24.0.50; Regression: Many dictionaries not found by ispell.el Message-ID: <20101018161647.GA4936@agmartin.aq.upm.es> References: <20101018112247.GA14951@agmartin.aq.upm.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101018112247.GA14951@agmartin.aq.upm.es> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 7230-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) On Mon, Oct 18, 2010 at 01:22:47PM +0200, Agustin Martin wrote: > On Sun, Oct 17, 2010 at 07:41:16PM +0200, Knut Anders Hatlen wrote: > > > > On a system with Aspell 0.60.6 with English dictionaries installed, > > evaluating the following expression successfully changes the dictionary > > on Emacs 23.2: > > > > (progn > > (require 'ispell) > > (ispell-change-dictionary "british-ize")) > > > > On Emacs 24 it fails: > > Thanks for noticing and sorry for the bug. I thought it was behaving > correctly since a lot of English variants were listed and unfortunately > did not notice that some of them were missing, my fault. I really wonder > how no one found this before. > > This change was introduced to deal with portuguese, that has no pt.dat, but > pt_BR or pt_PT. > > I am currently playing with attached patch, that tries different .dat > matches. This should be better than before, and deal with former case plus > portuguese. Will test a bit more and commit if no problems appear. Just committed a change that should look for both xx.dat and xx_YY.dat files for xx_YY.. aspell dicts. Includes also some function reorganization and a proper docstring. This should fix this problem, so I am closing the bug report. Please reopen if needed. > (defun ispell-aspell-find-dictionary (dict-name) Function name is a bit misleading. Fortunately, seems it is only used internally by ispell.el and is not intended for external use. I left it with its current name, but something like `ispell-aspell-find-dict-params' looks more appropriate. Will think if worths renaming and declaring old name obsolete. Thanks for your feedback, -- Agustin From unknown Mon Jun 23 15:02:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 16 Nov 2010 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator