GNU bug report logs - #47252
28.0.50; [PATCH] Make minibuffer-depth-indicator-function a defcustom

Previous Next

Package: emacs;

Reported by: Gabriel <gabriel376 <at> hotmail.com>

Date: Fri, 19 Mar 2021 03:38:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 47252 in the body.
You can then email your comments to 47252 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#47252; Package emacs. (Fri, 19 Mar 2021 03:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gabriel <gabriel376 <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 19 Mar 2021 03:38:02 GMT) Full text and rfc822 format available.

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

From: Gabriel <gabriel376 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; [PATCH] Make minibuffer-depth-indicator-function a defcustom
Date: Fri, 19 Mar 2021 00:36:47 -0300
[Message part 1 (text/plain, inline)]
This simple patch makes 'minibuffer-depth-indicator-function' a
defcustom.

[0001-lisp-mb-depth.el-Make-minibuffer-depth-indicator-fun.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
There was a long discussion 14 years ago when mb-depth.el was
implemented about making it a defcustom or not:

[1] https://lists.gnu.org/archive/html/emacs-devel/2008-08/msg00025.html
[2] https://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00304.html

These are the only references I could find about this topic. Perhaps
today the rationale for this decision is different and this patch can be
applied. If the decision is to keep it as a defvar, please close this
bug report.

Regards,
Gabriel

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47252; Package emacs. (Fri, 19 Mar 2021 08:39:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Gabriel <gabriel376 <at> hotmail.com>
Cc: 47252 <at> debbugs.gnu.org
Subject: Re: bug#47252: 28.0.50; [PATCH] Make
 minibuffer-depth-indicator-function a defcustom
Date: Fri, 19 Mar 2021 09:38:26 +0100
Gabriel <gabriel376 <at> hotmail.com> writes:

> This simple patch makes 'minibuffer-depth-indicator-function' a
> defcustom.

Thanks; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 19 Mar 2021 08:39:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 47252 <at> debbugs.gnu.org and Gabriel <gabriel376 <at> hotmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 19 Mar 2021 08:39:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47252; Package emacs. (Fri, 19 Mar 2021 09:01:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Gabriel <gabriel376 <at> hotmail.com>
Cc: 47252 <at> debbugs.gnu.org
Subject: Re: bug#47252: 28.0.50; [PATCH] Make
 minibuffer-depth-indicator-function a defcustom
Date: Fri, 19 Mar 2021 06:00:23 -0300
Gabriel <gabriel376 <at> hotmail.com> writes:

> This simple patch makes 'minibuffer-depth-indicator-function' a
> defcustom.

Since the default value is nil, I made a change after Lars pushed your
patch to include nil as a supported value; else, the Customize interface
reports a mismatch (and I think we do have tests to check for this?)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47252; Package emacs. (Fri, 19 Mar 2021 09:32:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: Gabriel <gabriel376 <at> hotmail.com>, 47252 <at> debbugs.gnu.org
Subject: Re: bug#47252: 28.0.50; [PATCH] Make
 minibuffer-depth-indicator-function a defcustom
Date: Fri, 19 Mar 2021 10:31:36 +0100
Mauro Aranda <maurooaranda <at> gmail.com> writes:

> Gabriel <gabriel376 <at> hotmail.com> writes:
>
>> This simple patch makes 'minibuffer-depth-indicator-function' a
>> defcustom.
>
> Since the default value is nil, I made a change after Lars pushed your
> patch to include nil as a supported value; else, the Customize interface
> reports a mismatch 

Thanks.  But shouldn't

+  :type '(choice (const :tag "Default" nil)
+                 (function))

be

+  :type '(choice (const :tag "Default" nil)
+                 function)

?

> (and I think we do have tests to check for this?)

Yes, what's the test for this again?  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47252; Package emacs. (Fri, 19 Mar 2021 10:05:01 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: gabriel376 <at> hotmail.com, 47252 <at> debbugs.gnu.org
Subject: Re: bug#47252: 28.0.50; [PATCH] Make
 minibuffer-depth-indicator-function a defcustom
Date: Fri, 19 Mar 2021 07:04:44 -0300
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>> Gabriel <gabriel376 <at> hotmail.com> writes:
>>
>>> This simple patch makes 'minibuffer-depth-indicator-function' a
>>> defcustom.
>>
>> Since the default value is nil, I made a change after Lars pushed your
>> patch to include nil as a supported value; else, the Customize interface
>> reports a mismatch 
>
> Thanks.  But shouldn't
>
> +  :type '(choice (const :tag "Default" nil)
> +                 (function))
>
> be
>
> +  :type '(choice (const :tag "Default" nil)
> +                 function)
>
> ?

