From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62453: 30.0.50; Semicolon in view-lossage yields wrong alignment Date: Sun, 26 Mar 2023 12:23:56 +0300 Message-ID: <83wn33ams3.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12538"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62453@debbugs.gnu.org To: Eshel Yaron , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 26 11:25:14 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pgMcj-0002zI-9v for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Mar 2023 11:25:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgMcb-00088L-BI; Sun, 26 Mar 2023 05:25:05 -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 1pgMcZ-00087z-7u for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 05:25:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pgMcY-0006iJ-1G for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 05:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pgMcX-0007zG-MW for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 05:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Mar 2023 09:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62453 X-GNU-PR-Package: emacs Original-Received: via spool by 62453-submit@debbugs.gnu.org id=B62453.167982264830636 (code B ref 62453); Sun, 26 Mar 2023 09:25:01 +0000 Original-Received: (at 62453) by debbugs.gnu.org; 26 Mar 2023 09:24:08 +0000 Original-Received: from localhost ([127.0.0.1]:44061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgMbg-0007y4-3X for submit@debbugs.gnu.org; Sun, 26 Mar 2023 05:24:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgMbd-0007xX-Co for 62453@debbugs.gnu.org; Sun, 26 Mar 2023 05:24:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgMbX-0006bA-Q4; Sun, 26 Mar 2023 05:23:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=1dk+w4pdFAwQSglDhGYdnUQIYNgExT2AanL0NLahDBY=; b=cBjYuHeyO8iw HZwWzhQy1Ie+TvUMOvpmqWo9a9XvWjyTi2TDJZF1PXCajE7CoA5FMij2DilFgMvexUTe4/dC/E2Tm WoXlD20455VdjXYLObaq0eH77MFfxWLfbD/2OuoVG2D38yZz+7RhjPWXVwrhHeONXTF7ByfvSk+sX Ptn59K1wmeIL1DfyoKGjJLjHgKDjNxDhr+15xWDPsy0z+PH+WDB5ZYDfdJQCWFiQPpaT0Hx7ZOMGe LW+o8U8vzZUMTcQRcCxv4Rg+Ixlj7W1zrAMecCP+tC/zBLIgsVs6BweZVbh3klXIBGAcF2JWw6gCq IGaSVo4WtcHj/QsVA9I/ng==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgMbV-0000cF-3e; Sun, 26 Mar 2023 05:23:59 -0400 In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258662 Archived-At: > Date: Sun, 26 Mar 2023 08:33:18 +0300 > From: Eshel Yaron via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > It seems like key sequences that end with a semicolon hinder the > alignment in the `view-lossage` output buffer. This is a regression > with respect to the (IMO correct) behavior in Emacs 27. > > With Emacs from master: > 1. emacs -Q > 2. type C-; > 3. type ; > 4. type C-h l > 5. The *Help* buffer now shows: > > C- ; ;; nil > ; ;; self-insert-command > C-h l ;; view-lossage > > Note that all three lines are formatted incorrectly compared to what we > get with Emacs 27: > > C-; ;; nil > ; ;; self-insert-command > C-h l ;; view-lossage Does the patch below give good results? Stefan, any better ideas? It looks like relying on comment-indent is quite fragile here, as keys can include a semi-colon, which will be interpreted as beginning a comment in too many places. I wonder whether the two extra bindings I add below really plug all the holes. diff --git a/lisp/help.el b/lisp/help.el index 3e94b50..13e61c0 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -689,6 +689,10 @@ view-lossage (with-current-buffer standard-output (goto-char (point-min)) (let ((comment-start ";; ") + ;; Prevent 'comment-indent' from handling a single + ;; semicolon as the beginning of a comment. + (comment-start-skip ";; ") + (comment-use-syntax nil) (comment-column 24)) (while (not (eobp)) (comment-indent)