From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.help Subject: Re: How to open a file in sh-mode Date: Thu, 14 Aug 2008 13:17:40 +0200 Organization: disorganized Message-ID: <87ljyzetgr.fsf@localhorst.mine.nu> References: <38b2ab8a0808140053g6261aeafmd74692199cea07eb@mail.gmail.com> <200808141016.12117.henrikau@stud.ntnu.no> <38b2ab8a0808140203s53c339f3k70d5887d42a4de2f@mail.gmail.com> <200808141203.22315.henrikau@stud.ntnu.no> <38b2ab8a0808140306s2a94180es1347bb378331be1d@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1218713033 8748 80.91.229.12 (14 Aug 2008 11:23:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2008 11:23:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 14 13:24:45 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KTawd-0000RH-Ku for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Aug 2008 13:24:43 +0200 Original-Received: from localhost ([127.0.0.1]:49550 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTavg-0002gV-Qb for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Aug 2008 07:23:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTavJ-0002eY-Te for help-gnu-emacs@gnu.org; Thu, 14 Aug 2008 07:23:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTavJ-0002e4-A8 for help-gnu-emacs@gnu.org; Thu, 14 Aug 2008 07:23:21 -0400 Original-Received: from [199.232.76.173] (port=53930 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTavI-0002dz-Ft for help-gnu-emacs@gnu.org; Thu, 14 Aug 2008 07:23:20 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:39524 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KTavH-0003AR-FZ for help-gnu-emacs@gnu.org; Thu, 14 Aug 2008 07:23:20 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KTavC-0004jg-JV for help-gnu-emacs@gnu.org; Thu, 14 Aug 2008 11:23:14 +0000 Original-Received: from e178016059.adsl.alicedsl.de ([85.178.16.59]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Aug 2008 11:23:14 +0000 Original-Received: from david.hansen by e178016059.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Aug 2008 11:23:14 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 19 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178016059.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:IJzTCmCNGR1MaX+Q2nxxlblfvl4= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56605 Archived-At: 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 solution). David