Subject: bug#30697: make eval-expression only take `read'-able Lisp

From: [email-masked] (Charles A. Roelli)
Date: Mon, 05 Mar 2018 20:09:19 +0100

> Date: Sun, 4 Mar 2018 14:36:57 -0800 (PST)
> From: Drew Adams <[email-masked]>
> 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.)