From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: don't assume ELF binaries are multicultural text Date: Wed, 12 Jul 2006 10:44:08 -0600 Organization: IHS Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1152723068 1478 80.91.229.2 (12 Jul 2006 16:51:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Jul 2006 16:51:08 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 12 18:51:04 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G0huG-00010o-Fu for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jul 2006 18:49:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G0huF-0004WP-S0 for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jul 2006 12:49:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G0huE-0004Vj-GC for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2006 12:49:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G0huD-0004Uw-7S for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2006 12:49:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G0huC-0004UO-Q3 for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2006 12:49:44 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G0hvl-0005CF-Ht for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2006 12:51:21 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1G0hsW-0000YV-Jo for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2006 18:48:01 +0200 Original-Received: from 207.167.42.206 ([207.167.42.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jul 2006 18:48:00 +0200 Original-Received: from ihs_4664 by 207.167.42.206 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jul 2006 18:48:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Lines: 34 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.206 User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) In-Reply-To: X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15220 Archived-At: Dan Jacobson wrote: > $ emacs /bin/sh > Loading thai-util... > Loading mule-util...done > Loading thai-util...done > Loading lao-util...done > Loading ind-util...done > Loading composite...done > Loading tibet-util...done > > Got an idea, why not say "Uh, Holmes, /bin/sh is a ELF 32-bit LSB > executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, > dynamically linked (uses shared libs), for GNU/Linux 2.2.0, stripped, > shall we w: wrongly assume it is multicultural text, thus bloating > emacs for the remainder of the session, h: invoke some hex editing > mode, q: back out of your certainly mistaken attempt to open the wrong > file, f: forever allow me to blunder ahead as multicultural text next > time..." (setq auto-coding-regexp-alist (cons '("\\`\177ELF" . no-conversion) auto-coding-regexp-alist)) You can find more interesting byte patterns in /etc/magic. (setq auto-mode-alist (cons (cons "\\`/bin/[^/]+\\'" 'hexl-mode) auto-mode-alist)) You can find more directories with binary files in (getenv "PATH") or load-path. -- Kevin