I'm trying to trigger insertion of text-snippets into the current
buffer/point from external scripts.
E.g I tried from bash to call
emacsclient -e '(insert "huhu")'
and
emacsclient -ne '(insert-file "~/tmp/tst.pl")'
but without success... what am I missing? Do I have to select the
current point?
(I already checked that client and server communication works)
Any help appreciated
Cheers
Rolf
You have to select buffer.
On 26 Nov., 18:42, Lennart Borgman <lennart.borg...@gmail.com> wrote:
> You have to select buffer.
well the question was more how to find the last selected buffer...
anyway after some fiddling I found a working approach: 8)
emacsclient -e '(progn (switch-to-buffer (car (buffer-list)))(insert
"huhu"))'
Cheers
Rolf
Is that guaranteed to give the current buffer on the selected frame?
Is that guaranteed to give the current buffer on the selected frame?
What does the doc string tell you?
What does the doc string tell you?
That he is interested in if the documentation in this case is good
enough. Actually he does not think so, but someone else might find it
better.
That he is interested in if the documentation in this case is good
enough. Actually he does not think so, but someone else might find it
better.
I wouldn't say so ;-)
It is unclear to me what "displayed in a window" mean.
If you don't mind shell typing commands into the mini-buffer, then
shell-command (typically bound to M-!) will do what you want.
To give an example, the text on the line below
Sun Nov 29 19:28:15 EST 2009
Came from
ESC 1 M-! date RETURN
(The prefix argument inserts command output at point, as opposed to
inserting the command output into a separate buffer.)
Steve