From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Drew Adams <drew.adams@oracle.com>
Cc: 38736@debbugs.gnu.org
Subject: bug#38736: 26.3; ellipsis in `*Messages*', doc of `format' etc.
Date: Wed, 25 Dec 2019 08:44:53 -0800 (PST) [thread overview]
Message-ID: <32378b4e-d158-48d5-a48c-7afde59f5d32@default> (raw)
In-Reply-To: <<83pngcv5ha.fsf@gnu.org>>
> > Consider trying to figure out, when looking at a message in
> > `*Messages*', why a long list value shows ellipsis ("..."),
> > instead of showing all the elements.
>
> How did you get the ellipsis in *Messages*?
By a call (message "Result: %S" result), where the
value of `result' is a long list.
> I'm guessing you invoked 'eval', because this is a
> feature of 'eval'. So looking for the information
> in the doc string of 'message' is a somewhat strange
> place.
`message', like other functions, evaluates its args.
And `format' for %S ends up using `prin1'.
Help-wise, to get from `message' and `...' to
`print-length' is a long haul.
> > Following the `format-message' link, you still get no clue about
> > this, but you then follow a link for `format'. There you still
> > get no clue about it, but you see that %S uses `prin1'.
> >
> > Following the `prin1' link you finally find out that you can control
> > `message's use of ellipsis using `print-length' and `print-level'.
> >
> > Users shouldn't have to go through all of that (and that even assumes
> > that they are able to guess that following just that thread might get
> > them somewhere useful).
> >
> > What's true for `message' is also true for `error', etc. At least
> > the doc of `format' - and probably its often-used callers, such as
> > `message' - should specifically mention these "print"-controlling
> > (really just formatting) variables.
>
> I don't think it's reasonable to ask to have this low-level stuff
> bubble up to such high levels, which are quite far from the features
> which are affected by these variables.
It's not lower-level than are the details currently
included about %, `, and '.
If it's enough for the `message' doc to just refer
to `format-message' for `print-length' (eventually,
after following links), then it should be enough
for that doc to just refer to `format-message' for
the info about %, `, and ', no?
And as mentioned, % is not even mentioned in the
doc for `format-message'. Why is it more important
to mention % in the "higher-level" function `message'
than in `format-message'?
> %S is not a frequently used format,
Why do you think so?
It's perhaps the most common formatting string when
using `message' for debugging etc., which I think
is a common use case.
%S is the most general formatting string, accepting
any Lisp object.
> I'd expect users who use %S to know already
> about the ellipsis and how to control it.
IOW, you expect users of `message' - which is pretty
much everyone who uses Elisp - to know that. Well,
I use `message' and `%S' a lot, yet I had to track
it down, exactly as reported:
`message' > `format-message' > `format' > %S >
`prin1' > `print-length'
Using %S with `message' likely doesn't give you
`...' often. When it does, you can want to ask
Emacs how to control that. Currently you have
to dig deeply to find out.
next parent reply other threads:[~2019-12-25 16:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<006e6244-dd0a-46a8-8c61-36744b3216de@default>
[not found] ` <<83pngcv5ha.fsf@gnu.org>
2019-12-25 16:44 ` Drew Adams [this message]
2019-12-25 17:23 ` bug#38736: 26.3; ellipsis in `*Messages*', doc of `format' etc Eli Zaretskii
2019-12-26 3:24 ` Michael Heerdegen
2019-12-26 16:23 ` Eli Zaretskii
[not found] <<<<006e6244-dd0a-46a8-8c61-36744b3216de@default>
[not found] ` <<<<83pngcv5ha.fsf@gnu.org>
[not found] ` <<<32378b4e-d158-48d5-a48c-7afde59f5d32@default>
[not found] ` <<<83d0ccuxoe.fsf@gnu.org>
[not found] ` <<4a9b955a-ac97-41d9-a373-fc37b37581a4@default>
[not found] ` <<838smzvk86.fsf@gnu.org>
2019-12-26 17:49 ` Drew Adams
[not found] <<<006e6244-dd0a-46a8-8c61-36744b3216de@default>
[not found] ` <<<83pngcv5ha.fsf@gnu.org>
[not found] ` <<32378b4e-d158-48d5-a48c-7afde59f5d32@default>
[not found] ` <<83d0ccuxoe.fsf@gnu.org>
2019-12-25 20:54 ` Drew Adams
2019-12-26 3:28 ` Eli Zaretskii
2019-12-24 21:02 Drew Adams
2019-12-25 14:34 ` Eli Zaretskii
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=32378b4e-d158-48d5-a48c-7afde59f5d32@default \
--to=drew.adams@oracle.com \
--cc=38736@debbugs.gnu.org \
--cc=eliz@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.