From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Edit binaries - insert Date: Fri, 06 Nov 2020 07:43:41 +0200 Message-ID: <83361n9h0y.fsf@gnu.org> References: <83y2jfanmy.fsf@gnu.org> <16b4b789-3492-5633-d57b-9f8244699e9e@us.ibm.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28861"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 06 06:44:21 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kauXs-0007RI-O1 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 06 Nov 2020 06:44:20 +0100 Original-Received: from localhost ([::1]:45344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kauXr-0003vg-R6 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 06 Nov 2020 00:44:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kauXH-0003vU-E7 for help-gnu-emacs@gnu.org; Fri, 06 Nov 2020 00:43:43 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46948) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kauXH-0004Yh-5L for help-gnu-emacs@gnu.org; Fri, 06 Nov 2020 00:43:43 -0500 Original-Received: from [176.228.60.248] (port=1888 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kauXG-0006VY-Je for help-gnu-emacs@gnu.org; Fri, 06 Nov 2020 00:43:42 -0500 In-Reply-To: <16b4b789-3492-5633-d57b-9f8244699e9e@us.ibm.com> (message from Ken Goldman on Thu, 5 Nov 2020 22:25:52 -0500) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125049 Archived-At: > From: Ken Goldman > Date: Thu, 5 Nov 2020 22:25:52 -0500 > > >> Is there a mode to edit binaries and insert and delete bytes. I know > >> about hexl-mode, but AFAIK it only supports overwrite. > > > > "M-x find-file-literally RET FILE-NAME RET" and edit as you like. > > That works, but the binary doesn't display the hex values. Just lots of > \nnn values. So it's impractical to find the byte location. You never said you want the bytes displayed in hex. You can set display-raw-bytes-as-hex to have them shown in hex instead of in octal.