Package: dictionaries-common
Version: 1.5.5

Hi Augustin, your fix for

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=576223

has resulted in the ispell process being restarted almost every time
the buffer is changed, which is really needless and quite irritating.

It seems like the right fix is to always start the process in the
user's home directory.  The personal dictionary is already being
expanded to an absolute path and passed to the ispell process, so
ispell should still read the correct file even when it was specified
as a relative path so long as you override default-directory after
expanding the path.

The real problem seems to be that ispell-internal-change-dictionary is
not comparing expanded versions of the current and proposed personal
dictionaries and so would not detect the need to start a new ispell
process when the personal dictionary is a relative path and the
directory changes.

I am currently testing the patch below.

thanks,
Greg

--- ispell.el.orig      2010-05-17 06:44:01.000000000 -0400
+++ ispell.el   2010-07-21 16:37:02.000000000 -0400
@@ -2812,7 +2812,8 @@
     (setq ispell-buffer-local-name nil)
 
     (if ispell-async-processp
-       (let ((process-connection-type ispell-use-ptys-p))
+       (let ((default-directory (expand-file-name "~/"))
+              (process-connection-type ispell-use-ptys-p))
          (apply 'start-process
                 "ispell" nil ispell-program-name
                 "-a"                                ; accept single input lines
@@ -2829,13 +2830,7 @@
 (defun ispell-init-process ()
   "Check status of Ispell process and start if necessary."
   (if (and ispell-process
-          (eq (ispell-process-status) 'run)
-          ;; Unless we are using an explicit personal dictionary,
-          ;; ensure we're in the same default directory!
-          ;; 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)))
+          (eq (ispell-process-status) 'run))
       (setq ispell-filter nil ispell-filter-continue nil)
     ;; may need to restart to select new personal dictionary.
     (ispell-kill-ispell t)
@@ -2995,7 +2990,11 @@
   (let ((dict (or ispell-local-dictionary ispell-dictionary))
        (pdict (or ispell-local-pdict ispell-personal-dictionary)))
     (unless (and (equal ispell-current-dictionary dict)
-                (equal ispell-current-personal-dictionary pdict))
+                (equal (and ispell-current-personal-dictionary
+                             (expand-file-name 
ispell-current-personal-dictionary
+                                               ispell-process-directory))
+                        (and pdict
+                             (expand-file-name pdict default-directory))))
       (ispell-kill-ispell t)
       (setq ispell-current-dictionary dict
            ispell-current-personal-dictionary pdict))))



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to