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.devel Subject: Re: replacing hexl-mode with nhexl-mode? Date: Tue, 22 Mar 2022 22:41:03 +0200 Message-ID: <83r16ten4w.fsf@gnu.org> References: <83tubpeuly.fsf@gnu.org> <83sfr9eov4.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3796"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: ams@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 22 21:42:12 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nWlKW-0000pP-9a for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Mar 2022 21:42:12 +0100 Original-Received: from localhost ([::1]:46602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWlKT-0003GQ-AQ for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Mar 2022 16:42:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWlJd-0002bi-4c for emacs-devel@gnu.org; Tue, 22 Mar 2022 16:41:17 -0400 Original-Received: from [2001:470:142:3::e] (port=47162 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWlJc-0003hA-SJ for emacs-devel@gnu.org; Tue, 22 Mar 2022 16:41:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=WsPuFV9BeKj+XNVCMTnMmEqR2xt4uGZ/iROg7T6Q13c=; b=aFoG0v+UPnGy iymKM/9Jg9luz00HsxxOZPohlOdSBup5aKV1Q6b5LHXCoAUkclDSfewlJkbeCh5KWgtCaDMm544bg awnyfMY1pSRwhz3/MjOCVRVS24UaxoLSzbbPYUgtez8YQHFNLyuhlWkMmcBH6cDuwNa2kuzh4PeEb CVNMK0s5+J49mdYcsBj8BV+LPbkstLgdkziiEyxvVFvyay53zSaH+1sAnvCKDa5Q986QUbQhxBTSi 7kDNXQDjrXJP3zKqM6n7dx7tAW+RLY4H1cTmwNYHwIrHby8SaQd+antN6aG5K/dnROSYUplGRHkIF 17Im7R2ug2BDgH3jiJxT5g==; Original-Received: from [87.69.77.57] (port=3277 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWlJc-0005f8-4c; Tue, 22 Mar 2022 16:41:16 -0400 In-Reply-To: <83sfr9eov4.fsf@gnu.org> (message from Eli Zaretskii on Tue, 22 Mar 2022 22:03:43 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:287375 Archived-At: > Date: Tue, 22 Mar 2022 22:03:43 +0200 > From: Eli Zaretskii > Cc: emacs-devel@gnu.org > > > From: "Alfred M. Szmidt" > > 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!