GNU bug report logs - #65874
30.0.50; outline-minor-mode-use-buttons missing choice

Previous Next

Package: emacs;

Reported by: Mauro Aranda <maurooaranda <at> gmail.com>

Date: Mon, 11 Sep 2023 19:13:02 UTC

Severity: minor

Found in version 30.0.50

Fixed in version 29.1.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65874 in the body.
You can then email your comments to 65874 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#65874; Package emacs. (Mon, 11 Sep 2023 19:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mauro Aranda <maurooaranda <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 11 Sep 2023 19:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; outline-minor-mode-use-buttons missing choice
Date: Mon, 11 Sep 2023 16:12:11 -0300
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.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65874; Package emacs. (Tue, 12 Sep 2023 07:36:02 GMT) Full text and rfc822 format available.

Message #8 received at 65874 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: 65874 <at> debbugs.gnu.org
Subject: Re: bug#65874: 30.0.50; outline-minor-mode-use-buttons missing choice
Date: Tue, 12 Sep 2023 09:59:42 +0300
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65874; Package emacs. (Tue, 12 Sep 2023 09:57:01 GMT) Full text and rfc822 format available.

Message #11 received at 65874 <at> debbugs.gnu.org (full text, mbox):

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 65874 <at> debbugs.gnu.org
Subject: Re: bug#65874: 30.0.50; outline-minor-mode-use-buttons missing choice
Date: Tue, 12 Sep 2023 06:55:57 -0300
On 12/9/23 03:59, Juri Linkov wrote:
>> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65874; Package emacs. (Wed, 13 Sep 2023 06:57:03 GMT) Full text and rfc822 format available.

Message #14 received at 65874 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: 65874 <at> debbugs.gnu.org
Subject: Re: bug#65874: 30.0.50; outline-minor-mode-use-buttons missing choice
Date: Wed, 13 Sep 2023 09:51:06 +0300
[Message part 1 (text/plain, inline)]
>>> 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?

[outline-minor-mode-use-buttons-insert.patch (text/x-diff, inline)]
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))

Severity set to 'minor' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 13 Sep 2023 12:42:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65874; Package emacs. (Wed, 13 Sep 2023 15:25:01 GMT) Full text and rfc822 format available.

Message #19 received at 65874 <at> debbugs.gnu.org (full text, mbox):

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 65874 <at> debbugs.gnu.org
Subject: Re: bug#65874: 30.0.50; outline-minor-mode-use-buttons missing choice
Date: Wed, 13 Sep 2023 12:24:12 -0300
On 13/9/23 03:51, Juri Linkov wrote:
>>>> 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?

Yes, that's helpful.  Thank you.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65874; Package emacs. (Wed, 13 Sep 2023 16:51:01 GMT) Full text and rfc822 format available.

Message #22 received at 65874 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: 65874 <at> debbugs.gnu.org
Subject: Re: bug#65874: 30.0.50; outline-minor-mode-use-buttons missing choice
Date: Wed, 13 Sep 2023 19:50:15 +0300
close 65874 29.1.50
thanks

>>>>> 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?
>
> Yes, that's helpful.  Thank you.

I'm glad this helps, so now pushed to emacs-29.




bug marked as fixed in version 29.1.50, send any further explanations to 65874 <at> debbugs.gnu.org and Mauro Aranda <maurooaranda <at> gmail.com> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Wed, 13 Sep 2023 16:51:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 12 Oct 2023 11:24:29 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 253 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.