From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rustom Mody Newsgroups: gmane.emacs.help Subject: Re: How to preprocess emacsclient with a mode choice? Date: Sun, 1 Dec 2013 20:59:03 -0800 (PST) Message-ID: References: <8f3ccb5f-72ca-4ea8-bb4a-103e74e7b4c0@googlegroups.com> <3471cd49-4b5e-4842-a99e-9b35ec277ceb@googlegroups.com> <02822e31-032b-4fcb-87d4-f21716cd9ef5@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1385960410 19338 80.91.229.3 (2 Dec 2013 05:00:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Dec 2013 05:00:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 02 06:00:16 2013 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 1VnLcG-0003af-1x for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Dec 2013 06:00:16 +0100 Original-Received: from localhost ([::1]:33774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnLcF-0002O4-O4 for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Dec 2013 00:00:15 -0500 X-Received: by 10.66.160.168 with SMTP id xl8mr20554904pab.14.1385960343969; Sun, 01 Dec 2013 20:59:03 -0800 (PST) X-Received: by 10.50.8.42 with SMTP id o10mr262607iga.3.1385960343824; Sun, 01 Dec 2013 20:59:03 -0800 (PST) Original-Path: usenet.stanford.edu!i10no5885004pba.1!news-out.google.com!p7ni3494qat.0!nntp.google.com!bm17no6352786qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.95.8.156; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 59.95.8.156 User-Agent: G2/1.0 Injection-Date: Mon, 02 Dec 2013 04:59:03 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:202506 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:94775 Archived-At: On Saturday, November 30, 2013 1:40:36 PM UTC+5:30, Eli Zaretskii wrote: > > Date: Fri, 29 Nov 2013 16:47:45 -0800 (PST) > > From: Rustom Mody=20 > > Injection-Date: Sat, 30 Nov 2013 00:47:46 +0000 > >=20 > > On Saturday, November 30, 2013 1:16:27 AM UTC+5:30, Eli Zaretskii wrote= : > > > > Date: Fri, 29 Nov 2013 09:49:09 -0800 (PST) > > > > From: Rustom Mody=20 > > > >=20 > > > > How to programmatically (ie in elisp) visit a file with a specific = mode? > > > > say a .c file in text mode > > > > > > What's wrong with turning on the mode as part of the arguments you > > > pass to emacsclient? > >=20 > > You mean like this? > > emacsclient -e "(progn (find-file \"foo\") (auto-fill-mode) (raise-fram= e))" > > Yes. > > > Heh! thats better than anything I came up with -- thanks! > > You are welcome. > > > Still wonder what makes the raise-frame necessary... > > Also something fundamentally is different in the client-server relation= between this and: > > emacsclient foo > >=20 > > In the latter I have to do C-x #. In the former not > > All of these because when you visit a file via --eval, Emacs doesn't > "know" you visited it via the client, so it doesn't do the special > magic for that. > > However, since this is a very special case, I don't think a better > solution is needed. Just seeing (from another thread -- thanks Emmanuel) that emacs takes a funcall argument. Checked=85 evidently emacs takes funcall as argument whereas emacsclient does not. Maybe it should also?