unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Rustom Mody <rustompmody@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to preprocess emacsclient with a mode choice?
Date: Sun, 1 Dec 2013 20:59:03 -0800 (PST)	[thread overview]
Message-ID: <f6805b84-3aae-4f4f-9083-1ce6b9588a65@googlegroups.com> (raw)
In-Reply-To: <mailman.7608.1385799063.10748.help-gnu-emacs@gnu.org>

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?


      parent reply	other threads:[~2013-12-02  4:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-28 14:48 How to preprocess emacsclient with a mode choice? Rustom Mody
2013-11-29 16:21 ` Kevin Rodgers
     [not found] ` <mailman.7480.1385742029.10748.help-gnu-emacs@gnu.org>
2013-11-29 17:49   ` Rustom Mody
2013-11-29 19:46     ` Eli Zaretskii
     [not found]     ` <mailman.7495.1385754413.10748.help-gnu-emacs@gnu.org>
2013-11-30  0:47       ` Rustom Mody
2013-11-30  8:10         ` Eli Zaretskii
     [not found]         ` <mailman.7608.1385799063.10748.help-gnu-emacs@gnu.org>
2013-12-02  4:59           ` Rustom Mody [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f6805b84-3aae-4f4f-9083-1ce6b9588a65@googlegroups.com \
    --to=rustompmody@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).