2010/4/1 Mark Wooding <m...@distorted.org.uk>:
> Package: dictionaries-common
> Version: 1.5.1
> Severity: normal
>
> Emacs launches an ispell process (by which I mean whatever you
> configured via `ispell-program-name') spontaneously, if you turn on
> `flyspell-mode' (e.g., through a mode hook) or by using C-$ (M-x
> ispell-word) and friends interactively.  This process is launched using
> the current buffer's `default-directory'.  If the current buffer is
> visiting a file on a removable volume like a USB stick, then ispell's
> current directory is on the volume, and ispell will prevent it from
> being unmounted.
>
> I notice that there's already a check that the default directory is a
> readable directory and `ispell-start-process' forces ispell to start in
> the user's home directory otherwise.  Since (at least if we're using an
> asynchronous process) the same ispell process is used for all buffers,
> the starting directory isn't necessarily very relevant to the job that
> ispell is being asked to do: I think that asynchronous ispell should be
> started in the user's home directory unconditionally.
>

Thanks for the info and the proposed fix,

I have to think about this more carefully, but using the directory
where ispell is called as a directory that can contain personal
dictionaries in parallel with the possible standard personal
dictionary is usual ispell behavior when no explicit personal
dictionary is set.

I tend to think that the underliying problem is at a different place.
Currently, when switching buffers an ispell process is restarted with
new info when dictionary is changed or when there is a change for
different localwords, or when local-directory changes and an explicit
personal dictionary is set, but  not when local-dictionary changes
without an explicit personal dictionary set (which also may lead to
different personal dictionaries and indirectly to different
localwords).

That means that if no personal dictionary is set and two buffers in
different dirs ask for spellchecking, the second one inherits values
for the first, which may be wrong for the second. That happens even if
first buffer asks for spellchecking, a second buffer is opened and the
first killed. I expect something similar to happen at your site, file
at the removable media is opened and an ispell process started for it
with original location properties, then another buffer is visited with
no explicit dict change, so uses the same process as the first. This
holds even if first buffer is killed leaving second one using default
directory for first buffer, thus blockting removable media unmount.

A first workaround for that is very simple, also restart ispell
process everytime local-directory changes. This improves things but
leaves something pending, killing a buffer should kill the associated
ispell process if no other buffer is using it. In my tests with the
first change that is not happening once I open a second buffer and
kill the first one (where I started an ispell process). Once I start
an ispell process in the second buffer things work again.

I have to think more about this, specially about second issue. Change
for the first may be committed soon.

> (Emacs tells me that I'm getting `ispell.el' from this package so I'm
> reporting it here.  The bug probably wants to be fixed in `emacs23' too.)

If everything works I will try to push this to upstream FSF emacs.
Current Debian ispell.el is very similar to FSF emacs one, heavily
patched for xemacs/backwards compatibility.

Cheers,

-- 
Agustin



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