[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: pp-eval-expression broken
From: |
Drew Adams |
Subject: |
RE: pp-eval-expression broken |
Date: |
Fri, 5 Jan 2007 11:14:15 -0800 |
> Drew> Perhaps I shouldn't have been so strong about the request,
> Drew> and no doubt there is a good reason for this change. But
> Drew> I'd still like to know what the reason is.
>
> Drew> It seems odd to me that the command would treat its arg
> Drew> differently, evaling it if interactive and not evaling it
> Drew> otherwise. The function is named -eval-, but it doesn't
> Drew> always eval.
>
> Drew> And, as I said, this will break any existing Lisp calls to
> Drew> the function. Those have been fixed in vanilla Emacs (22),
> Drew> but outside libraries will need to adjust, especially if
> Drew> they try to work with multiple Emacs versions.
>
> When I wrote pp-eval-expression, it was because I hated getting
> the output of eval-expression all on one line.
Same here! And I especially hate having a result appear in the minibuffer,
which means fishing it out of *Messages* if you want to select it.
In fact, FWIW, I re-bind M-: to `pp-eval-expression'.
(In fact, FWIW2, I even have a minibuffer binding of `M-:', so I can pp-eval
stuff on the fly, during minibuffer input.)
> I modelled it as closely as I could on the
> current eval-expression, lifting the code directly, just adding
> my little hook to push the output into a temp buffer, inserting
> return at the right places (that was the tricky part), then
> letting the standard indenting stuff handle
> the pretty-ing part.
>
> I'm not addicted to the goal that it completely mimic eval-expression.
> However, I'm curious about the motivation about this
> discontinuity. If it's to permit a non-evalled expression be
> pretty-printed, that's actually quite cool,
> and wouldn't make sense to be back-ported to eval-expression.
I hadn't thought of that.
In that case, maybe the same thing should be allowed interactively, via C-u?
And, similarly, maybe let `pp-eval-last-expression' with `C-u' do what `M-q'
does, but with the output in the *Pp Eval Output* buffer?
> However, perhaps the motivation can be made clearer in the docstring?
Agreed.
- pp-eval-expression broken, Drew Adams, 2007/01/05
- RE: pp-eval-expression broken, Drew Adams, 2007/01/05
- Re: pp-eval-expression broken, Richard Stallman, 2007/01/05
- RE: pp-eval-expression broken, Drew Adams, 2007/01/05
- RE: pp-eval-expression broken, Drew Adams, 2007/01/06
- Re: pp-eval-expression broken, Richard Stallman, 2007/01/06
- RE: pp-eval-expression broken, Drew Adams, 2007/01/09
- RE: pp-eval-expression broken, Drew Adams, 2007/01/13
- Re: pp-eval-expression broken, Richard Stallman, 2007/01/14