unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* What are 'mode' and 'coding'?
@ 2006-11-23 13:31 Leo
  2006-11-25  0:11 ` Peter Dyballa
  2006-11-25 10:25 ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Leo @ 2006-11-23 13:31 UTC (permalink / raw)


Hi there,

One can write "-*-mode:emacs-lisp;coding:utf-8;-*-" on the head of a
file to force emacs to use emacs-lisp-mode and utf-8 coding. I am
wondering what are `mode' and `coding'. I use 'C-h v' on them and
there are no such variables.

Thank you for your help.

-- 
Leo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What are 'mode' and 'coding'?
  2006-11-23 13:31 What are 'mode' and 'coding'? Leo
@ 2006-11-25  0:11 ` Peter Dyballa
  2006-11-25  2:15   ` Leo
       [not found]   ` <mailman.1059.1164420949.2155.help-gnu-emacs@gnu.org>
  2006-11-25 10:25 ` Eli Zaretskii
  1 sibling, 2 replies; 9+ messages in thread
From: Peter Dyballa @ 2006-11-25  0:11 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 23.11.2006 um 14:31 schrieb Leo:

> One can write "-*-mode:emacs-lisp;coding:utf-8;-*-" on the head of a
> file to force emacs to use emacs-lisp-mode and utf-8 coding. I am
> wondering what are `mode' and `coding'. I use 'C-h v' on them and
> there are no such variables.

It's major-mode and buffer-file-coding-system.

--
Greetings

   Pete

There is no national science just as there is no national  
multiplication table; what is national is no longer science.
                                       -- Anton Checov

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What are 'mode' and 'coding'?
  2006-11-25  0:11 ` Peter Dyballa
@ 2006-11-25  2:15   ` Leo
  2006-11-25  3:09     ` Dieter Wilhelm
  2006-11-25 10:42     ` Peter Dyballa
       [not found]   ` <mailman.1059.1164420949.2155.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 9+ messages in thread
From: Leo @ 2006-11-25  2:15 UTC (permalink / raw)


On Saturday, 25 Nov 2006, Peter Dyballa wrote:

> Am 23.11.2006 um 14:31 schrieb Leo:
>
>> One can write "-*-mode:emacs-lisp;coding:utf-8;-*-" on the head of a
>> file to force emacs to use emacs-lisp-mode and utf-8 coding. I am
>> wondering what are `mode' and `coding'. I use 'C-h v' on them and
>> there are no such variables.
>
> It's major-mode and buffer-file-coding-system.

Thanks for your answer.

Are there any other such variables other than 'mode', 'coding' and
'eval'?

-- 
Leo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What are 'mode' and 'coding'?
  2006-11-25  2:15   ` Leo
@ 2006-11-25  3:09     ` Dieter Wilhelm
  2006-11-25 10:42     ` Peter Dyballa
  1 sibling, 0 replies; 9+ messages in thread
From: Dieter Wilhelm @ 2006-11-25  3:09 UTC (permalink / raw)
  Cc: help-gnu-emacs

Leo <sdl.web@gmail.com> writes:

> On Saturday, 25 Nov 2006, Peter Dyballa wrote:
>
>> Am 23.11.2006 um 14:31 schrieb Leo:
>>
>>> One can write "-*-mode:emacs-lisp;coding:utf-8;-*-" on the head of a
>>> file to force emacs to use emacs-lisp-mode and utf-8 coding. I am
>>> wondering what are `mode' and `coding'. I use 'C-h v' on them and
>>> there are no such variables.
>>
>> It's major-mode and buffer-file-coding-system.
>
> Are there any other such variables other than 'mode', 'coding' and
> 'eval'?

Please have a look in the Emacs info system:

C-h i g

Then type this

(Emacs)Specifying File Variables

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What are 'mode' and 'coding'?
       [not found] <mailman.1043.1164411487.2155.help-gnu-emacs@gnu.org>
@ 2006-11-25  7:55 ` Charles philip Chan
  0 siblings, 0 replies; 9+ messages in thread
From: Charles philip Chan @ 2006-11-25  7:55 UTC (permalink / raw)


On 23 Nov 2006, sdl.web@gmail.com wrote:

> One can write "-*-mode:emacs-lisp;coding:utf-8;-*-" on the head of a
> file to force emacs to use emacs-lisp-mode and utf-8 coding. I am
> wondering what are `mode' and `coding'. I use 'C-h v' on them and
> there are no such variables.

