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

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

Re: can't unjumble foreign buffer


From: Kenichi Handa
Subject: Re: can't unjumble foreign buffer
Date: Fri, 16 May 2003 13:24:23 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <87he7xunyn.fsf@jidanni.org>, Dan Jacobson <jidanni@dman.ddts.net> 
writes:
> I do find-file on a file that is unicode text (.txt), and I want to
> unjumble before my eyes.  The only thing on the menus that might be
> appropriate is 'set coding system' but that is greyed-out.

> I do then instead Set Language Environment, but that instead affects
> all buffers.  And one doesn't see Unicode there.

> OK, I put it into mozilla and selected Unicode and can read it.

> My point is your menus don't have a intuitive way for the user to do
> Mozilla's "View --> Character coding"

> Admit it, one looks and looks and the best one can guess is that what
> we want is in ..Mule...Set coding system, maybe. But it is greyed-out.

Perhaps the file is detected as raw bytes.

I've just installed the attached fix so that the menu "Set
Coding Systems" is not greyed-out as far as Emacs is in
multibyte mode even if the current buffer is unibyte.

And, the HEAD version has this menu (which is also bound to
C-x RET r):

<menu-bar> <options> <mule> <set-various-coding-system>
<revert-buffer-with-coding-system>

When you select this menu, Emacs asks you to type a coding
system name, and re-visit the buffer file with the specified
coding system.

Isn't it what you want?

---
Ken'ichi HANDA
handa@m17n.org

2003-05-16  Kenichi Handa  <handa@m17n.org>

        * international/mule-cmds.el (mule-menu-keymap): Enable the menu
        set-various-coding-system when
        default-enable-multibyte-characters is non-nil.

Index: mule-cmds.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/mule-cmds.el,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -c -r1.230 -r1.231
cvs server: conflicting specifications of output style
*** mule-cmds.el        28 Apr 2003 09:16:19 -0000      1.230
--- mule-cmds.el        16 May 2003 04:15:20 -0000      1.231
***************
*** 84,90 ****
    t)
  (define-key-after mule-menu-keymap [set-various-coding-system]
    (list 'menu-item "Set Coding Systems" set-coding-system-map
!       :enable 'enable-multibyte-characters))
  (define-key-after mule-menu-keymap [view-hello-file]
    '(menu-item "Show Multi-lingual Text" view-hello-file
              :enable (file-readable-p
--- 84,90 ----
    t)
  (define-key-after mule-menu-keymap [set-various-coding-system]
    (list 'menu-item "Set Coding Systems" set-coding-system-map
!       :enable 'default-enable-multibyte-characters))
  (define-key-after mule-menu-keymap [view-hello-file]
    '(menu-item "Show Multi-lingual Text" view-hello-file
              :enable (file-readable-p




reply via email to

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