From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50241: flyspell doesn't work with multiple dictionaries Date: Sun, 29 Aug 2021 16:07:08 +0300 Message-ID: <83mtp0l7r7.fsf@gnu.org> References: <581ffd00b0c4a0762689a423aff0ee13b5c85e52.camel@yandex.ru> <83lf4lmm8k.fsf@gnu.org> <83k0k5mked.fsf@gnu.org> <8658b0b457b9fc41624b454a0534013173de37ce.camel@yandex.ru> <65a1ecacc7ae808fc6fbc204094375604352c4aa.camel@yandex.ru> <1b2e0b953b4036fe10d45451e6b1381fe8931eeb.camel@yandex.ru> <83h7f8n5hx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25636"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50241@debbugs.gnu.org To: Konstantin Kharlamov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 29 15:08:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKKXh-0006T4-SW for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Aug 2021 15:08:09 +0200 Original-Received: from localhost ([::1]:52712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKKXg-0004X4-V2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Aug 2021 09:08:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKKXa-0004Ut-Au for bug-gnu-emacs@gnu.org; Sun, 29 Aug 2021 09:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44206) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKKXa-0008Ly-3O for bug-gnu-emacs@gnu.org; Sun, 29 Aug 2021 09:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKKXZ-0001oy-Ts for bug-gnu-emacs@gnu.org; Sun, 29 Aug 2021 09:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Aug 2021 13:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50241 X-GNU-PR-Package: emacs Original-Received: via spool by 50241-submit@debbugs.gnu.org id=B50241.16302424576968 (code B ref 50241); Sun, 29 Aug 2021 13:08:01 +0000 Original-Received: (at 50241) by debbugs.gnu.org; 29 Aug 2021 13:07:37 +0000 Original-Received: from localhost ([127.0.0.1]:55752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKKX7-0001oG-0Z for submit@debbugs.gnu.org; Sun, 29 Aug 2021 09:07:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKKX1-0001o0-W7 for 50241@debbugs.gnu.org; Sun, 29 Aug 2021 09:07:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37286) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKKWw-0008G7-6b; Sun, 29 Aug 2021 09:07:22 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3724 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKKWv-0002tl-ON; Sun, 29 Aug 2021 09:07:22 -0400 In-Reply-To: (message from Konstantin Kharlamov on Sun, 29 Aug 2021 15:43:30 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212933 Archived-At: > From: Konstantin Kharlamov > Cc: 50241@debbugs.gnu.org > Date: Sun, 29 Aug 2021 15:43:30 +0300 > > > I'm not sure I agree.  These are commands that are supposed to be > > invoked interactively, in the order I've shown, which works.  If you > > want to make this part of your initialization, you need to figure out > > the required sequence of calls, which you did. > > Would you agree if I say that a good user interface means that a function invoked interactively should behave same way when it's invoked non-interactively (barring the fact that it won't show the prompt)? No, I don't agree. And neither does Emacs: the 'interactive' form is not necessarily a no-op. As a trivial example, consider: describe-char is an autoloaded interactive compiled Lisp function in ‘descr-text.el’. (describe-char POS &optional BUFFER) Probably introduced at or before Emacs version 22.1. Describe position POS (interactively, point) and the char after POS. ^^^^^^^^^^^^^^^^^^^^^^ As you see, there's some magic happening in interactive invocations that doesn't happen when you call this function from Lisp. A less trivial example: previous-line is an interactive compiled Lisp function in ‘simple.el’. It is bound to C-p, . (previous-line &optional ARG TRY-VSCROLL) This function is for interactive use only; in Lisp code use `forward-line' with negative argument instead. Move cursor vertically up ARG lines. Interactively, vscroll tall lines if ‘auto-window-vscroll’ is enabled. Non-interactively, use TRY-VSCROLL to control whether to vscroll tall lines: if either ‘auto-window-vscroll’ or TRY-VSCROLL is nil, this function will not vscroll. Again, the behavior in interactive and non-interactive calls is different. > So I would say, at least the (ispell-set-spellchecker-params) needs to be added into one of them, so the same order as if they were called interactively would work when they are invoked from a Emacs Lisp file. Maybe, I need to think about it. But the general principle still stands: it is okay for interactive and non-interactive invocations to behave differently. We do it all the time in Emacs.