From: Eli Zaretskii <eliz@gnu.org>
To: Konstantin Kharlamov <hi-angel@yandex.ru>
Cc: 50241@debbugs.gnu.org
Subject: bug#50241: flyspell doesn't work with multiple dictionaries
Date: Sun, 29 Aug 2021 16:07:08 +0300 [thread overview]
Message-ID: <83mtp0l7r7.fsf@gnu.org> (raw)
In-Reply-To: <f0a042c703ffe3e822177169918706c0b0e7b654.camel@yandex.ru> (message from Konstantin Kharlamov on Sun, 29 Aug 2021 15:43:30 +0300)
> From: Konstantin Kharlamov <hi-angel@yandex.ru>
> 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, <up>.
(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.
next prev parent reply other threads:[~2021-08-29 13:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-28 18:33 bug#50241: flyspell doesn't work with multiple dictionaries Konstantin Kharlamov
2021-08-28 18:56 ` Eli Zaretskii
2021-08-28 19:05 ` Konstantin Kharlamov
2021-08-28 19:35 ` Konstantin Kharlamov
2021-08-28 19:36 ` Eli Zaretskii
2021-08-28 19:45 ` Konstantin Kharlamov
2021-08-28 20:02 ` Konstantin Kharlamov
2021-08-28 20:19 ` Konstantin Kharlamov
2021-08-28 20:26 ` Konstantin Kharlamov
2021-08-28 20:42 ` Konstantin Kharlamov
2021-08-29 6:12 ` Eli Zaretskii
2021-08-29 12:43 ` Konstantin Kharlamov
2021-08-29 13:07 ` Eli Zaretskii [this message]
2021-08-29 19:50 ` Lars Ingebrigtsen
2021-08-30 2:24 ` Eli Zaretskii
2021-08-30 2:27 ` Lars Ingebrigtsen
2021-08-30 12:49 ` Eli Zaretskii
[not found] ` <handler.50241.B.163017564419363.ack@debbugs.gnu.org>
2021-08-28 18:59 ` bug#50241: Acknowledgement (flyspell doesn't work with multiple dictionaries) Konstantin Kharlamov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83mtp0l7r7.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=50241@debbugs.gnu.org \
--cc=hi-angel@yandex.ru \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.