* emacs 23 and emacsclient question.
@ 2009-03-06 12:08 Michal
2009-03-06 12:58 ` Juanma Barranquero
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michal @ 2009-03-06 12:08 UTC (permalink / raw)
To: help-gnu-emacs
Hallo Group Readers.
In emacs 23, when I invoke:
prompt$ /usr/local/bin/emacsclient --eval "(current-buffer)" "(point)"
I get the following:
#<buffer *server*>
1
.. instead of getting name of buffer and point emacs is in, at
emacsclient invocation.
Have You got idea how to get current buffer and point?
Best regards,
Michal
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs 23 and emacsclient question.
2009-03-06 12:08 emacs 23 and emacsclient question Michal
@ 2009-03-06 12:58 ` Juanma Barranquero
2009-03-06 13:08 ` Nikolaj Schumacher
[not found] ` <mailman.2512.1236344322.31690.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: Juanma Barranquero @ 2009-03-06 12:58 UTC (permalink / raw)
To: Michal; +Cc: help-gnu-emacs
On Fri, Mar 6, 2009 at 13:08, Michal <rabbit50@tenbit.pl> wrote:
> Have You got idea how to get current buffer and point?
You can try:
emacsclient --eval "(with-current-buffer (window-buffer
(selected-window)) (cons (current-buffer) (point)))"
or perhaps
emacsclient --eval "(with-current-buffer (window-buffer
(selected-window)) (point-marker))"
or some other variant whose output is more suited to your needs.
Juanma
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs 23 and emacsclient question.
2009-03-06 12:08 emacs 23 and emacsclient question Michal
2009-03-06 12:58 ` Juanma Barranquero
@ 2009-03-06 13:08 ` Nikolaj Schumacher
[not found] ` <mailman.2512.1236344322.31690.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: Nikolaj Schumacher @ 2009-03-06 13:08 UTC (permalink / raw)
To: Michal; +Cc: help-gnu-emacs
Michal <rabbit50@tenbit.pl> wrote:
> prompt$ /usr/local/bin/emacsclient --eval "(current-buffer)" "(point)"
>
> Have You got idea how to get current buffer and point?
You can use
"(car (buffer-list))"
"(with-current-buffer (car (buffer-list)) (point))"
Since Emacs 23 can have multiple terminals, this might not be
well-defined in all cases.
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs 23 and emacsclient question.
[not found] ` <mailman.2512.1236344322.31690.help-gnu-emacs@gnu.org>
@ 2009-03-06 14:53 ` Michal
0 siblings, 0 replies; 4+ messages in thread
From: Michal @ 2009-03-06 14:53 UTC (permalink / raw)
To: help-gnu-emacs
Juanma Barranquero <lekktu@gmail.com> writes:
> On Fri, Mar 6, 2009 at 13:08, Michal <rabbit50@tenbit.pl> wrote:
>
>> Have You got idea how to get current buffer and point?
>
> You can try:
>
> emacsclient --eval "(with-current-buffer (window-buffer
> (selected-window)) (cons (current-buffer) (point)))"
>
> or perhaps
>
> emacsclient --eval "(with-current-buffer (window-buffer
> (selected-window)) (point-marker))"
>
> or some other variant whose output is more suited to your needs.
>
> Juanma
Juanma, Nikolaj
thank You for solution!
Best regards,
Michal
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-06 14:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-06 12:08 emacs 23 and emacsclient question Michal
2009-03-06 12:58 ` Juanma Barranquero
2009-03-06 13:08 ` Nikolaj Schumacher
[not found] ` <mailman.2512.1236344322.31690.help-gnu-emacs@gnu.org>
2009-03-06 14:53 ` Michal
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).