Mode is the Major Mode that the file opens to when it is visited in
Emacs.

Coding is the encoding on the file, ie. UTF-8, Latin1, etc...

Charles

-- 
/* Binary compatibility is good American knowhow fuckin' up. */
        linux-2.2.16/arch/sparc/kernel/sunos_ioctl.c

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What are 'mode' and 'coding'?
       [not found]   ` <mailman.1059.1164420949.2155.help-gnu-emacs@gnu.org>
@ 2006-11-25  9:53     ` Tassilo Horn
  0 siblings, 0 replies; 9+ messages in thread
From: Tassilo Horn @ 2006-11-25  9:53 UTC (permalink / raw)


Leo <sdl.web@gmail.com> writes:

Hi Leo,

> Are there any other such variables other than 'mode', 'coding' and
> 'eval'?

Yes, see

,----[ (info "(emacs)Specifying File Variables") ]
| 58.3.4.1 Specifying File Variables
| ..................................
| 
| There are two ways to specify file local variable values: in the first
| line, or with a local variables list.  Here's how to specify them in
| the first line:
| 
|      -*- mode: MODENAME; VAR: VALUE; ... -*-
`----

Regards,
Tassilo
-- 
          "Emacs is not a development tool but a way of life."
                - David Kastrup in alt.religion.emacs -

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What are 'mode' and 'coding'?
  2006-11-23 13:31 What are 'mode' and 'coding'? Leo
  2006-11-25  0:11 ` Peter Dyballa
@ 2006-11-25 10:25 ` Eli Zaretskii
  2006-11-25 12:52   ` Leo
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2006-11-25 10:25 UTC (permalink / raw)


> From: Leo <sdl.web@gmail.com>
> Date: Thu, 23 Nov 2006 13:31:47 +0000
> 
> One can write "-*-mode:emacs-lisp;coding:utf-8;-*-" on the head of a
> file to force emacs to use emacs-lisp-mode and utf-8 coding. I am
> wondering what are `mode' and `coding'. I use 'C-h v' on them and
> there are no such variables.

See the node "File Variables" in the Emacs manual, it explains all
that.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What are 'mode' and 'coding'?
  2006-11-25  2:15   ` Leo
  2006-11-25  3:09     ` Dieter Wilhelm
@ 2006-11-25 10:42     ` Peter Dyballa
  1 sibling, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2006-11-25 10:42 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 25.11.2006 um 03:15 schrieb Leo:

> Are there any other such variables other than 'mode', 'coding' and
> 'eval'?

Yes.

Look for buffer local variables.

--
Greetings

   Pete

“I hope to die before I *have* to use Microsoft Word.”
      - Donald E. Knuth, 2001-10-02 in Tübingen.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What are 'mode' and 'coding'?
  2006-11-25 10:25 ` Eli Zaretskii
@ 2006-11-25 12:52   ` Leo
  0 siblings, 0 replies; 9+ messages in thread
From: Leo @ 2006-11-25 12:52 UTC (permalink / raw)


On Saturday, 25 Nov 2006, Eli Zaretskii wrote:

>> From: Leo <sdl.web@gmail.com>
>> Date: Thu, 23 Nov 2006 13:31:47 +0000
>> 
>> One can write "-*-mode:emacs-lisp;coding:utf-8;-*-" on the head of a
>> file to force emacs to use emacs-lisp-mode and utf-8 coding. I am
>> wondering what are `mode' and `coding'. I use 'C-h v' on them and
>> there are no such variables.
>
> See the node "File Variables" in the Emacs manual, it explains all
> that.

For the record, there are altogether 4 pseudo variables i.e. mode,
coding, eval and unibyte.

-- 
Leo

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-11-25 12:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-23 13:31 What are 'mode' and 'coding'? Leo
2006-11-25  0:11 ` Peter Dyballa
2006-11-25  2:15   ` Leo
2006-11-25  3:09     ` Dieter Wilhelm
2006-11-25 10:42     ` Peter Dyballa
     [not found]   ` <mailman.1059.1164420949.2155.help-gnu-emacs@gnu.org>
2006-11-25  9:53     ` Tassilo Horn
2006-11-25 10:25 ` Eli Zaretskii
2006-11-25 12:52   ` Leo
     [not found] <mailman.1043.1164411487.2155.help-gnu-emacs@gnu.org>
2006-11-25  7:55 ` Charles philip Chan

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).