unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: charles@aurox.ch (Charles A. Roelli)
To: Drew Adams <drew.adams@oracle.com>
Cc: 30697@debbugs.gnu.org
Subject: bug#30697: make eval-expression only take `read'-able Lisp
Date: Mon, 05 Mar 2018 20:09:19 +0100	[thread overview]
Message-ID: <m2371eibkw.fsf@aurox.ch> (raw)
In-Reply-To: <182ce144-2313-4cf9-9978-f9d6d570b4dd@default> (message from Drew Adams on Sun, 4 Mar 2018 14:36:57 -0800 (PST))

> Date: Sun, 4 Mar 2018 14:36:57 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
> Content-Type: text/plain; charset=us-ascii
> 
> > Here is a change to make eval-expression issue a warning in the
> > minibuffer when the user enters an unreadable expression.  Currently,
> > we just error out, so the user has to restart the command and go back
> > in the history to get back what he typed.
> 
> I don't see why this is better than what happens now.
> 
> We currently have `eval-expression-debug-on-error', which helps
> you understand the read or eval error.  And the function is not
> necessarily called interactively ("When called interactively...").
> 
> What problem is the proposed change trying to solve?

It's too easy to evaluate a meaningless expression, which is never
intended.  Instead, we can point the user to the position of the error
so that it can be easily fixed, unlike the current behavior, where the
user is left guessing.

(I don't think eval-expression-debug-on-error catches read errors --
if it did, it would show a *Backtrace* buffer when an unreadable
expression is entered.  But I didn't look very deeply, so correct that
if it's wrong.)





  reply	other threads:[~2018-03-05 19:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<m27eqriyat.fsf@aurox.ch>
2018-03-04 22:36 ` bug#30697: make eval-expression only take `read'-able Lisp Drew Adams
2018-03-05 19:09   ` Charles A. Roelli [this message]
2018-03-04 16:46 Charles A. Roelli
2018-03-04 17:10 ` Eli Zaretskii
2018-03-05 18:52   ` Charles A. Roelli
2019-06-24 18:58   ` bug#30697: make eval-expression only take `read'-able Lisp, " Lars Ingebrigtsen
2020-08-10 13:17     ` Lars Ingebrigtsen
2020-08-10 13:20       ` Lars Ingebrigtsen

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=m2371eibkw.fsf@aurox.ch \
    --to=charles@aurox.ch \
    --cc=30697@debbugs.gnu.org \
    --cc=drew.adams@oracle.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).