From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: pp-eval-expression enhancements
Date: Tue, 24 Jul 2007 15:24:22 -0400 [thread overview]
Message-ID: <jwvvec9zkkb.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <BNELLINCGFJLDJIKDGACMEOLCAAA.drew.adams@oracle.com> (Drew Adams's message of "Tue\, 24 Jul 2007 11\:50\:43 -0700")
> Yes, it considers the result to be large, not small. It uses this test,
> where the cursor is after the printed result:
> (or (< (1+ (point)) (point-max))
> (>= (- (point) (point-min)) (frame-width)))
That's odd, I just tried it in a "normal" Emacs session (no separate
minibuffer frame) and it also pops up a separate window rather than display
it in the echo area, even tho '(let ((x 1)) x) isn't nearly as long as my
frame's width (80 columns). Looking at the code, I see the above check is
made after pp and the first part checks whether the output uses a single
line or not, and of course my `let' expression uses 3 lines.
With setups different from mine where the echo area can grow to several
lines, it would make sense to change the logic so as to allow the use of the
echo-area even if the output spans more than one line.
In any case, I'm not sure if pp-eval-expression's behavior would really be
worse than M-: even for me. It's probably a question of habit.
> I don't use `ielm' much, but I suppose that if you know ahead of time that
> the result will be something that you want to manipulate (e.g. edit) then
> you might want to use `ielm'. It seems like overkill for this, but yes,
> that's one option. Do you have `ielm' on a key? `M-:'? Do you use
> `eval-expression' much?
I use M-: extensively. And I use ielm on a regular basis. I don't have any
special binding for it: M-x ielm RET is quick enough. As for overkill,
I actually find it pretty lightweight, so I'd disagree. The only problem
with `ielm' is that I have to `C-c b' to the proper buffer before being able
to do what I want.
> I use `pp-eval-expression' because it decides pretty well, IMO: if the
> result is more than it would make sense to show in the echo area, then it's
> likely that I want to do something with the result, so it puts it in a
> separate buffer, in the right mode.
> I find the heuristic is uses pretty handy. I never need to fish the result
> out of *Messages*
I never need such fishing, I always use the C-u prefix arg for that.
> Would you find `C-x 0' inconvenient? Don't you have the same problem
> (inconvenience) for `C-h f'?
It's probably a question of habit.
> I find it much more inconvenient that `M-:' currently prints a nice result
> (though it is difficult to read, because it is not pretty-printed and it is
> crammed into the echo area), but I can't get to that result to do anything
> with it, without going to buffer *Messages* and fishing it out.
Yes, pretty printing is good. I think your idea is right, but it needs
tweaking so as to use the echo-area more often (always?).
Stefan
next prev parent reply other threads:[~2007-07-24 19:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 22:54 pp-eval-expression enhancements Drew Adams
2007-07-22 23:42 ` Drew Adams
2007-07-23 18:06 ` Richard Stallman
2007-07-23 20:54 ` Drew Adams
2007-07-24 16:45 ` Richard Stallman
2007-07-24 17:18 ` Drew Adams
2007-07-24 18:17 ` Stefan Monnier
2007-07-24 18:50 ` Drew Adams
2007-07-24 19:24 ` Stefan Monnier [this message]
2007-07-24 20:23 ` Drew Adams
2007-07-24 22:02 ` Stefan Monnier
2007-07-25 21:40 ` Juri Linkov
2007-07-26 0:49 ` Stefan Monnier
2007-07-26 8:48 ` Juri Linkov
2007-07-26 19:12 ` Stefan Monnier
2007-08-04 23:42 ` T. V. Raman
2007-07-25 15:02 ` Richard Stallman
2007-07-25 15:02 ` Richard Stallman
2007-08-02 15:45 ` Richard Stallman
2007-08-03 3:26 ` Glenn Morris
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=jwvvec9zkkb.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/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.