From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Agustin Martin Newsgroups: gmane.emacs.bugs Subject: bug#6143: ispell killing still not fixed Date: Thu, 24 Jun 2010 17:23:45 +0200 Message-ID: <20100624152345.GA2865@agmartin.aq.upm.es> References: <20100624113528.GA18586@agmartin.aq.upm.es> <87sk4cqyo2.fsf@jidanni.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="7JfCtLOvnd9MIVvH" X-Trace: dough.gmane.org 1277393388 19031 80.91.229.12 (24 Jun 2010 15:29:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Jun 2010 15:29:48 +0000 (UTC) To: jidanni@jidanni.org, 6143@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 24 17:29:47 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ORoMr-0003kV-2P for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Jun 2010 17:29:43 +0200 Original-Received: from localhost ([127.0.0.1]:53406 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORoMk-0000Lw-7d for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Jun 2010 11:29:22 -0400 Original-Received: from [140.186.70.92] (port=47584 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORoMa-00008J-Uf for bug-gnu-emacs@gnu.org; Thu, 24 Jun 2010 11:29:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORoMT-0000gm-37 for bug-gnu-emacs@gnu.org; Thu, 24 Jun 2010 11:29:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58835) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORoMS-0000gh-VO for bug-gnu-emacs@gnu.org; Thu, 24 Jun 2010 11:29:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1ORoHZ-0003lB-WF; Thu, 24 Jun 2010 11:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Agustin Martin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Jun 2010 15:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6143 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6143-submit@debbugs.gnu.org id=B6143.127739303314447 (code B ref 6143); Thu, 24 Jun 2010 15:24:01 +0000 Original-Received: (at 6143) by debbugs.gnu.org; 24 Jun 2010 15:23:53 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORoHR-0003ky-HD for submit@debbugs.gnu.org; Thu, 24 Jun 2010 11:23:53 -0400 Original-Received: from edison.ccupm.upm.es ([138.100.4.49]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORoHP-0003kt-PZ for 6143@debbugs.gnu.org; Thu, 24 Jun 2010 11:23:52 -0400 Original-Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by edison.ccupm.upm.es (8.13.8/8.13.8) with ESMTP id o5OFNkZ6008156; Thu, 24 Jun 2010 17:23:46 +0200 Original-Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id 0C9D446487; Thu, 24 Jun 2010 17:23:46 +0200 (CEST) Content-Disposition: inline In-Reply-To: <87sk4cqyo2.fsf@jidanni.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 24 Jun 2010 11:24:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37974 Archived-At: --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jun 24, 2010 at 10:43:09PM +0800, jidanni@jidanni.org wrote: > AM> Has this fixed the over and over ispell process restart? > > No. Anyway, as it is hard to detect just what is causing the problem, > can we just have a flag, e.g., (setq ispell-never-kill 't) so that once > ispell is started, it is never killed until emacs quits. And thus will > be detected too, so no second ispell will be started. I tend to disagree here (but have good news), ispell process should not be restarted unless needed. And if needed should be restarted. Other behavior may make more harm than good and hide underlying problems. The good news are that seems I found the underlying problem (at least for the single extra ispell restart). Directory value, being the same, was sometimes set with unexpanded `~' and sometimes with it expanded, so they looked different to the comparison operator. I am testing attached patch that should make the expanded version to be used everywhere. I am testing it along with a dirty hack in .emacs (setq ispell-local-dictionary "american") (load "ispell") (setq ispell-program-name "aspell") (ispell-set-spellchecker-params) (ispell-start-process) that should start an ispell process. With the attached changes at least extra restart seems to be fixed. If I see no further problems I will commit changes soon, so you can test them in your box. Thanks for your feedback, -- Agustin --7JfCtLOvnd9MIVvH Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ispell.el_expand-default-directory.diff" --- ispell.el.orig 2010-06-24 16:57:52.000000000 +0200 +++ ispell.el 2010-06-24 17:02:22.000000000 +0200 @@ -2622,7 +2622,7 @@ ;; Restart check for personal dictionary is done in ;; `ispell-internal-change-dictionary', called from `ispell-buffer-local-dict' (or (or ispell-local-pdict ispell-personal-dictionary) - (equal ispell-process-directory default-directory))) + (equal ispell-process-directory (expand-file-name default-directory)))) (setq ispell-filter nil ispell-filter-continue nil) ;; may need to restart to select new personal dictionary. (ispell-kill-ispell t) @@ -2638,13 +2638,13 @@ (if (window-minibuffer-p) (if (fboundp 'minibuffer-selected-window) ;; Assign ispell process to parent buffer - (setq ispell-process-directory default-directory + (setq ispell-process-directory (expand-file-name default-directory) ispell-process-buffer-name (window-buffer (minibuffer-selected-window))) ;; Force `ispell-process-directory' to $HOME and use a dummy name (setq ispell-process-directory (expand-file-name "~/") ispell-process-buffer-name " * Minibuffer-has-spellcheck-enabled")) ;; Not in a minibuffer - (setq ispell-process-directory default-directory + (setq ispell-process-directory (expand-file-name default-directory) ispell-process-buffer-name (buffer-name))) (if ispell-async-processp (set-process-filter ispell-process 'ispell-filter)) --7JfCtLOvnd9MIVvH--