all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Eli Barzilay <eli@barzilay.org>
Cc: 4118@emacsbugs.donarmstrong.com
Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient
Date: Fri, 14 Aug 2009 02:33:46 +0300	[thread overview]
Message-ID: <87fxbvp9e5.fsf@mail.jurta.org> (raw)
In-Reply-To: <19075.27103.685992.984191@winooski.ccs.neu.edu> (Eli Barzilay's message of "Wed, 12 Aug 2009 21:18:23 -0400")

>> But it inserts other representations only when you type `C-x C-e' twice.
>> Do you mean you don't want this after the second `C-x C-e' key press?
>
> Hmm, I see that the reason for what I've seen is that I'm using it
> indirectly through my own function, and for some reason
> `eval-expression-print-format' decides whether to do its thing based
> on the current command.  This looks like an odd interface...  A better
> and more consistent interface seems to me to always print the extra
> information unless it goes into a buffer -- something like:
>
>   (defun eval-expression-print-format (value)
>     ...
>     (if (and (integerp value) (not (bufferp standard-output)))
>         ...))

The reason not to print the extra information on the first invocation of
`eval-last-sexp' is the following.  Most often users want to see the integer
result of the evaluated expression, but the extra information also contains
a character representation of this integer that might print some unrelated
character that might load some weird fonts the user doesn't want to load.

> But you seem to suggest that there are practical uses to get that
> extra stuff into the buffer?  I don't see any occasion that would make
> it desirable...

When the current buffer contains an integer, typing `C-x C-e' twice
inserts it to the same buffer as a character.  However, this is
not too convenient, so I'd like to improve this interface.

-- 
Juri Linkov
http://www.jurta.org/emacs/





  reply	other threads:[~2009-08-13 23:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 10:55 bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Eli Barzilay
2009-08-12 20:57 ` Juri Linkov
2009-08-13  1:18   ` Eli Barzilay
2009-08-13 23:33     ` Juri Linkov [this message]
2009-08-14  1:25       ` Eli Barzilay
2009-08-14 22:54         ` Juri Linkov
2009-08-15  1:38           ` Eli Barzilay
2009-08-15 23:16             ` Juri Linkov
2009-08-16  0:00               ` Eli Barzilay
2009-08-17  0:52                 ` Juri Linkov
2009-08-17  3:18                   ` Eli Barzilay
2016-06-15  0:35 ` Noam Postavsky

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=87fxbvp9e5.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=4118@emacsbugs.donarmstrong.com \
    --cc=eli@barzilay.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.