all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
	Gemini Lasswell <gazally@runbox.com>,
	36566@debbugs.gnu.org, Noam Postavsky <npostavs@gmail.com>
Subject: bug#36566: 27.0.50; debug is sometimes horribly slow
Date: Sat, 14 May 2022 18:18:39 +0200	[thread overview]
Message-ID: <87czggjdeo.fsf@gnus.org> (raw)
In-Reply-To: <jwv5ym8hzvn.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 14 May 2022 12:05:42 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> But maybe for this specific issue we could make it so
> `print-char-length` is only obeyed by `cl-print` (and only when
> `cl-print-readably` is nil) and not `prin1` (which is the function that
> prints in a machine-readable way and should hence arguably never
> truncate).

Ah, yes, that's true...  it's not really that big a deal with the new
variable if we do it that way.

>> I did suggest (in conjunction with another bug report in this area) that
>> we should just extend `prin1{,-to-string}' with a parameter that would
>> set (on the C level) an equivalent variable.  So we'd have
>> (prin1 object fun `((char-length . ,edebug-print-char-length)))
>> etc.  (And `t' would be "all defaults".)
>
> Some kind of "print context" object would be good, indeed.
> Being able to set/modify this context "at a distance" via dynamic
> scoping is quite handy, tho, so we probably want to still support that
> as well.
>
> Here's an idea: a print context could include an `inherit` setting which
> says whether to "keep looking for more settings from the context".
> Then we printing we use settings from:
> - the explicit context passed as arg (if present).
> - the currently existing `print-<foo>` vars (if there isn't an explicit
>   context arg whose `inherit` says not to do that).
> We could even go crazy and add an intermediate step to check
> a `print-context` var which contains such an object.

I was thinking something along the lines of

(prin1 object nil '((depth . 4) (circle . t)))

to "bind" only those two, and t as a special value for "all the
defaults" (i.e., print-length/depth/etc to nil), but you can also mix
and match:

(prin1 object nil '(t (depth . 4) (circle . t)))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2022-05-14 16:18 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10  3:09 bug#36566: 27.0.50; debug is sometimes horribly slow Michael Heerdegen
2019-07-10  3:18 ` Drew Adams
2019-07-10 11:20 ` Noam Postavsky
2019-07-10 22:46   ` Michael Heerdegen
2019-07-14  0:02     ` Gemini Lasswell
2019-07-15  2:05       ` Michael Heerdegen
2019-08-01  1:06         ` Gemini Lasswell
2019-08-01  0:53       ` Gemini Lasswell
2019-08-01  1:05         ` Noam Postavsky
2019-08-05 19:53           ` Gemini Lasswell
2019-08-19  1:30             ` Noam Postavsky
2019-09-06 16:41               ` Gemini Lasswell
2019-09-11  2:54                 ` Noam Postavsky
2019-09-13 21:08                   ` Gemini Lasswell
2019-09-14 13:44                     ` Mauro Aranda
2019-09-14 14:05                       ` Eli Zaretskii
2019-09-14 14:16                         ` Mauro Aranda
2019-09-14 15:47                           ` Eli Zaretskii
2022-04-25 14:41                     ` Lars Ingebrigtsen
2022-04-25 23:23                       ` Michael Heerdegen
2022-04-27  0:37                       ` Gemini Lasswell
2022-04-27  4:42                         ` Michael Heerdegen
2022-04-27 12:28                           ` Lars Ingebrigtsen
2022-04-28 17:56                             ` Gemini Lasswell
2022-05-13 16:01                               ` Lars Ingebrigtsen
2022-05-14  3:57                                 ` Michael Heerdegen
2022-05-14 11:35                                   ` Lars Ingebrigtsen
2022-05-14 13:52                                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-14 15:45                                       ` Lars Ingebrigtsen
2022-05-14 16:05                                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-14 16:18                                           ` Lars Ingebrigtsen [this message]
2022-05-14 16:54                                             ` Lars Ingebrigtsen
2022-05-14 18:55                                               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-15 12:25                                                 ` Lars Ingebrigtsen
2022-05-15 13:33                                                   ` Lars Ingebrigtsen
2022-05-15 16:13                                                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-15 16:25                                                     ` Lars Ingebrigtsen
2022-05-15 16:52                                                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-16  1:00                                                         ` Lars Ingebrigtsen
2022-05-16  1:39                                                           ` Michael Heerdegen
2022-05-16  1:44                                                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-16 12:11                                                             ` Lars Ingebrigtsen
2022-05-15  7:47                                           ` Rudolf Schlatte
2022-05-15 12:28                                             ` Lars Ingebrigtsen

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=87czggjdeo.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=36566@debbugs.gnu.org \
    --cc=gazally@runbox.com \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    --cc=npostavs@gmail.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.