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

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

[Emacs-bug-tracker] bug#5370: closed (M-x hexl-mode M-x hexl-mode leaves


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#5370: closed (M-x hexl-mode M-x hexl-mode leaves unwanted ruler)
Date: Wed, 30 Jun 2010 22:47:02 +0000

Your message dated Wed, 30 Jun 2010 18:46:52 -0400
with message-id <address@hidden>
and subject line Re: M-x hexl-mode M-x hexl-mode leaves unwanted ruler
has caused the GNU bug report #5370,
regarding M-x hexl-mode M-x hexl-mode leaves unwanted ruler
to be marked as done.

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


-- 
5370: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5370
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: M-x hexl-mode M-x hexl-mode leaves unwanted ruler Date: Wed, 13 Jan 2010 05:52:12 +0100
  emacs -Q
  M-x hexl-mode <RET>
  y              ; to the question about discarding undo
  M-x hexl-mode <RET>
  C-c C-c

now *scratch* has a ruler, thanks to `header-line-format' containing

   (:eval (funcall ruler-mode-ruler-function))

while `ruler-mode' is nil (so M-x ruler-mode doesn't remove it).

The second call to hexl-mode bypasses most of the hexl-mode
initialization, but runs `hexl-mode-hook', which by default contains
`hexl-activate-ruler', so the ruler is initialized again. `ruler-mode'
already has code to save header-line-format, but it seems like it
isn't dealing too well with reentering.

So, I think the bug is in ruler-mode. But, what to do? Create a stack
of previous header-line-format's? At some point the thing turns
ridiculous. In the case above, however, it is a real bug (though
harmless) because the unwary user will have a hard time removing the
ruler.

Still, shouldn't hexl-activate-ruler be a noop when the buffer is
already in hexl-mode? It is certainly possible to do

  M-x hexl-mode  ; you have a hexl ruler
  M-x ruler-mode  ; to turn it off
  M-x hexl-mode  ; you get it back

but I can't really say whether the user would expect at that point to
have a hexl ruler or not in the buffer :-)

    Juanma




--- End Message ---
--- Begin Message --- Subject: Re: M-x hexl-mode M-x hexl-mode leaves unwanted ruler Date: Wed, 30 Jun 2010 18:46:52 -0400
> The second call to hexl-mode bypasses most of the hexl-mode
> initialization, but runs `hexl-mode-hook', which by default contains
> `hexl-activate-ruler', so the ruler is initialized again. `ruler-mode'
> already has code to save header-line-format, but it seems like it
> isn't dealing too well with reentering.
>
> So, I think the bug is in ruler-mode. But, what to do? Create a stack
> of previous header-line-format's?

The solution is to avoid saving the old header-line-format if Ruler mode
is already on.  I've checked in a fix.


--- End Message ---

reply via email to

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