emacsclient -s emacs -e "(call-interactively 'find-file)"
But this one doesn't:
emacsclient -s emacs -e "(call-interactively 'newline)"
In fact, none of the functions I tried to run via Terminal with emacsclient didn't work except
find-file. Built-in functions tend to turn
nil while functions I wrote tend to turn errors like
*ERROR*: End of buffer, although I can run the same function directly in emacs without any problem.
The function that turned the above error message is this:
(defun test (&optional args) (interactive ) (forward-char 2) )
How can I get this to work?
OS X 10.8 Emacs 24.5 (9.0) desktop version