The function sunrise-sunset
is an interactive function takes a numeric prefix argument as a parameter. It does not take the latitude and longitude as parameters, which is what you're trying to pass into it. I suggest reading this emacs wiki article as well as of course the manual itself to learn more about prefix arguments. Also checking out the interactive codes might be helpful as well.
For getting the sunrise and sunset for a specific latitude and longitude I would suggest checking out the section in the manual on doing this. A quick read shows you need to specify the lat and long like this (as one example):
(setq calendar-latitude 40.1)
(setq calendar-longitude -88.2)
(setq calendar-location-name "Urbana, IL")
It seems like this sunrise-sunset
is only meant to be called interactively. To get this information programatically as opposed to a displayed message I'd recommend looking at solar-sunrise-sunset
which seems to return a list of times according to it's documentation:
"List of local times of sunrise, sunset, and daylight on Gregorian
DATE. Corresponding value is nil if there is no sunrise/sunset."
The function is defined in /usr/share/emacs/26.2/lisp/calendar/solar.el.gz.