From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: hexl-mode: searching for multi byte sequence? Date: Tue, 14 Jul 2015 16:07:47 +0900 Message-ID: <87fv4rfc8s.fsf@uwakimon.sk.tsukuba.ac.jp> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1436857691 12566 80.91.229.3 (14 Jul 2015 07:08:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jul 2015 07:08:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: ams@gnu.org (Alfred M. Szmidt) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 14 09:08:02 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZEuJt-0008T0-M1 for ged-emacs-devel@m.gmane.org; Tue, 14 Jul 2015 09:08:01 +0200 Original-Received: from localhost ([::1]:58202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEuJs-0005Gz-IA for ged-emacs-devel@m.gmane.org; Tue, 14 Jul 2015 03:08:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEuJq-0005Gr-1s for emacs-devel@gnu.org; Tue, 14 Jul 2015 03:07:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEuJp-0005Le-99 for emacs-devel@gnu.org; Tue, 14 Jul 2015 03:07:57 -0400 Original-Received: from shako.sk.tsukuba.ac.jp ([130.158.97.161]:37031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEuJl-0005H9-2z; Tue, 14 Jul 2015 03:07:53 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by shako.sk.tsukuba.ac.jp (Postfix) with ESMTPS id D9F181C3964; Tue, 14 Jul 2015 16:07:47 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id B45FE11EF83; Tue, 14 Jul 2015 16:07:47 +0900 (JST) In-Reply-To: X-Mailer: VM undefined under 21.5 (beta34) "kale" ffb5abc8dc4e XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 130.158.97.161 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187866 Archived-At: Alfred M. Szmidt writes: > Is there some way in hexl-mode to search for a (hex, octal, ...) byte > sequence? Currently, C-s behaves a bit strange in at least two regards: > > 1) If file contains the byte sequence #xDEADBEAF, depending on how > they are aligned (odd or even word), one has to look for "DEAD > BEAF" and "DE ADBE AF". C-u C-s de\(.\n\)*ad\(.\|\n\)*be\(.\|\n\)*af is what I'd use. It has obvious defects, and it would be nice if hexl-mode provided something a little less greedy (eg a transformation to a 3-armed disjunction allowing at most one newline plus handling the leading byte number after the newline).