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

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

Re: how can I tell emacs to treat a text file as html?


From: Angelina Carlton
Subject: Re: how can I tell emacs to treat a text file as html?
Date: Sat, 9 Apr 2005 14:46:37 -0400
User-agent: Mutt/1.3.28i

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:
> 
> <!--
> Local Variables:
> mode: html
> End:
> 
> or to prepend: <!-- -*- mode: html -*- -->
> 
> 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 <<EOF
> <!--
> Local Variables:
> mode: html
> End:
> EOF
> emacsclient $file
> 
> 

I think from the man page:
       -f function               Execute the lisp function function.
       -l file                   Load the lisp code in the file file.

So it looks like I can load some code from a file which is probably the simplest
thing to do for my needs.

-- 
Angelina Carlton




reply via email to

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