From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: master 2f181d60323 3/6: pp.el (pp-fill): New default pp function Date: Sat, 15 Jul 2023 04:48:21 +0200 Message-ID: <87ilal51qi.fsf@web.de> References: <168703958196.28351.5331986860123726819@vcs2.savannah.gnu.org> <20230617220622.EC118C1925A@vcs2.savannah.gnu.org> <87bkgfrwxd.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30423"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Cancel-Lock: sha1:tu2VZTccdxnCqCTMsjn12Wx1/2E= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 15 04:49:33 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qKVLf-0007bR-VB for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Jul 2023 04:49:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKVKk-0003Ij-QZ; Fri, 14 Jul 2023 22:48:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKVKj-0003IU-ET for emacs-devel@gnu.org; Fri, 14 Jul 2023 22:48:33 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKVKi-0006EP-1E for emacs-devel@gnu.org; Fri, 14 Jul 2023 22:48:33 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1qKVKe-0006IC-NB for emacs-devel@gnu.org; Sat, 15 Jul 2023 04:48:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307883 Archived-At: Stefan Monnier writes: > > I only want to give the hint that this `forward-sexp' in the last line > > will error when the programmer has, e.g., commented out the body of a > > lambda expression. Or the user wants to fill automatically created code > > that looks like that, for whatever reason. > > Hmm... I don't quite understand what you mean... > Oh, are you thinking of when `lif` is a number larger than the number of > elements in the list? Yes. > Indeed, I think we'll burp then. I'll take a look at that. Thanks. I would vote for silently ignoring and falling back to default indentation. BTW, we had a thread in the Gnus mailing list (info-gnus-english@gnu.org) about `pp-fill'. Now that it's the default pp behavior, Gnus score files will be filled using this function before saving. I don't use score files, could be using this function is not appropriate for this kind of data. Anyway, a user reported a massive slowdown after you had made that change (thread "slow saving of scores when leaving a virtual (nnml+) group"), and posted this profiler output: | Cpu report (partly expanded): | | 10133 79% - command-execute | 8519 66% - funcall-interactively | 4767 37% - gnus-summary-exit | 4659 36% - gnus-score-save | 4655 36% - gnus-pp | 4655 36% - pp | 4655 36% - pp-to-string | 4655 36% - pp-fill | 4647 36% - pp--object | 4627 36% - pp-fill | 4615 36% - pp-fill | 4555 35% - pp-fill | 4263 33% - pp-fill | 4243 33% - indent-according-to-mode | 4243 33% - lisp-indent-line | 4163 32% - calculate-lisp-indent | 4163 32% - lisp-indent-function | 4163 32% lisp--local-defform-body-p | 48 0% + lisp-ppss | 240 1% + indent-according-to-mode | 72 0% + gnus-run-hooks | 32 0% + gnus-close-group | 4 0% + gnus-summary-update-info | 3688 28% + gnus-topic-select-group | 60 0% + file-notify-handle-event | 3 0% + execute-extended-command | 1614 12% + byte-code | 2260 17% Automatic GC | 407 3% + timer-event-handler | 0 0% ... Dunno if it is interesting for you. So far I don't know how the data looked like, but we can request it from the user. After changing `pp-default-function' to 'pp-28' the user is happy. Michael.