From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: pp-eval-expression broken
Date: Fri, 5 Jan 2007 11:14:15 -0800 [thread overview]
Message-ID: <EIENLHALHGIMHGDOLMIMMEBGCOAA.drew.adams@oracle.com> (raw)
In-Reply-To: <86slep47xj.fsf@blue.stonehenge.com>
> 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.
next prev parent reply other threads:[~2007-01-05 19:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-05 15:51 pp-eval-expression broken Drew Adams
2007-01-05 17:52 ` Drew Adams
2007-01-05 18:58 ` Randal L. Schwartz
2007-01-05 19:14 ` Drew Adams [this message]
2007-01-06 2:55 ` Richard Stallman
2007-01-06 3:24 ` Drew Adams
2007-01-06 6:28 ` Drew Adams
2007-01-07 3:46 ` Richard Stallman
2007-01-09 22:56 ` Drew Adams
2007-01-13 22:27 ` Drew Adams
2007-01-14 14:45 ` Richard Stallman
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=EIENLHALHGIMHGDOLMIMMEBGCOAA.drew.adams@oracle.com \
--to=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 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.