3

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 ...


3

You can use func-arity added in 26.1. C-h f func-arity: func-arity is a built-in function in `C source code'. (func-arity FUNCTION) Return minimum and maximum number of args allowed for FUNCTION. FUNCTION must be a function of some kind. The returned value is a cons cell (MIN . MAX). MIN is the minimum number of args. MAX is the maximum ...


2

Not exactly. Function buffer-substring requires two arguments. Function - will accept a single argument, but in that case it just returns the negative of that numeric argument. What you want to do is, in effect, apply such functions to a list of arguments. You can use higher-order function apply to do that. What you can do, if you want, is have a macro or ...


2

It looks like you can call it like this: (let ((calendar-latitude 40.1) (calendar-longitude -88.2) (calendar-location-name "Urbana, IL")) (sunrise-sunset)) This does not prompt you for the latitude and longitude, and puts a message in the minibuffer for those variable values.


2

There is the general rule that any widely used programming language such as R has an Emacs language mode and those modes also have functions that parse function arguments. For R there is the huge package Emacs Speaks Statistics. There is a parser ess-r-syntax. The comment marks it as "not yet stable". But, there are 4 people working on it including senior ...


1

Under the theory that some answer is better than none, I've posted my hacky solution to this, however I would welcome a better answer than this one. (defun find-next-fcn-arg-separator () "Find the next argument separator in a function call. Move point to the next function argument separator. Point is expected to be at the opening parenthesis of the ...


Only top voted, non community-wiki answers of a minimum length are eligible