From unknown Mon Jun 23 07:49:22 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#64684 <64684@debbugs.gnu.org> To: bug#64684 <64684@debbugs.gnu.org> Subject: Status: 30.0.50; Outline mode for describe-mode Reply-To: bug#64684 <64684@debbugs.gnu.org> Date: Mon, 23 Jun 2025 14:49:22 +0000 retitle 64684 30.0.50; Outline mode for describe-mode reassign 64684 emacs submitter 64684 Juri Linkov severity 64684 wishlist tag 64684 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 17 13:49:28 2023 Received: (at submit) by debbugs.gnu.org; 17 Jul 2023 17:49:29 +0000 Received: from localhost ([127.0.0.1]:50863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLSLg-00042g-GJ for submit@debbugs.gnu.org; Mon, 17 Jul 2023 13:49:28 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLSLd-00042E-9z for submit@debbugs.gnu.org; Mon, 17 Jul 2023 13:49:28 -0400 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 1qLSLM-00017p-Mp for bug-gnu-emacs@gnu.org; Mon, 17 Jul 2023 13:49:11 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLSLJ-0003jf-LK for bug-gnu-emacs@gnu.org; Mon, 17 Jul 2023 13:49:08 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 7734F60008 for ; Mon, 17 Jul 2023 17:49:00 +0000 (UTC) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Outline mode for describe-mode Organization: LINKOV.NET Date: Mon, 17 Jul 2023 20:46:25 +0300 Message-ID: <86h6q28m8e.fsf_-_@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-GND-Sasl: juri@linkov.net Received-SPF: pass client-ip=217.70.183.195; envelope-from=juri@linkov.net; helo=relay3-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --=-=-= Content-Type: text/plain >> I tried to enable outline-minor-mode in the output buffer of 'C-h m', >> and it has some problems: >> >> 1. outline-regexp of 'C-h b' is not suitable for 'C-h m', because the >> output of 'C-h b' is more uniform, but the output of 'C-h m' includes >> free-form text that causes false positives for the regexp ".*:$". >> >> 2. heading lines of 'C-h m' are beginning with a link, so the link faces >> are copied to the outline indicator. >> >> Both these problems could be fixed by adding an asterisk to the beginning >> of headings in 'C-h m', for example: >> >> * Font-Lock minor mode (no indicator): >> >> Does this look nice? Or should we try to find a regexp for existing output? > > I don't know. We also have ^L that separate sections; can we use that > for Outline, or maybe add some heading after ^L? Here is a new option 'describe-mode-outline' that doesn't require changing the current formatting in 'C-h m': --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=describe-mode-outline.patch diff --git a/lisp/help-fns.el b/lisp/help-fns.el index b9388b45397..e8c019c0a92 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -2110,6 +2110,12 @@ describe-keymap (when used-gentemp (makunbound keymap)))) +(defcustom describe-mode-outline t + "Non-nil enables outlines in the output buffer of `describe-mode'." + :type 'boolean + :group 'help + :version "30.1") + ;;;###autoload (defun describe-mode (&optional buffer) "Display documentation of current major mode and minor modes. @@ -2135,7 +2141,7 @@ describe-mode (with-help-window (help-buffer) (with-current-buffer (help-buffer) ;; Add the local minor modes at the start. - (when local-minors + (when (and local-minors (not describe-mode-outline)) (insert (format "Minor mode%s enabled in this buffer:" (if (length> local-minors 1) "s" ""))) @@ -2162,6 +2168,10 @@ describe-mode (insert (help-split-fundoc (documentation major) nil 'doc) (with-current-buffer buffer (help-fns--list-local-commands))) + (when describe-mode-outline + (save-excursion + (goto-char (point-min)) + (put-text-property (pos-bol) (pos-eol) 'outline-level 1))) (ensure-empty-lines 1) ;; Insert the global minor modes after the major mode. @@ -2173,6 +2183,23 @@ describe-mode (when (re-search-forward "^\f") (beginning-of-line) (ensure-empty-lines 1))) + + (when describe-mode-outline + (setq-local outline-search-function #'outline-search-level) + (setq-local outline-level (lambda () 1)) + (setq-local outline-minor-mode-cycle t + outline-minor-mode-highlight t + outline-minor-mode-use-buttons 'insert + outline--cycle-buffer-state 'show-all) + (outline-minor-mode 1) + (save-excursion + (goto-char (point-min)) + (let ((inhibit-read-only t)) + ;; Hide ^Ls. + (while (search-forward "\n\f\n" nil t) + (put-text-property (1+ (match-beginning 0)) (1- (match-end 0)) + 'invisible t))))) + ;; For the sake of IELM and maybe others nil))))) @@ -2208,6 +2235,10 @@ describe-mode--minor-modes "no indicator" (format "indicator%s" indicator))))) + (when describe-mode-outline + (save-excursion + (forward-line -1) + (put-text-property (pos-bol) (pos-eol) 'outline-level 1))) (insert (or (help-split-fundoc (documentation mode) nil 'doc) "No docstring"))))) (forward-line -1) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 17 13:57:24 2023 Received: (at 64684) by debbugs.gnu.org; 17 Jul 2023 17:57:24 +0000 Received: from localhost ([127.0.0.1]:50884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLSTM-0004H2-DS for submit@debbugs.gnu.org; Mon, 17 Jul 2023 13:57:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLSTK-0004Gk-1R for 64684@debbugs.gnu.org; Mon, 17 Jul 2023 13:57:22 -0400 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 1qLSTE-0006Iq-HC; Mon, 17 Jul 2023 13:57:16 -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=0vz77gKiVQRBamOMeXTWVpT9Q+6UJdTIbUMJ2JHsAf0=; b=QR2eyta+kscG WMP0fHHTBYR1Z0QorzE/x7sLCC/UG7kJe2N1yZ0pCLOsgbl79CKXNnZi4GL+/+iplJAWETaY28l91 tYkecHbfvOhk03UG8JUqJ22JWw+4tSLQ4oUg3erfhfq3Kl79GwO0iSzZ7RfCfeIU39DBStBFpMW/S nTggMF5gaggB8IfP7yCt1Zb5lIC3d0RwmyuJ2FfYBLrhYCmr3bm7QiUzGrRNVyv1DFloX5NheTT5A DoCd8xuxc2f9U+dgqm+FbXT12GMGQUiSezo6E9Kmp2ng9kfHiNVm8hg7F33rNw44Z/YQoI+rEzDEF nc8l2a0Ob6CoiKwXw8fWGA==; 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 1qLST8-00056C-Ax; Mon, 17 Jul 2023 13:57:16 -0400 Date: Mon, 17 Jul 2023 20:57:37 +0300 Message-Id: <83sf9m775a.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <86h6q28m8e.fsf_-_@mail.linkov.net> (message from Juri Linkov on Mon, 17 Jul 2023 20:46:25 +0300) Subject: Re: bug#64684: 30.0.50; Outline mode for describe-mode References: <86h6q28m8e.fsf_-_@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64684 Cc: 64684@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Date: Mon, 17 Jul 2023 20:46:25 +0300 > > > I don't know. We also have ^L that separate sections; can we use that > > for Outline, or maybe add some heading after ^L? > > Here is a new option 'describe-mode-outline' that doesn't require > changing the current formatting in 'C-h m': Thanks. Just don't forget calling this out in NEWS. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 05 10:58:53 2023 Received: (at control) by debbugs.gnu.org; 5 Sep 2023 14:58:53 +0000 Received: from localhost ([127.0.0.1]:57671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdXW1-0003IQ-Cd for submit@debbugs.gnu.org; Tue, 05 Sep 2023 10:58:53 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:60573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdXVz-0003IF-A5 for control@debbugs.gnu.org; Tue, 05 Sep 2023 10:58:51 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-500a398cda5so4512671e87.0 for ; Tue, 05 Sep 2023 07:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693925925; x=1694530725; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=oUtbQ6vk0BCJDlNEUDPJFVxNlu6huWRxn4Wwlu+nT/k=; b=Lm6/bIDE4SfEZLHlFNnaLDIlSDfWOXA7uz9ymno3pccMLWko2pQbcID08QeZoFgkRK HjD72ito50L5KFDeSAnSCBpqAvnthRF1Q5Gq4Gnrpsw3m3uI+EHhkRs/vl/7XzaHsg5z 0pa8KHhLxFMn/T3OutWfVbHvzQSEtjcO1fYC2UECCkfGJN/ZvaiW2qnXX+q/m2zwEAqg cI8jSqD1kpE6YtE1tLz6ug6vpb975JMjBSsT7edlxGEDljnemOmZrNVlDHsUwdkZOWkD Q0FLpmepSR42wBuY6UTHjE8GP3tIUtIyPmUYd4S52F7cP3dnVyJTt7gYglHeAKe0M6nA ZtkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693925925; x=1694530725; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=oUtbQ6vk0BCJDlNEUDPJFVxNlu6huWRxn4Wwlu+nT/k=; b=FIzsiDuPaVW47LfxzTD2nh2a9zjZOCTpXnYIpv9/fIpxErBAhc8BgPCGc0XJyR2OZP LOf1S0d08xulFY4vpDoxlxh34oXh/EpFPFltDfny9a1u31k247ZZypzbZ/0sufE40qsb Fa4v0XXkktfmgbKX5V6MONKn7xcWmJUzoJovJp0Fl8p/XLbzv9HqX92otQv3x53ZI9In 6Uvf31SyobVhY/dIaVN/dlb5g7ANaz2tM4k8u9rDWDkWT/UJq5xQbMFjPHFLOjw9Cni+ GJcRkHsJ8ghBhm2ybohTG8WZaMF40TLp/TspD94OhkY5SqyqOgeFo6a8l1ondXNUNpQy Bftg== X-Gm-Message-State: AOJu0YzaBMkaUY4pTbOj8g/g9Rhdvg9K8JjIHSfHpuanBTY1T5jSW7VZ BqGlkjjrz2hKrUAUnFW4Aad7FkjoG3ncx884VGxCvj3Yivk= X-Google-Smtp-Source: AGHT+IFHromOeUNI59VLV0Auup3LenpF7yzqWltXhifZXbKVW0vPk2dO98uEZmcI1w3FGTw1hL+lZpUxoN+74ebqdv0= X-Received: by 2002:a05:6512:450:b0:4fe:85c:aeba with SMTP id y16-20020a056512045000b004fe085caebamr75952lfk.21.1693925924538; Tue, 05 Sep 2023 07:58:44 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 5 Sep 2023 07:58:44 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Tue, 5 Sep 2023 07:58:44 -0700 Message-ID: Subject: control message for bug #64684 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 64684 + patch quit From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 22 04:58:53 2023 Received: (at control) by debbugs.gnu.org; 22 Sep 2023 08:58:53 +0000 Received: from localhost ([127.0.0.1]:35301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjbzx-0002tX-6U for submit@debbugs.gnu.org; Fri, 22 Sep 2023 04:58:53 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:47121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjbzu-0002tH-N6 for control@debbugs.gnu.org; Fri, 22 Sep 2023 04:58:52 -0400 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2bffa8578feso31409151fa.2 for ; Fri, 22 Sep 2023 01:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695373114; x=1695977914; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=RnMTPxpFSyrWvc+XNhQe+gldnFgqk7ah1dhuNGn7wvg=; b=bNGaV1EHjGOwlvVxuqe8N/Kzzj5n6D+p+AW74MiaDnymG4cn4kuhlCYpeu3CThj9QM XSPnnCGtWFyJxu7/9MhBSoObVo9B/tAiLqropTe8hShfXzw2IsWjUSoXE+zY6wqetg4p /wOWG4g3VdqPf3CcUQVFveNvdyG7vI6ZISqJ8AY/HWuXyEbz6r7ip5H3ptpgXN3vaHoI i9pyzdlVISP0gMiPlD0/f81Vjdrv0PVeGwBuqPAleH8mrjJFL4FXOzqDaOULS6v39PUg sHOnBSENx6TZe578/vRmRBdLQRvCo+EjEdjjueyPzXCm1zE8R7s+7NCccy/M9Q5SD+ik jYtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695373114; x=1695977914; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RnMTPxpFSyrWvc+XNhQe+gldnFgqk7ah1dhuNGn7wvg=; b=fL9WUTFwcwYjvKAPdnHYoWc2dfbQzhlohwPVpw0IWK7SXrYExumRO07MxOH3my4HN7 /kDLOfntC1Vjto3PxN5x4dIT1vIhuzQ5md50HcIthZJiwdZZ7K3pBqL3dXbO0KpNXI/e EsWPWwKHNEjhj3hjstwKPWZiGeJ2cxtAQdZsDhAOKB0pXyTlLHc8raJpM6sGXAtOCtit 2CYhCl7Dqx+q7EbyxuFuiX8P1oEQtpBmc2o37GSMLmvirIJTvtPNioNuMErBxQTehO7l Ybvqb++0uiL6PSx7K05UbApIKYvpTBEp+UGPWheUvG822JgfvaL5km+ruUbQtAq5xG5m 4vdw== X-Gm-Message-State: AOJu0YzGk5BKOpOiXXFwGp6jti+nvGfbb5QwwNHgzT4PvP7v1daJUW13 Cz9hbDBk5q37eLv3BxrsIu3LtZ33zaLWaY734qOu/Zs2 X-Google-Smtp-Source: AGHT+IH9wLMMcmT0GNMuN65Jms4gvB13EwieROnAF0B7rU6GlOUkvmG56xgRk49SKukTRUTC4b16NgMuo6wUGBhb43Y= X-Received: by 2002:a2e:3a15:0:b0:2c0:1673:53af with SMTP id h21-20020a2e3a15000000b002c0167353afmr7024450lja.14.1695373114177; Fri, 22 Sep 2023 01:58:34 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 22 Sep 2023 01:58:33 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Fri, 22 Sep 2023 01:58:33 -0700 Message-ID: Subject: control message for bug #64684 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) severity 64684 wishlist quit From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 22 12:42:29 2024 Received: (at 64684) by debbugs.gnu.org; 22 Feb 2024 17:42:29 +0000 Received: from localhost ([127.0.0.1]:44693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdD5Y-0002J7-Rx for submit@debbugs.gnu.org; Thu, 22 Feb 2024 12:42:29 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:33627) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdD5W-0002IN-0l; Thu, 22 Feb 2024 12:42:26 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 4822EC000A; Thu, 22 Feb 2024 17:41:35 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#64684: 30.0.50; Outline mode for describe-mode In-Reply-To: <83sf9m775a.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 17 Jul 2023 20:57:37 +0300") Organization: LINKOV.NET References: <86h6q28m8e.fsf_-_@mail.linkov.net> <83sf9m775a.fsf@gnu.org> Date: Thu, 22 Feb 2024 19:38:33 +0200 Message-ID: <86y1bcqu06.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 64684 Cc: 64684@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.6 (---) close 64684 30.0.50 thanks >> Here is a new option 'describe-mode-outline' that doesn't require >> changing the current formatting in 'C-h m': > > Thanks. Just don't forget calling this out in NEWS. Ok, now pushed with NEWS to master. From unknown Mon Jun 23 07:49:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 22 Mar 2024 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator