Im new to xemacs and linux in general, so consider me a newbie. And i was wondering if there is a reason why elisp wouldn't execute a command or commands instantly.
I've the following code in my init.el:
(defun myClear ()
"Clears console output buffer (F5)"
(erase-buffer "*Shell Command Output*"))
(defun myMake ()
"Executes make (F6)"
(shell-command "make"))
(defun myClearMake ()
"Clears console output buffer before executing make (F7)"
(erase-buffer "*Shell Command Output*")
(shell-command "make"))
they are bound to the keys F5-F7. Hitting F7 does not produce the same result as hitting F5 first, then F6, which work as expected.
What happens instead is that the (erase-buffer ...) statement seems to be skipped, or maybe executed right before (shell-command ...). Since shell-command erases the buffer before dumping shell output anyway, its hard to tell.
What i expected: The console output gets cleared. This should be visible while make is still running and has not produced any output yet (which, in my case, is several seconds).
I have no idea how to further test this, and even though it seems like a common task, i couldn't find anything appropriate, or similar. Also consider that i'm not only interested in getting the mentioned behaviour, but also understanding what i did wrong.
Any links/pointer on elisp mechanics that explain this behaviour are appreciated. Thanks, Tasche
M-x compile RET
instead ofshell-command
. This will create a compilation buffer where you can click on errors/warnings to be taken directly to the corresponding point in file. – Parodist