all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: ams@gnu.org (Alfred M. Szmidt)
Cc: emacs-devel@gnu.org
Subject: hexl-mode: searching for multi byte sequence?
Date: Tue, 14 Jul 2015 16:07:47 +0900	[thread overview]
Message-ID: <87fv4rfc8s.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <E1ZEhx4-0004U8-Ex@fencepost.gnu.org>

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).




  reply	other threads:[~2015-07-14  7:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 17:55 hexl-mode: searching for multi byte sequence? Alfred M. Szmidt
2015-07-14  7:07 ` Stephen J. Turnbull [this message]
2015-07-14 14:51   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fv4rfc8s.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=ams@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.