From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#65874: 30.0.50; outline-minor-mode-use-buttons missing choice Date: Wed, 13 Sep 2023 09:51:06 +0300 Organization: LINKOV.NET Message-ID: <86o7i6wopx.fsf@mail.linkov.net> References: <86cyynony5.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20462"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 65874@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 13 08:57:24 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 1qgJoS-00057f-Kh for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Sep 2023 08:57:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgJo4-0003Iy-Sg; Wed, 13 Sep 2023 02:57:00 -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 1qgJo3-0003IT-SC for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2023 02:56:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgJo3-00034F-K6 for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2023 02:56:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgJo7-00012y-5s for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2023 02:57:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Sep 2023 06:57:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65874 X-GNU-PR-Package: emacs Original-Received: via spool by 65874-submit@debbugs.gnu.org id=B65874.16945881813967 (code B ref 65874); Wed, 13 Sep 2023 06:57:03 +0000 Original-Received: (at 65874) by debbugs.gnu.org; 13 Sep 2023 06:56:21 +0000 Original-Received: from localhost ([127.0.0.1]:60580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgJnR-00011u-Aa for submit@debbugs.gnu.org; Wed, 13 Sep 2023 02:56:21 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:58097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgJnF-00011L-Qg for 65874@debbugs.gnu.org; Wed, 13 Sep 2023 02:56:12 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 607FE40006; Wed, 13 Sep 2023 06:55:56 +0000 (UTC) In-Reply-To: (Mauro Aranda's message of "Tue, 12 Sep 2023 06:55:57 -0300") X-GND-Sasl: juri@linkov.net 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:270252 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit >>> The docstring for outline-minor-mode-use-buttons says its value can be >>> the symbol insert, but that choice is not present in its :type. >>> >>> I can't send a patch, because I can't figure out a good :tag for it. >> >> Such omission is intentional, because 'insert' can be used only >> in generated buffers, not in editable buffers, so disallowing >> customization to the value 'insert' protects the users >> from damaging editable buffers. > > I see, thanks.  How about adding something to the docstring some text to > explain that?  And/or maybe add a comment in the :type to clarify that > the omission is intentional? Maybe something like this for the emacs-29 branch? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=outline-minor-mode-use-buttons-insert.patch diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 3d3f2562617..6f57bae8fef 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -1024,10 +1024,11 @@ Outline Minor Mode mouse on the button toggles display of the section. If the value of this variable is @code{insert}, the buttons are inserted directly into the buffer text, so @key{RET} on the button will also toggle display -of the section, like a mouse click does. If the value is -@code{in-margins}, Outline minor mode will use the window margins to -indicate that a section is hidden. The buttons are customizable as icons -(@pxref{Icons}). +of the section, like a mouse click does. Using the value @code{insert} +is not recommended in editable buffers because it modifies them. +If the value is @code{in-margins}, Outline minor mode will use the +window margins to indicate that a section is hidden. The buttons are +customizable as icons (@pxref{Icons}). @vindex outline-minor-mode-cycle If the @code{outline-minor-mode-cycle} user option is diff --git a/lisp/outline.el b/lisp/outline.el index 97a51c9b92a..7cdfec753d1 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -314,12 +314,15 @@ outline-minor-mode-use-buttons When the value is `insert', additional placeholders for buttons are inserted to the buffer, so buttons are not only clickable, but also typing `RET' on them can hide and show the body. +Using the value `insert' is not recommended in editable +buffers because it modifies them. When the value is `in-margins', then clickable buttons are displayed in the margins before the headings. When the value is `t', clickable buttons are displayed in the buffer before the headings. The values `t' and `in-margins' can be used in editing buffers because they don't modify the buffer." + ;; The value `insert' is not intended to be customizable. :type '(choice (const :tag "Do not use outline buttons" nil) (const :tag "Show outline buttons in margins" in-margins) (const :tag "Show outline buttons in buffer" t)) --=-=-=--