[Top][All Lists]

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

Re: How to open a file in sh-mode

From: David Hansen
Subject: Re: How to open a file in sh-mode
Date: Thu, 14 Aug 2008 13:17:40 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

On Thu, 14 Aug 2008 12:06:59 +0200 Francis Moreau wrote:

> """
> How do I start emacs in sh-mode from the shell with a file name
> appended at the end of the command
> """

emacs --eval '(progn (find-file "tmp/tst.c") (sh-mode))'

You'll have to write some wrapper script for your use in an env var.

> It doesn't seem to be all that complex!

It will become complex when the file name contains special characters
(mixing sh and emacs quoting is very nasty and I don't know about any


reply via email to

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