unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55140: 27.1; Feature request: allow customize holidays list
@ 2022-04-27  2:22 José Júnior
  2022-04-27 12:58 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: José Júnior @ 2022-04-27  2:22 UTC (permalink / raw)
  To: 55140

[-- Attachment #1: Type: text/plain, Size: 496 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 701 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#55140: 27.1; Feature request: allow customize holidays list
  2022-04-27  2:22 bug#55140: 27.1; Feature request: allow customize holidays list José Júnior
@ 2022-04-27 12:58 ` Lars Ingebrigtsen
  2022-04-27 16:30   ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-27 12:58 UTC (permalink / raw)
  To: José Júnior; +Cc: 55140

José Júnior <jjnilton@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#55140: 27.1; Feature request: allow customize holidays list
  2022-04-27 12:58 ` Lars Ingebrigtsen
@ 2022-04-27 16:30   ` Glenn Morris
  2022-04-27 16:50     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2022-04-27 16:30 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 55140, José Júnior


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.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#55140: 27.1; Feature request: allow customize holidays list
  2022-04-27 16:30   ` Glenn Morris
@ 2022-04-27 16:50     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-27 16:50 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 55140, José Júnior

Glenn Morris <rgm@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-27 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-27  2:22 bug#55140: 27.1; Feature request: allow customize holidays list José Júnior
2022-04-27 12:58 ` Lars Ingebrigtsen
2022-04-27 16:30   ` Glenn Morris
2022-04-27 16:50     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).