all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: ams@gnu.org, emacs-devel@gnu.org
Subject: Re: hexl-mode: searching for multi byte sequence?
Date: Tue, 14 Jul 2015 17:51:17 +0300	[thread overview]
Message-ID: <83zj2y7py2.fsf@gnu.org> (raw)
In-Reply-To: <87fv4rfc8s.fsf@uwakimon.sk.tsukuba.ac.jp>

> From: "Stephen J. Turnbull" <stephen@xemacs.org>
> Date: Tue, 14 Jul 2015 16:07:47 +0900
> Cc: emacs-devel@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).

Hexl already provides something similar, see
hexl-isearch-search-function.  It allows to search in the text column
strings that span multiple lines, for example.  It should be enhanced
to support Alfred's use case (and somebody please document it!).



      reply	other threads:[~2015-07-14 14:51 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
2015-07-14 14:51   ` Eli Zaretskii [this message]

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=83zj2y7py2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=ams@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=stephen@xemacs.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.