unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: 69703@debbugs.gnu.org
Subject: bug#69703: Ispell process restarted too often
Date: Sun, 10 Mar 2024 09:37:20 +0200	[thread overview]
Message-ID: <86y1aqh70o.fsf@mail.linkov.net> (raw)

When different projects have different personal dictionaries
and flyspell mode is used, then ispell process is killed and restarted
almost on every key press.  This creates hundreds of hunspell processes
that soon fill all available memory.  Is it possible to fix this?

Here is an example of project-local .dir-locals.el:

  ((nil . ((ispell-personal-dictionary . "/tmp/test/.hunspell")
           (mode . flyspell))))

Example of backtrace after switching buffers
with different personal dictionaries:

  ispell-kill-ispell(t)
  ispell-internal-change-dictionary()
  ispell-buffer-local-dict()
  ispell-accept-buffer-local-defs()
  flyspell-accept-buffer-local-defs()
  flyspell-word()
  flyspell-check-changes()

Also tried to make the ispell process buffer-local with:

  (make-variable-buffer-local 'ispell-process)
  (make-variable-buffer-local 'ispell-current-personal-dictionary)

But this is worse and caused more problems:

  Error enabling Flyspell mode:
  (Buffer  *temp* has no process)
    flyspell-mode()
    set-auto-mode-0(flyspell-mode t)
    hack-one-local-variable(mode flyspell)
    hack-local-variables-apply()
    hack-dir-local-variables-non-file-buffer()
    project--value-in-dir(project-vc-name "/tmp/test/")
    project-name((vc Git "/tmp/test/"))
    project-mode-line-format()
    eval((project-mode-line-format) t)
    redisplay_internal\ \(C\ function\)()





             reply	other threads:[~2024-03-10  7:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-10  7:37 Juri Linkov [this message]
2024-03-10  8:06 ` bug#69703: Ispell process restarted too often Eli Zaretskii
2024-03-10 17:10   ` Juri Linkov
2024-03-10 17:51     ` Eli Zaretskii
2024-03-12  7:45       ` Juri Linkov
2024-03-12 14:44         ` Eli Zaretskii
2024-03-12 17:30           ` Juri Linkov
2024-03-14 17:50             ` Juri Linkov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=86y1aqh70o.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=69703@debbugs.gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).