unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: ams@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: replacing hexl-mode with nhexl-mode?
Date: Tue, 22 Mar 2022 22:41:03 +0200	[thread overview]
Message-ID: <83r16ten4w.fsf@gnu.org> (raw)
In-Reply-To: <83sfr9eov4.fsf@gnu.org> (message from Eli Zaretskii on Tue, 22 Mar 2022 22:03:43 +0200)

> Date: Tue, 22 Mar 2022 22:03:43 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> > From: "Alfred M. Szmidt" <ams@gnu.org>
> > Cc: emacs-devel@gnu.org
> > Date: Tue, 22 Mar 2022 15:37:13 -0400
> > 
> >    > Wouldn't it be nice to replace hexl-mode with nhexl-mode?  Are there
> >    > any reasons not too?
> > 
> >    I think we found nhexl-mode to be much slower in some cases.
> > 
> > Do you recall what those cases might have been?
> 
> Stefan should answer that.  What I remember was 10 years ago, and
> maybe was solved since then.

Btw, some problems can be seen almost right away.  Try this:

  C-x C-f etc/HELLO
  M-x nhexl-mode RET

The display is much less tidy, to say the least, than with hexl.el.
It looks like the fancy display of LF is the culprit, at least on my
system (font issues?)  Now try scrolling with C-n, and you will see
stuttering that isn't there with hexl.

There's a also a larger, more subtle problem: nhexl shows you the
internal representation of the buffer text, not what's in the file on
disk; this matters a lot when the file has non-ASCII text.  You need
to be aware of that and visit the file literally if you want to avoid
this issue (there's no nhexl-find-file command).

Finally, nhexl causes display problems when invoked in buffers
text using bidirectional scripts.  Try this:

  C-x C-f etc/tutorials/TUTORIAL.he RET
  M-x nhexl-mode RET

Lots of fun!



  reply	other threads:[~2022-03-22 20:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 16:49 replacing hexl-mode with nhexl-mode? Alfred M. Szmidt
2022-03-22 17:59 ` Eli Zaretskii
2022-03-22 19:37   ` Alfred M. Szmidt
2022-03-22 20:03     ` Eli Zaretskii
2022-03-22 20:41       ` Eli Zaretskii [this message]
2022-03-23  7:07         ` Alfred M. Szmidt
2022-03-23 12:46           ` Eli Zaretskii
2022-03-23 16:47             ` Stefan Monnier
2022-03-25  6:59               ` Alfred M. Szmidt
2022-03-25  7:08                 ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83r16ten4w.fsf@gnu.org \
    --to=eliz@gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).