all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* \201 chars showing up in buffer when using emacs from mutt
@ 2005-03-24 12:14 Dirk-Jan.Binnema
  2005-03-25  1:12 ` Peter Dyballa
  0 siblings, 1 reply; 4+ messages in thread
From: Dirk-Jan.Binnema @ 2005-03-24 12:14 UTC (permalink / raw)


Hi all,

I am using emacs as the editor for mutt; however, I have never been able
to get it working correctly, as quite often emacs will not detect that
a text file is, in fact utf8 (that's when i get the '\201' character before 
accented characters like in German). I've found similar problems on the 
mailing list, but no solution that seems to work; that includes setting utf8
as the preferred encoding.Also, it does not really seem to
matter what charset I use in mutt, or my exact setting in .emacs.

So does anyone have bullet proof settings such that I will never see that
dreaded \201 again? I am *almost* capabable of just removing them trough some
hook function when I start emacs, but taht seems very evil.

Thanks in advance
Dirk.

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

* Re: \201 chars showing up in buffer when using emacs from mutt
       [not found] <mailman.114.1111668219.28103.help-gnu-emacs@gnu.org>
@ 2005-03-25  0:39 ` B.T. Raven
  0 siblings, 0 replies; 4+ messages in thread
From: B.T. Raven @ 2005-03-25  0:39 UTC (permalink / raw)



<Dirk-Jan.Binnema@nokia.com> wrote in message
news:mailman.114.1111668219.28103.help-gnu-emacs@gnu.org...
Hi all,

I am using emacs as the editor for mutt; however, I have never been able
to get it working correctly, as quite often emacs will not detect that
a text file is, in fact utf8 (that's when i get the '\201' character
before
accented characters like in German). I've found similar problems on the
mailing list, but no solution that seems to work; that includes setting
utf8
as the preferred encoding.Also, it does not really seem to
matter what charset I use in mutt, or my exact setting in .emacs.

So does anyone have bullet proof settings such that I will never see
that
dreaded \201 again? I am *almost* capabable of just removing them trough
some
hook function when I start emacs, but taht seems very evil.

Thanks in advance
Dirk.

The next time you see all the characters correctly displayed in the
buffer, put

;; -*- coding: utf-8 -*-

at the top of the file. Then type C-x RET f utf-8 before saving the
buffer again. This explicit hint in the first line of the file will
prevent emacs from considering any other encoding when it reads the file
again. I don't know what mutt is but if it executes the text file, maybe
the line starting with ;; could be wrapped in another kind of multi-line
comment (like /*....*/ in C)

C-x RET I  utf-8 should also work since (I think)
default-buffer-file-coding-system's value is persistent across sessions.
Alternatively you could set currentl-language-environment with M-x
customize but then you would get the rtf1345 input method which probably
doesn't work (w32) or maybe you don't want.

Ed.

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

* Re: \201 chars showing up in buffer when using emacs from mutt
  2005-03-24 12:14 \201 chars showing up in buffer when using emacs from mutt Dirk-Jan.Binnema
@ 2005-03-25  1:12 ` Peter Dyballa
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2005-03-25  1:12 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 24.03.2005 um 13:14 schrieb <Dirk-Jan.Binnema@nokia.com>:

> So does anyone have bullet proof settings such that I will never see 
> that
> dreaded \201 again? I am *almost* capabable of just removing them 
> trough some
> hook function when I start emacs, but taht seems very evil.
>

You have a few choices:

a) set in the file's header something like
	<comment> -*- coding: utf-8 -*-
    where <comment> is the comment character for this type of file

b) set file-coding-system-alist, auto-coding-alist -- You can customize 
this variable:
	 ("\\.tex\\'" iso-latin-9-unix . iso-latin-9-unix)

c) some of these:
      (set-language-environment 'Chinese-BIG5)
      (set-default-coding-systems 'euc-jp-unix)
      (set-keyboard-coding-system 'mac-roman)
      (set-clipboard-coding-system 'sjis-mac)
      (set-terminal-coding-system 'utf-8)
      (set-file-name-coding-system 'utf-8)

d) combinations of above

--
Greetings

   Pete

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
      -Benjamin Franklin, Historical Review of Pennsylvania.

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

* RE: \201 chars showing up in buffer when using emacs from mutt
@ 2005-03-29 11:09 Dirk-Jan.Binnema
  0 siblings, 0 replies; 4+ messages in thread
From: Dirk-Jan.Binnema @ 2005-03-29 11:09 UTC (permalink / raw)
  Cc: help-gnu-emacs

Thank you for your reply.

> From: Peter_Dyballa@Web.DE [mailto:Peter_Dyballa@Web.DE]
> 
> Am 24.03.2005 um 13:14 schrieb <Dirk-Jan.Binnema@nokia.com>:
> 
> > So does anyone have bullet proof settings such that I will 
> never see 
> > that
> > dreaded \201 again? I am *almost* capabable of just removing them 
> > trough some
> > hook function when I start emacs, but taht seems very evil.
> >
> 
> You have a few choices:
> 
> a) set in the file's header something like
> 	<comment> -*- coding: utf-8 -*-
>     where <comment> is the comment character for this type of file

Ah... but that would require a bit of a hack though in my use case 
(running emacs as the editor for mutt).

> b) set file-coding-system-alist, auto-coding-alist -- You can 
> customize 
> this variable:
> 	 ("\\.tex\\'" iso-latin-9-unix . iso-latin-9-unix)
> 
> c) some of these:
 
  [...]

> d) combinations of above

Ok, I am testing these. I did however also discover the 'send_charset'
setting for Mutt; together with your hints that may do the trick -- thanks.

--Dirk.

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

end of thread, other threads:[~2005-03-29 11:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-24 12:14 \201 chars showing up in buffer when using emacs from mutt Dirk-Jan.Binnema
2005-03-25  1:12 ` Peter Dyballa
     [not found] <mailman.114.1111668219.28103.help-gnu-emacs@gnu.org>
2005-03-25  0:39 ` B.T. Raven
  -- strict thread matches above, loose matches on Subject: below --
2005-03-29 11:09 Dirk-Jan.Binnema

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.