Bug#589880: dictionaries-common: ispell process restarted constantly
On Wed, Jul 21, 2010 at 04:47:38PM -0400, Greg Klanderman wrote: 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. Thanks for reminding, This last is the actual problem, see http://debbugs.gnu.org/6143 I already committed the fix upstream http://lists.gnu.org/archive/html/emacs-diffs/2010-06/msg00216.html but was waiting to update to more recent {ispell,flyspell}.el from FSF repo instead of cherry-picking that fix. And I did not yet do that because I wanted to work-around a new incompatibility with XEmacs. Just noticed that original reporter claims that this is still not fixed. I remember to having tested this, but will try again. No other complains appeared since that commit (24 Jun 2010). Do not know which way will go first, cherry-pick or update, depending on the XEmacs compatibility issue. I am currently having little connectivity, but hope to decide today. Cheers, -- Agustin -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#589880: dictionaries-common: ispell process restarted constantly
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.0 -0400 +++ ispell.el 2010-07-21 16:37:02.0 -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