[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why emacsclient -e "(current-word nil t)" does not print ?
From: |
Miles Bader |
Subject: |
Re: Why emacsclient -e "(current-word nil t)" does not print ? |
Date: |
Tue, 21 Jul 2009 21:12:04 +0900 |
pjb@informatimago.com (Pascal J. Bourguignon) writes:
>> When executing a command with emacsclient, you're obviously in the
>> *server* buffer. It's empty, so current-word doesn't output anything.
>
> Perhaps that depends on the version of emacs, because with 22.2.1 I
> get the current word:
>
> $ emacsclient -e '(current-word)'
> "Halley"
It's easy to see, of course:
$ emacsclient -e '(buffer-name)'
" *server*"
One can use `with-current-buffer' to specify what buffer to use, of course:
$ emacsclient -e '(with-current-buffer "*scratch*" (current-word))'
"oink"
("oink" happens to be what my cursor was on in the *scratch* buffer)
-Miles
--
Bore, n. A person who talks when you wish him to listen.
Message not available
Message not availableRe: Why emacsclient -e "(current-word nil t)" does not print ?, Anselm Helbig, 2009/07/22
Re: Why emacsclient -e "(current-word nil t)" does not print ?, Wang Lei, 2009/07/22