GNU bug report logs - #55140
27.1; Feature request: allow customize holidays list

Previous Next

Package: emacs;

Reported by: José Júnior <jjnilton <at> gmail.com>

Date: Wed, 27 Apr 2022 02:23:02 UTC

Severity: wishlist

Found in version 27.1

Fixed in version 29.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 55140 in the body.
You can then email your comments to 55140 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#55140; Package emacs. (Wed, 27 Apr 2022 02:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to José Júnior <jjnilton <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 27 Apr 2022 02:23:02 GMT) Full text and rfc822 format available.

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

From: José Júnior <jjnilton <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; Feature request: allow customize holidays list
Date: Tue, 26 Apr 2022 23:22:02 -0300
[Message part 1 (text/plain, inline)]
Hi, the feature request is an option in customize to allow adding/hiding
holiday-lists.

Currently, the lists are hard coded here:
https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/calendar/holidays.el#n437
and seems that the only way to customize would be overriding/wrapping the
function.

This change would make it easier to create custom user-defined independent
holiday lists, like seeing holidays of multiple regions, or religions, or
anything, not only the ones that comes with emacs.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55140; Package emacs. (Wed, 27 Apr 2022 12:59:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: José Júnior <jjnilton <at> gmail.com>
Cc: 55140 <at> debbugs.gnu.org
Subject: Re: bug#55140: 27.1; Feature request: allow customize holidays list
Date: Wed, 27 Apr 2022 14:58:35 +0200
José Júnior <jjnilton <at> gmail.com> writes:

> Hi, the feature request is an option in customize to allow adding/hiding holiday-lists.
>
> Currently, the lists are hard coded here:
> https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/calendar/holidays.el#n437 and
> seems that the only way to customize would be overriding/wrapping the function.
>
> This change would make it easier to create custom user-defined independent
> holiday lists, like seeing holidays of multiple regions, or religions, or anything, not
> only the ones that comes with emacs.

I've now separated that out into its own function, `holiday-lists', in
Emacs 29, so that you can add/alter the results with `add-function' or
advice.

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




bug marked as fixed in version 29.1, send any further explanations to 55140 <at> debbugs.gnu.org and José Júnior <jjnilton <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 27 Apr 2022 12:59:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55140; Package emacs. (Wed, 27 Apr 2022 16:31:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 55140 <at> debbugs.gnu.org,
 José Júnior <jjnilton <at> gmail.com>
Subject: Re: bug#55140: 27.1; Feature request: allow customize holidays list
Date: Wed, 27 Apr 2022 12:30:39 -0400
I don't understand this request, nor the solution.

list-holidays allows the list of holidays to be passed as third argument.
This argument defaults to the variable calendar-holidays,
which is a defcustom. So that seems like two ways you can control
the list of holidays?

The solution splits the completion list used by the interactive
prompting into a separate function. Is the misspelling "holydays"
intentional?

"you can alter the results by redefining that function, or use
`add-function' to all values.". The last part of that doesn't make sense.
And you can redefine any function in Emacs, so does this really need stating?

But how is this any better than defining your own interactive wrapper
function that just calls list-holidays non-interactively with the
desired list?

Was this report actually about the interactive behaviour?
It started with "the feature request is an option in customize to allow
adding/hiding holiday-lists". I thought that already existed.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55140; Package emacs. (Wed, 27 Apr 2022 16:52:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 55140 <at> debbugs.gnu.org,
 José Júnior <jjnilton <at> gmail.com>
Subject: Re: bug#55140: 27.1; Feature request: allow customize holidays list
Date: Wed, 27 Apr 2022 18:50:56 +0200
Glenn Morris <rgm <at> gnu.org> writes:

> I don't understand this request, nor the solution.
>
> list-holidays allows the list of holidays to be passed as third argument.

That doesn't really help with the interactive spec, which is what's been
changed.

> This argument defaults to the variable calendar-holidays,
> which is a defcustom. So that seems like two ways you can control
> the list of holidays?

calendar-holidays controls the "All" value.

> The solution splits the completion list used by the interactive
> prompting into a separate function. Is the misspelling "holydays"
> intentional?

Nope; fixed.

>
> "you can alter the results by redefining that function, or use
> `add-function' to all values.". The last part of that doesn't make sense.

Typo.

> And you can redefine any function in Emacs, so does this really need stating?

I think it makes sense to state that this is the intended customisation
point for users.

> But how is this any better than defining your own interactive wrapper
> function that just calls list-holidays non-interactively with the
> desired list?

That's a possibility, of course, but somewhat convoluted.

-- 
(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. (Thu, 26 May 2022 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 82 days ago.

Previous Next


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