[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to preprocess emacsclient with a mode choice?
From: |
Rustom Mody |
Subject: |
Re: How to preprocess emacsclient with a mode choice? |
Date: |
Sun, 1 Dec 2013 20:59:03 -0800 (PST) |
User-agent: |
G2/1.0 |
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
> > Injection-Date: Sat, 30 Nov 2013 00:47:46 +0000
> >
> > 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
> > > >
> > > > 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?
> >
> > You mean like this?
> > emacsclient -e "(progn (find-file \"foo\") (auto-fill-mode) (raise-frame))"
>
> 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
> >
> > 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… evidently emacs takes funcall as argument
whereas emacsclient does not. Maybe it should also?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: How to preprocess emacsclient with a mode choice?,
Rustom Mody <=