help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wrong number of arguments when launched interactively...


From: Stephen Berman
Subject: Re: wrong number of arguments when launched interactively...
Date: Sun, 25 Nov 2018 15:06:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On Sun, 25 Nov 2018 22:35:33 +0900 Jean-Christophe Helary 
<brandelune@gmail.com> wrote:

> (beginner warning)
>
> I'm trying to automate the creation of html templates to avoid link mistakes 
> and I wrote this code today:
>
> (defun dailyIndex (myDate)
[...]
> (write-region (dailyIndex) nil "~/Desktop/index.html"))
>
> When run interactively, I always get a "wrong number of arguments"
> error. When I evaluate the internal expressions one by one, I never
> get this. I have no idea what is going on...

You've defined a function, dailyIndex, that takes one obligatory
argument, myDate, but the last line of the function definition calls the
function without argument, that's the error.  Did you mean to make that
line part of the function definition (and hence make it recursive)?

Steve Berman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]