unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to add the encoding in the emacs window?
@ 2007-12-02  9:45 avilella
  2007-12-02 21:33 ` Peter Dyballa
  2007-12-02 23:27 ` Johan Bockgård
  0 siblings, 2 replies; 4+ messages in thread
From: avilella @ 2007-12-02  9:45 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I would like to know if it is possible to have the encoding specified
in a given emacs window:
when I open emacs with GNOME, the window specifies something like:
"emacs -- myfile.ext"
and I would like to have the window name being for example: "emacs
UTF-8 -- myfile.ext"

Thanks,

    Albert.

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

* Re: How to add the encoding in the emacs window?
  2007-12-02  9:45 How to add the encoding in the emacs window? avilella
@ 2007-12-02 21:33 ` Peter Dyballa
  2007-12-02 23:27 ` Johan Bockgård
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2007-12-02 21:33 UTC (permalink / raw)
  To: avilella; +Cc: help-gnu-emacs


Am 02.12.2007 um 10:45 schrieb avilella:

> I would like to know if it is possible to have the encoding specified
> in a given emacs window:

No. The encoding is a property of the buffer. It's shown at the  
beginning, the left-most edge, of the mode-line. You can select with  
the mouse cursor that symbol and a *Help* buffer will explain what  
the encoding is.

If you mean how to set an encoding preference for GNU Emacs, you  
might start with setting environment  variables like LC_CTYPE. From  
its value GNU Emacs will set an internal preference for buffer  
encodings – but it won't be strict since internal settings (like file- 
coding-system-alist, network-coding-system-alist, process-coding- 
system-alist, auto-coding-alist ...) pre-define a lot.

You can go further and put into your user init file code that reads  
LC_CTYPE (or a synthetic environment variable of your own) and then  
modifies such lists, and which also emits a

	(prefer-coding-system '<some value>)

There are also buffer local variables which can be added at the top  
of the file or its bottom. Examples for top:

	;;; -*- mode: Emacs-Lisp; coding: utf-8; -*-

and bottom:

	%%% Local Variables:
	%%% mode: latex
	%%% TeX-master: t
	%%% coding: utf-8-unix
	%%% TeX-command-default: "XeLaTeXx"
	%%% End:


--
Greetings

   Pete

We also sponsor National Invisible Chronic Illness Awareness Week  
annually in September.
Join the millions

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

* Re: How to add the encoding in the emacs window?
  2007-12-02  9:45 How to add the encoding in the emacs window? avilella
  2007-12-02 21:33 ` Peter Dyballa
@ 2007-12-02 23:27 ` Johan Bockgård
  2007-12-03 11:56   ` Ke Lu
  1 sibling, 1 reply; 4+ messages in thread
From: Johan Bockgård @ 2007-12-02 23:27 UTC (permalink / raw)
  To: help-gnu-emacs

"avilella@gmail.com" <avilella@gmail.com> writes:

> I would like to know if it is possible to have the encoding specified
> in a given emacs window:
> when I open emacs with GNOME, the window specifies something like:
> "emacs -- myfile.ext"
> and I would like to have the window name being for example: "emacs
> UTF-8 -- myfile.ext"

(setq frame-title-format
      '("Emacs "
        ;; Or try "%Z", coding system mnemonic (cf. mode line)
        (:eval (symbol-name buffer-file-coding-system))
        " -- %f"))

-- 
Johan Bockgård

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

* Re: How to add the encoding in the emacs window?
  2007-12-02 23:27 ` Johan Bockgård
@ 2007-12-03 11:56   ` Ke Lu
  0 siblings, 0 replies; 4+ messages in thread
From: Ke Lu @ 2007-12-03 11:56 UTC (permalink / raw)
  To: help-gnu-emacs

It's great.

bojohan+news@dd.chalmers.se (Johan Bockgård) writes:

> "avilella@gmail.com" <avilella@gmail.com> writes:
>
>> I would like to know if it is possible to have the encoding specified
>> in a given emacs window:
>> when I open emacs with GNOME, the window specifies something like:
>> "emacs -- myfile.ext"
>> and I would like to have the window name being for example: "emacs
>> UTF-8 -- myfile.ext"
>
> (setq frame-title-format
>       '("Emacs "
>         ;; Or try "%Z", coding system mnemonic (cf. mode line)
>         (:eval (symbol-name buffer-file-coding-system))
>         " -- %f"))
>
> -- 
> Johan Bockgård

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

end of thread, other threads:[~2007-12-03 11:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-02  9:45 How to add the encoding in the emacs window? avilella
2007-12-02 21:33 ` Peter Dyballa
2007-12-02 23:27 ` Johan Bockgård
2007-12-03 11:56   ` Ke Lu

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