help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to preprocess emacsclient with a mode choice?


From: Kevin Rodgers
Subject: Re: How to preprocess emacsclient with a mode choice?
Date: Fri, 29 Nov 2013 09:21:42 -0700
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20

On 11/28/13 7:48 AM, Rustom Mody wrote:
If I want to jump-into a running emacs with visiting file foo I can do:
$ emacsclient foo

However this does not give me foo with the mode I want.

That behavior is no different than if you did:
$ emacs foo

is it?

Lets say I want to visit foo with auto-fill-mode. So I try

$ emacsclient -e "(let ((find-file-hook (cons 'auto-fill-mode find-file-hook)))
(find-file \"foo\"))"

This kindof works but does not pop up the emacs window.

How to get pop-up behavior of first with the mode-choice of second?

Just do the same thing you would do in a new emacs instance:
M-x auto-file-mode

Better yet, put something in the file to turn on auto-fill-mode,
either directly or via a major mode hook.

--
Kevin Rodgers
Denver, Colorado, USA




reply via email to

[Prev in Thread] Current Thread [Next in Thread]