From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: Re: can't unjumble foreign buffer Date: Fri, 16 May 2003 13:24:23 +0900 (JST) Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200305160424.NAA06066@etlken.m17n.org> References: <87he7xunyn.fsf@jidanni.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1053059085 12049 80.91.224.249 (16 May 2003 04:24:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 16 May 2003 04:24:45 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 16 06:24:44 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19GWlv-00038B-00 for ; Fri, 16 May 2003 06:24:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19GWmo-0004rh-05 for gnu-bug-gnu-emacs@m.gmane.org; Fri, 16 May 2003 00:25:38 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19GWmL-0004OZ-00 for bug-gnu-emacs@gnu.org; Fri, 16 May 2003 00:25:09 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19GWmH-0004Gd-00 for bug-gnu-emacs@gnu.org; Fri, 16 May 2003 00:25:07 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19GWmF-00047k-00 for bug-gnu-emacs@gnu.org; Fri, 16 May 2003 00:25:03 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h4G4OOo26531; Fri, 16 May 2003 13:24:24 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h4G4ONA14917; Fri, 16 May 2003 13:24:23 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id NAA06066; Fri, 16 May 2003 13:24:23 +0900 (JST) Original-To: jidanni@dman.ddts.net In-reply-to: <87he7xunyn.fsf@jidanni.org> (message from Dan Jacobson on Thu, 15 May 2003 07:07:28 +0800) 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) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5072 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5072 In article <87he7xunyn.fsf@jidanni.org>, Dan Jacobson 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): 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 * 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