From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: Calling emacsclient Date: Wed, 14 Nov 2012 21:08:07 +0100 Message-ID: <87vcd8uevs.fsf@googlemail.com> References: <87ip9b9zvj.fsf@gmail.com> <87d2zgnm95.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1352923701 5101 80.91.229.3 (14 Nov 2012 20:08:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Nov 2012 20:08:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 14 21:08:31 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TYjG9-0002UK-Gr for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Nov 2012 21:08:29 +0100 Original-Received: from localhost ([::1]:58582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYjFz-0006ZP-Nt for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Nov 2012 15:08:19 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYjFr-0006Ua-3p for help-gnu-emacs@gnu.org; Wed, 14 Nov 2012 15:08:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYjFo-0007do-0e for help-gnu-emacs@gnu.org; Wed, 14 Nov 2012 15:08:11 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:38381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYjFn-0007dk-Q8 for help-gnu-emacs@gnu.org; Wed, 14 Nov 2012 15:08:07 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TYjFu-0002MG-En for help-gnu-emacs@gnu.org; Wed, 14 Nov 2012 21:08:14 +0100 Original-Received: from e178054191.adsl.alicedsl.de ([85.178.54.191]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Nov 2012 21:08:14 +0100 Original-Received: from tjolitz by e178054191.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Nov 2012 21:08:14 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 47 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178054191.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:FSglBvzH7Kq5TgUq/7jAVxZb6BY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87693 Archived-At: William Gardella writes: > Thorsten Jolitz writes: >> After some experimenting it seems to me that there is another bug, at >> least in my case >> >> ,--------------------------- >> | (call 'emacsclient >> | "-e" >> | "(message \"CALL 1\")") >> `--------------------------- >> >> does not work, while >> >> ,--------------------------- >> | (call 'emacsclient >> | "--eval" >> | "(message \"CALL 1\")") >> `--------------------------- >> >> does (on Archlinux). > > This one I cannot reproduce. What is your emacs version? GNU Emacs 24.0.93.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2012-02-07 on arch But, stangely enough, now it works here too. Sorry for the noise. >> Now I wonder how I can call Emacsclient with a file I want to edit, but >> make it (immediately) evaluate some code when it starts up? Is that >> possible in the call(s) itself, or do I have to use hooks or something >> like that? > > Depending on what this code is, you may be able to do it with a > file-local variable or a hook. Or you could have emacsclient call > something like > > (progn > (set-buffer (find-file "~/somecode.c")) > (some-nifty-code-here)) Thanks for the tip. -- cheers, Thorsten