unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: sbaugh@catern.com, 67836@debbugs.gnu.org, sbaugh@janestreet.com
Subject: bug#67836: 29.1.90; map-y-or-n-p doesn't terminate when run in a kmacro in batch mode
Date: Sat, 16 Dec 2023 11:55:21 -0500	[thread overview]
Message-ID: <jwvfs022jl3.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83v88ykuqh.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Dec 2023 17:55:18 +0200")

>> Could you two point me to examples of uses of the
>> techniques you propose?  I'm curious to see how they compare.
> I'd start by grepping our test suite for "mock".

Thanks.  I found some uses in `shadowfile-tests.el` as well as one in
`tramp-test47-read-password`.

That got me to

    grep "(symbol-function .\?'read" test/**/*.el

which points to many more uses.

>> There's a tension where fixing such problems at low-level can have
>> longer term benefits (at the cost of backward incompatibilities), so
>> I think the best is to start by sending a patch that fixes the problem
>> at the place you judge to be The Right Place™.
> There's no disagreement on this level, the disagreement is about
> where's The Right Place™ ;-)

But before submitting the bug&patch there's no way to know that.
It's best if we don't try to second guess what the other one will think
is best.  Instead, we start by stating what we judge to be best, and
then we can reconcile differences via discussions.

The only really important aspect is to accept that opinions can differ
and that we may not always get what we want (and have the humility to
accept that even when we're convinced we're right, because even in that
case, we may just be missing the point :-)

>> Regarding `ding` in particular.  I don't really know what should be its
>> behavior in general.  I've always been surprised that it (usually)
>> doesn't actually signal an error even though its intention is to signal
>> to the user that there was a problem.
> You don't think we should be able to "ding" without signaling an
> error?

I think we should, but in practice `ding` should almost never be called
from "normal" ELisp code.  Most ELisp code signals an error instead
(which is then caught by the command loop which in turn emits a ding).

From that point of view, the fact that `ding` itself signals an error
when used from a keyboard macro is a bit weird.


        Stefan






  reply	other threads:[~2023-12-16 16:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 15:38 bug#67836: 29.1.90; map-y-or-n-p doesn't terminate when run in a kmacro in batch mode Spencer Baugh
2023-12-15 15:44 ` Spencer Baugh
2023-12-15 16:18   ` Eli Zaretskii
2023-12-15 22:55     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-16  8:11       ` Eli Zaretskii
2023-12-16 13:13         ` sbaugh
2023-12-16 13:52           ` Eli Zaretskii
2023-12-16 15:11             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-16 15:55               ` Eli Zaretskii
2023-12-16 16:55                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-12-16 17:24                   ` Eli Zaretskii

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=jwvfs022jl3.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=67836@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=sbaugh@catern.com \
    --cc=sbaugh@janestreet.com \
    /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).