Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用すると、emacsの代わりにemacsclient --eval '(current-buffer)'返されます。コマンドを使用して挿入および変更できますが、実際の現在のバッファーへの挿入を行う方法を知る方法はありますか? 次のような文字列を渡してバッファ オブジェクトに変換する方法はありますか?*server*current-buffer*server*--eval#<buffer index.html>
emacsclient --eval '(current-buffer)'
*server*
current-buffer
--eval
#<buffer index.html>
試してみてください(window-buffer (selected-window))。例えば、
(window-buffer (selected-window))
emacsclient --eval '(with-current-buffer (window-buffer (selected-window)) (insert "foo"))'