* automatic setting of mode
@ 2009-07-03 14:56 ?manu*
2009-07-03 21:06 ` Peter Dyballa
[not found] ` <mailman.1779.1246655224.2239.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 5+ messages in thread
From: ?manu* @ 2009-07-03 14:56 UTC (permalink / raw)
To: help-gnu-emacs
I know that it is possible to write some comments at the beginning of
a file, to tell emacs to open the file with a specified mode. For
example I use the line:
-*- mode: html; -*-
in some files that I would like to edit in HTML mode (even if they
don't have the html extension).
Now I wonder If there is a similar command to get the following:
1. automatically issuing the command
M-x tex-pdf
which tells emacs to compile a LaTeX file with pdflatex.
2. automatically issuing the command
M-x set-buffer-file-coding-system utf-8
telling emacs that the file is encoded in utf8
thank you for any help
E.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: automatic setting of mode
2009-07-03 14:56 automatic setting of mode ?manu*
@ 2009-07-03 21:06 ` Peter Dyballa
[not found] ` <mailman.1779.1246655224.2239.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2009-07-03 21:06 UTC (permalink / raw)
To: ?manu*; +Cc: help-gnu-emacs
Am 03.07.2009 um 16:56 schrieb ?manu*:
> Now I wonder If there is a similar command to get the following:
>
> 1. automatically issuing the command
> M-x tex-pdf
> which tells emacs to compile a LaTeX file with pdflatex.
I don't know what the simple built-in TeX-mode accepts, for AUCTeX
you can put among its block of (file) local variables:
%%% TeX-PDF-mode: t
>
> 2. automatically issuing the command
> M-x set-buffer-file-coding-system utf-8
> telling emacs that the file is encoded in utf8
LaTeX's Unicode or UTF-8 encoding support is very limited (maybe 1 %
of the BMP) (and complicated to use). For a TeX file you would need
to use % as comment character. In the file's header it would be:
coding: utf-8;
and in the file's footer (example):
%%% coding: utf-8-unix
--
Greetings
Pete
Make it simple, as simple as possible but no simpler.
– Albert Einstein
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <mailman.1779.1246655224.2239.help-gnu-emacs@gnu.org>]
* Re: automatic setting of mode
[not found] ` <mailman.1779.1246655224.2239.help-gnu-emacs@gnu.org>
@ 2009-07-04 11:58 ` ?manu*
2009-07-04 12:43 ` Lennart Borgman
2009-07-04 13:58 ` Peter Dyballa
0 siblings, 2 replies; 5+ messages in thread
From: ?manu* @ 2009-07-04 11:58 UTC (permalink / raw)
To: help-gnu-emacs
On 3 Lug, 23:06, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 03.07.2009 um 16:56 schrieb ?manu*:
>
> > Now I wonder If there is a similar command to get the following:
>
> > 1. automatically issuing the command
> > M-x tex-pdf
> > which tells emacs to compile a LaTeX file with pdflatex.
>
> I don't know what the simple built-in TeX-mode accepts, for AUCTeX
Yes, I use AUCTeX
> you can put among its block of (file) local variables:
>
> %%% TeX-PDF-mode: t
This didn't worked for me. But using your snippet code I found this
discussion which was useful to me:
http://osdir.com/ml/emacs.auctex.general/2006-01/msg00002.html
> > 2. automatically issuing the command
> > M-x set-buffer-file-coding-system utf-8
> > telling emacs that the file is encoded in utf8
>
> LaTeX's Unicode or UTF-8 encoding support is very limited (maybe 1 %
> of the BMP) (and complicated to use). For a TeX file you would need
> to use % as comment character. In the file's header it would be:
>
> coding: utf-8;
Thank you so much. Actually this I need it in an HTML file not TeX. It
seems to me that it works.
E.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: automatic setting of mode
2009-07-04 11:58 ` ?manu*
@ 2009-07-04 12:43 ` Lennart Borgman
2009-07-04 13:58 ` Peter Dyballa
1 sibling, 0 replies; 5+ messages in thread
From: Lennart Borgman @ 2009-07-04 12:43 UTC (permalink / raw)
To: ?manu*; +Cc: help-gnu-emacs
>> coding: utf-8;
>
> Thank you so much. Actually this I need it in an HTML file not TeX. It
> seems to me that it works.
If it is xhtml you can use
<?xml version="1.0" encoding="utf-8"?>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: automatic setting of mode
2009-07-04 11:58 ` ?manu*
2009-07-04 12:43 ` Lennart Borgman
@ 2009-07-04 13:58 ` Peter Dyballa
1 sibling, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2009-07-04 13:58 UTC (permalink / raw)
To: ?manu*; +Cc: help-gnu-emacs
Am 04.07.2009 um 13:58 schrieb ?manu*:
>> you can put among its block of (file) local variables:
>>
>> %%% TeX-PDF-mode: t
For me, and AUCTeX 11.85, it worked pretty well. The mode-line showed
pdfLaTeX in that case and LaTeX in the case without that variable.
Besides, to make tests best launch GNU Emacs without your
customisation, for example as 'emacs -q …' or 'emacs -Q …'
--
Greetings
Pete
"We need a president who's fluent in at least one language."
– Buck Henry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-04 13:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-03 14:56 automatic setting of mode ?manu*
2009-07-03 21:06 ` Peter Dyballa
[not found] ` <mailman.1779.1246655224.2239.help-gnu-emacs@gnu.org>
2009-07-04 11:58 ` ?manu*
2009-07-04 12:43 ` Lennart Borgman
2009-07-04 13:58 ` Peter Dyballa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).