From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Henrik Austad Newsgroups: gmane.emacs.help Subject: Re: How to open a file in sh-mode Date: Thu, 14 Aug 2008 13:36:54 +0200 Message-ID: <200808141336.54864.henrikau@orakel.ntnu.no> References: <38b2ab8a0808140053g6261aeafmd74692199cea07eb@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: multipart/signed; boundary="nextPart9836319.qjZ78FZ7TS"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1218713889 11407 80.91.229.12 (14 Aug 2008 11:38:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2008 11:38:09 +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:39:02 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 1KTbAS-0005Wg-Vv for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Aug 2008 13:39:01 +0200 Original-Received: from localhost ([127.0.0.1]:49913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTb9W-0000SS-FG for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Aug 2008 07:38:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTb8U-0008Fn-U6 for help-gnu-emacs@gnu.org; Thu, 14 Aug 2008 07:36:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTb8T-0008Ej-63 for help-gnu-emacs@gnu.org; Thu, 14 Aug 2008 07:36:58 -0400 Original-Received: from [199.232.76.173] (port=46400 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTb8T-0008EZ-0N for help-gnu-emacs@gnu.org; Thu, 14 Aug 2008 07:36:57 -0400 Original-Received: from mail45.e.nsc.no ([193.213.115.45]:65158) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KTb8R-0008Sj-Od for help-gnu-emacs@gnu.org; Thu, 14 Aug 2008 07:36:56 -0400 Original-Received: from 062016235195.customer.alfanett.no (062016235195.customer.alfanett.no [62.16.235.195]) by mail45.nsc.no (8.13.8/8.13.5) with ESMTP id m7EBaoE8013252; Thu, 14 Aug 2008 13:36:51 +0200 (MEST) User-Agent: KMail/1.9.9 In-Reply-To: <38b2ab8a0808140306s2a94180es1347bb378331be1d@mail.gmail.com> X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) 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:56607 Archived-At: --nextPart9836319.qjZ78FZ7TS Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 14 August 2008 12:06:59 Francis Moreau wrote: > On Thu, Aug 14, 2008 at 12:03 PM, Henrik Austad =20 wrote: > > so basically, I think the question boils down to: > > > > """ > > How do I create a hook in my .emacs so that all files starting with > > bash-fc-* will load sh-mode? > > """ > > Well that would be the last thing I would do. > > My question is: > > """ > How do I start emacs in sh-mode from the shell with a file name > appended at the end of the command > """ > > It doesn't seem to be all that complex ! ok, I think I got something that works, thanks to all the guys at #emacs fo= r=20 this (ams, pgas, bpalmer) In .emacs add the following: (add-to-list 'auto-mode-alist '("bash-fc" . sh-mode)) then; export FCEDIT=3D"emacs" then sh-mode will be loaded when you open files starting with bash-fc as a test; echo "Hello World" && fc=20 =2D-=20 mvh Henrik Austad --nextPart9836319.qjZ78FZ7TS Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBIpBjW6k5VT6v45lkRAo2AAJ9U4UA1DrDEBaQRV0gRyKpr0mATmACeJDZ2 M6gi9FBFWl/NM/Oh8PInB9c= =ax5Z -----END PGP SIGNATURE----- --nextPart9836319.qjZ78FZ7TS--