* external script inserting text at point
@ 2009-11-26 16:10 LanX
2009-11-26 17:42 ` Lennart Borgman
[not found] ` <mailman.11571.1259257397.2239.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 11+ messages in thread
From: LanX @ 2009-11-26 16:10 UTC (permalink / raw)
To: help-gnu-emacs
hi
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: external script inserting text at point
2009-11-26 16:10 external script inserting text at point LanX
@ 2009-11-26 17:42 ` Lennart Borgman
[not found] ` <mailman.11571.1259257397.2239.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 11+ messages in thread
From: Lennart Borgman @ 2009-11-26 17:42 UTC (permalink / raw)
To: LanX; +Cc: help-gnu-emacs
On Thu, Nov 26, 2009 at 5:10 PM, LanX <lanx.perl@googlemail.com> wrote:
> hi
>
> 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?
You have to select buffer.
> (I already checked that client and server communication works)
>
> Any help appreciated
>
> Cheers
> Rolf
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <mailman.11571.1259257397.2239.help-gnu-emacs@gnu.org>]
* Re: external script inserting text at point
[not found] ` <mailman.11571.1259257397.2239.help-gnu-emacs@gnu.org>
@ 2009-11-26 19:49 ` LanX
2009-11-26 20:45 ` Lennart Borgman
0 siblings, 1 reply; 11+ messages in thread
From: LanX @ 2009-11-26 19:49 UTC (permalink / raw)
To: help-gnu-emacs
Hi
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: external script inserting text at point
2009-11-26 19:49 ` LanX
@ 2009-11-26 20:45 ` Lennart Borgman
2009-11-29 18:34 ` LanX
0 siblings, 1 reply; 11+ messages in thread
From: Lennart Borgman @ 2009-11-26 20:45 UTC (permalink / raw)
To: LanX; +Cc: help-gnu-emacs
On Thu, Nov 26, 2009 at 8:49 PM, LanX <lanx.perl@googlemail.com> wrote:
> Hi
>
> 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"))'
Is that guaranteed to give the current buffer on the selected frame?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: external script inserting text at point
2009-11-26 20:45 ` Lennart Borgman
@ 2009-11-29 18:34 ` LanX
2009-11-29 18:36 ` Lennart Borgman
0 siblings, 1 reply; 11+ messages in thread
From: LanX @ 2009-11-29 18:34 UTC (permalink / raw)
To: Lennart Borgman; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 137 bytes --]
>
> Is that guaranteed to give the current buffer on the selected frame?
>
you're asking me? :)
I don't know, till now it worked fine!
[-- Attachment #2: Type: text/html, Size: 338 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: external script inserting text at point
2009-11-29 18:34 ` LanX
@ 2009-11-29 18:36 ` Lennart Borgman
2009-11-29 18:42 ` LanX
0 siblings, 1 reply; 11+ messages in thread
From: Lennart Borgman @ 2009-11-29 18:36 UTC (permalink / raw)
To: LanX; +Cc: help-gnu-emacs
On Sun, Nov 29, 2009 at 7:34 PM, LanX <lanx.perl@googlemail.com> wrote:
>> Is that guaranteed to give the current buffer on the selected frame?
>
> you're asking me? :)
>
> I don't know, till now it worked fine!
What does the doc string tell you?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: external script inserting text at point
2009-11-29 18:36 ` Lennart Borgman
@ 2009-11-29 18:42 ` LanX
2009-11-29 21:54 ` Lennart Borgman
0 siblings, 1 reply; 11+ messages in thread
From: LanX @ 2009-11-29 18:42 UTC (permalink / raw)
To: Lennart Borgman; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 79 bytes --]
>
>
> What does the doc string tell you?
>
What does Lennart want to tell me?
[-- Attachment #2: Type: text/html, Size: 293 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: external script inserting text at point
2009-11-29 18:42 ` LanX
@ 2009-11-29 21:54 ` Lennart Borgman
2009-11-29 23:52 ` LanX
0 siblings, 1 reply; 11+ messages in thread
From: Lennart Borgman @ 2009-11-29 21:54 UTC (permalink / raw)
To: LanX; +Cc: help-gnu-emacs
On Sun, Nov 29, 2009 at 7:42 PM, LanX <lanx.perl@googlemail.com> wrote:
>>
>> What does the doc string tell you?
>
> What does Lennart want to tell me?
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: external script inserting text at point
2009-11-29 21:54 ` Lennart Borgman
@ 2009-11-29 23:52 ` LanX
2009-11-30 0:10 ` Lennart Borgman
2009-11-30 0:33 ` Steve Revilak
0 siblings, 2 replies; 11+ messages in thread
From: LanX @ 2009-11-29 23:52 UTC (permalink / raw)
To: Lennart Borgman; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 705 bytes --]
>
>
> 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.
>
Lennart, answering with trivial questions sounds much like the therapist
finally got access into gnus! ;-)
No, the documentation I saw so far is not good enough.
But I didn't read *all* the docs thats why I'm asking here for help and
insight...
oh ...
...well googling for buffer-list brought deeper insight, it's in the
elisp-info:
"The order of the buffers in this list is based primarily on how recently
each buffer has been displayed in a window. "
http://www.gnu.org/software/emacs/elisp/html_node/The-Buffer-List.html
Sufficient? :)
[-- Attachment #2: Type: text/html, Size: 1067 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: external script inserting text at point
2009-11-29 23:52 ` LanX
@ 2009-11-30 0:10 ` Lennart Borgman
2009-11-30 0:33 ` Steve Revilak
1 sibling, 0 replies; 11+ messages in thread
From: Lennart Borgman @ 2009-11-30 0:10 UTC (permalink / raw)
To: LanX; +Cc: help-gnu-emacs
On Mon, Nov 30, 2009 at 12:52 AM, LanX <lanx.perl@googlemail.com> wrote:
>>
>> 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.
>
> Lennart, answering with trivial questions sounds much like the therapist
> finally got access into gnus! ;-)
>
>
> No, the documentation I saw so far is not good enough.
>
> But I didn't read *all* the docs thats why I'm asking here for help and
> insight...
>
> oh ...
>
> ...well googling for buffer-list brought deeper insight, it's in the
> elisp-info:
>
> "The order of the buffers in this list is based primarily on how recently
> each buffer has been displayed in a window. "
>
> http://www.gnu.org/software/emacs/elisp/html_node/The-Buffer-List.html
>
> Sufficient? :)
I wouldn't say so ;-)
It is unclear to me what "displayed in a window" mean.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: external script inserting text at point
2009-11-29 23:52 ` LanX
2009-11-30 0:10 ` Lennart Borgman
@ 2009-11-30 0:33 ` Steve Revilak
1 sibling, 0 replies; 11+ messages in thread
From: Steve Revilak @ 2009-11-30 0:33 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 507 bytes --]
LanX> I'm trying to trigger insertion of text-snippets into the current
LanX> buffer/point from external scripts.
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
[-- Attachment #2: Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-11-30 0:33 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-26 16:10 external script inserting text at point LanX
2009-11-26 17:42 ` Lennart Borgman
[not found] ` <mailman.11571.1259257397.2239.help-gnu-emacs@gnu.org>
2009-11-26 19:49 ` LanX
2009-11-26 20:45 ` Lennart Borgman
2009-11-29 18:34 ` LanX
2009-11-29 18:36 ` Lennart Borgman
2009-11-29 18:42 ` LanX
2009-11-29 21:54 ` Lennart Borgman
2009-11-29 23:52 ` LanX
2009-11-30 0:10 ` Lennart Borgman
2009-11-30 0:33 ` Steve Revilak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).