all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Agustin Martin <agustin.martin@hispalinux.es>
To: jidanni@jidanni.org, 6143@debbugs.gnu.org
Subject: bug#6143: ispell killing still not fixed
Date: Thu, 24 Jun 2010 17:23:45 +0200	[thread overview]
Message-ID: <20100624152345.GA2865@agmartin.aq.upm.es> (raw)
In-Reply-To: <87sk4cqyo2.fsf@jidanni.org>

[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]

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

[-- Attachment #2: ispell.el_expand-default-directory.diff --]
[-- Type: text/x-diff, Size: 1470 bytes --]

--- 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))

  reply	other threads:[~2010-06-24 15:23 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <handler.6143.D6143.127374871827801.notifdone@debbugs.gnu.org>
2010-05-09  1:21 ` [emacs-w3m:11218] 24.0.50; don't ispell-kill-ispell over and over jidanni
2010-05-11 13:20   ` bug#6143: " Agustin Martin
2010-05-11 14:40     ` Stefan Monnier
2010-05-11 15:18       ` Agustin Martin
2010-05-12 10:26         ` Agustin Martin
2010-05-12 13:30           ` Lennart Borgman
2010-05-12 14:35             ` Agustin Martin
2010-05-12 14:28           ` Stefan Monnier
2010-05-13 11:05             ` Agustin Martin
2010-05-28 13:45   ` bug#6143: closed (Re: bug#6143: 24.0.50; don't ispell-kill-ispell over and over) jidanni
2010-06-20  4:47   ` bug#6143: ispell killing still not fixed jidanni
2010-06-21 12:10     ` Agustin Martin
2010-06-23  2:19   ` jidanni
2010-06-24 11:35     ` Agustin Martin
2010-06-24 14:43   ` jidanni
2010-06-24 15:23     ` Agustin Martin [this message]
2010-06-24 15:51       ` Agustin Martin
2010-06-24 16:16         ` Agustin Martin
2010-06-24 23:52   ` jidanni
2010-06-25  8:30     ` Agustin Martin
2010-07-10  2:30   ` bug#6143: totally " agustin.martin
2010-07-22 19:11   ` bug#6143: 6143 ispell " jidanni
2010-07-23 11:18     ` Agustin Martin
2010-07-24  5:35     ` Dan Nicolaescu
2010-07-26  9:38       ` Agustin Martin
2010-07-26  9:59         ` Agustin Martin
2010-07-26 10:25           ` Agustin Martin
2010-07-27 12:03           ` Agustin Martin
2010-07-27 18:16         ` Dan Nicolaescu
2010-07-27 19:04         ` Dan Nicolaescu
2010-07-29 11:41           ` Agustin Martin
2010-07-29 13:07             ` Stefan Monnier
2010-09-02 12:47               ` Agustin Martin
2010-09-02 13:03                 ` jidanni
2010-10-26 10:20                   ` bug#6143: ispell killing still " Agustin Martin
2010-09-02 16:01                 ` bug#6143: 6143 ispell " Stefan Monnier
2010-09-03 10:19                   ` Agustin Martin
2010-07-23 19:30   ` jidanni
2010-07-26  3:54   ` jidanni
2010-07-26 14:21   ` jidanni
2010-07-27 17:35   ` jidanni
2010-07-29 20:42   ` jidanni
2010-08-13 14:20   ` jidanni
2010-10-26 12:07   ` bug#6143: ispell killing still " jidanni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100624152345.GA2865@agmartin.aq.upm.es \
    --to=agustin.martin@hispalinux.es \
    --cc=6143@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.