It's just a matter of style, I think.  If you prefer the latter, please
fix it.  I'm just used to write the available choices in a list, because
usually they have a :tag or a different default value.

>> (and I think we do have tests to check for this?)
>
> Yes, what's the test for this again?  

They were moved in:

commit 2790c6a572a905359c60f055c682b28ef5c8ff0d
Author: Stefan Kangas <stefan <at> marxist.se>
Date:   Fri Feb 19 12:31:56 2021 +0100

    Run admin/cus-tests.el tests from test suite
    
    * test/Makefile.in (SUBDIRS): Run tests in new directory "misc",
    intended for tests not belonging to any one file.
    * test/misc/test-custom-deps.el:
    * test/misc/test-custom-libs.el:
    * test/misc/test-custom-noloads.el:
    * test/misc/test-custom-opts.el: New files.
    * test/lisp/custom-tests.el (custom--test-local-option): Move test to
    above new file test-custom-opts.el.
    
    * admin/cus-test.el: Document running tests from regular test suite.
    * test/file-organization.org (Test Files): Document new test directory
    "misc" for tests not belonging to any one file.

They are easy to "misc" ;-)

I wonder if it would be useful to tweak the checks in admin/cus-test.el
to be able to run the defcustom tests for each individual file.  Then,

make foo-tests

will run the tests in foo-tests.el and then check the defcustom in
library foo.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47252; Package emacs. (Fri, 19 Mar 2021 10:50:01 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Gabriel <gabriel376 <at> hotmail.com>, Mauro Aranda <maurooaranda <at> gmail.com>,
 47252 <at> debbugs.gnu.org
Subject: Re: bug#47252: 28.0.50; [PATCH] Make
 minibuffer-depth-indicator-function a defcustom
Date: Fri, 19 Mar 2021 11:49:32 +0100
>>>>> On Fri, 19 Mar 2021 10:31:36 +0100, Lars Ingebrigtsen <larsi <at> gnus.org> said:

    Lars> Mauro Aranda <maurooaranda <at> gmail.com> writes:
    >> Gabriel <gabriel376 <at> hotmail.com> writes:
    >> 
    >>> This simple patch makes 'minibuffer-depth-indicator-function' a
    >>> defcustom.
    >> 
    >> Since the default value is nil, I made a change after Lars pushed your
    >> patch to include nil as a supported value; else, the Customize interface
    >> reports a mismatch 

    Lars> Thanks.  But shouldn't

    Lars> +  :type '(choice (const :tag "Default" nil)
    Lars> +                 (function))

    Lars> be

    Lars> +  :type '(choice (const :tag "Default" nil)
    Lars> +                 function)

    Lars> ?

    >> (and I think we do have tests to check for this?)

    Lars> Yes, what's the test for this again?  

admin/cus-test.el

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47252; Package emacs. (Sat, 20 Mar 2021 08:03:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: gabriel376 <at> hotmail.com, 47252 <at> debbugs.gnu.org
Subject: Re: bug#47252: 28.0.50; [PATCH] Make
 minibuffer-depth-indicator-function a defcustom
Date: Sat, 20 Mar 2021 09:02:16 +0100
Mauro Aranda <maurooaranda <at> gmail.com> writes:

> They are easy to "misc" ;-)

Right; so you say "cd check; make test-custom-opts" etc to run them..

> I wonder if it would be useful to tweak the checks in admin/cus-test.el
> to be able to run the defcustom tests for each individual file.  Then,
>
> make foo-tests
>
> will run the tests in foo-tests.el and then check the defcustom in
> library foo.

Makes sense to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 17 Apr 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 124 days ago.

Previous Next


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