In Lisp, a function call is denoted like this: (func arg1 arg2 ...). IOW, the first element of the list is the function and subsequent elements are the (evaluated) arguments. Contrast this with most other languages where a function call is denoted like this: func(arg1, arg2, ...).
So you define the function like this:
(defun testing ()
(shell-command-to-string "ls")
)
Doing C-x C-e after the closing paren evaluates the defun and adds the definition of the function to the system. Then to call the function you say:
(testing)
This calls the function testing with no arguments.
You should probably read the "Introduction to Programming in Elisp" which can be found here.
testing?testing()and runningC-x C-eon the function itself then the calling of the function.(testing)- if you doC-x C-eafter that, does it work?