emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#31551: closed (27.0.50; emacs hangs in hexl-mode o


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#31551: closed (27.0.50; emacs hangs in hexl-mode on modula2 files)
Date: Fri, 22 Jun 2018 03:33:02 +0000

Your message dated Thu, 21 Jun 2018 23:31:55 -0400
with message-id <address@hidden>
and subject line Re: bug#31551: 27.0.50; emacs hangs in hexl-mode on modula2 
files
has caused the debbugs.gnu.org bug report #31551,
regarding 27.0.50; emacs hangs in hexl-mode on modula2 files
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
31551: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31551
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; emacs hangs in hexl-mode on modula2 files Date: Tue, 22 May 2018 15:24:09 +0200
Hi,

I run into an issue lately while trying to use the hexl-mode with
a modula2 file that I found and emacs starts to hang after the
hexl-mode starts. I tested it on emacs 24.5, 25.2 and master.

To reproduce the issue you can use :
echo "abcd" > test.MOD
emacs -Q --eval '(show-paren-mode 1)' test.MOD
M-x hexl-mode

--> emacs hangs and use 100% cpu. It only happen on the first character so
we can run out the hang with multiple C-g + an arrow key.

I dig into the issue and it appears that the was because of the
show-paren-mode and the fact that the ":" character have meaning in
modula-2-mode. Emacs is stuck in the loop of the
m2-smie-refine-colon function because after the "00000000" that start
the hexl buffer there is no more sexp to parse so the tok variable is
empty but the (forward-sexp -1) call does not fail.

I fixed that myself by stopping the loop if the point is at the beginning
of the buffer. Not sure if it correct but here is the diff :

diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el
index 582e495..30c8c46 100644
--- a/lisp/progmodes/modula2.el
+++ b/lisp/progmodes/modula2.el
@@ -203,6 +203,7 @@ m2-smie-refine-colon
     (while (not res)
       (let ((tok (smie-default-backward-token)))
         (cond
+         ((= (point) (point-min)) (setq res ":"))
          ((zerop (length tok))
           (let ((forward-sexp-function nil))
             (condition-case nil


I am not really into modula2 files but this bug was quite surprising.

best regards,
Alexandre

--- End Message ---
--- Begin Message --- Subject: Re: bug#31551: 27.0.50; emacs hangs in hexl-mode on modula2 files Date: Thu, 21 Jun 2018 23:31:55 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
> idea.  So I plan on cleaning it up (and adding an entry in NEWS, not
> sure if it deserves an entry in the lispref) and installing it
> into master.

Installed,


        Stefan


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]