From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Angelina Carlton Newsgroups: gmane.emacs.help Subject: Re: how can I tell emacs to treat a text file as html? Date: Sat, 9 Apr 2005 14:46:37 -0400 Message-ID: <20050409184637.GA1920@magma.ca> References: <87oecnhlay.fsf@thalassa.informatimago.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1113073083 21828 80.91.229.2 (9 Apr 2005 18:58:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 9 Apr 2005 18:58:03 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 09 20:58:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DKL9O-0006MT-9q for geh-help-gnu-emacs@m.gmane.org; Sat, 09 Apr 2005 20:57:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DKKj9-0001XW-FP for geh-help-gnu-emacs@m.gmane.org; Sat, 09 Apr 2005 14:30:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DKKiN-0001UU-4J for help-gnu-emacs@gnu.org; Sat, 09 Apr 2005 14:29:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DKKiG-0001RV-63 for help-gnu-emacs@gnu.org; Sat, 09 Apr 2005 14:29:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DKKiE-0001N2-7u for help-gnu-emacs@gnu.org; Sat, 09 Apr 2005 14:29:42 -0400 Original-Received: from [206.191.0.217] (helo=mx1.magmacom.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DKKzn-0001kE-E4 for help-gnu-emacs@gnu.org; Sat, 09 Apr 2005 14:47:51 -0400 Original-Received: from mail3.magma.ca (mail3.magma.ca [206.191.0.221]) by mx1.magmacom.com (8.13.0/8.13.0) with ESMTP id j39IkdHx023407 for ; Sat, 9 Apr 2005 14:46:40 -0400 Original-Received: from lemonjelly (ottawa-hs-64-26-176-100.s-ip.magma.ca [64.26.176.100]) by mail3.magma.ca (8.13.0/8.13.0) with ESMTP id j39IkcmG013392 for ; Sat, 9 Apr 2005 14:46:39 -0400 Original-Received: from orchid by lemonjelly with local (Exim 3.35 #1 (Debian)) id 1DKKyb-0000VM-00 for ; Sat, 09 Apr 2005 14:46:37 -0400 Original-To: help-gnu-emacs@gnu.org Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87oecnhlay.fsf@thalassa.informatimago.com> User-Agent: Mutt/1.3.28i 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:25514 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25514 On Sat, Apr 09, 2005 at 08:11:49PM +0200, Pascal Bourguignon wrote: > emacsclient -e "(progn (find-file \"$file\") (html-mode))" This throws an error: emacsclient: invalid option -- e > Also, it might be possible to append: > > > > if not already present in the file, and then use merely: emacsclient $file > > For example: > > > tail -10 $file \ > | grep -q -s 'mode: html' \ > || cat >> $file <