all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* major mode changes increments buffer-modified-tick
@ 2008-09-30 19:52 Lennart Borgman (gmail)
  2008-09-30 20:21 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 4+ messages in thread
From: Lennart Borgman (gmail) @ 2008-09-30 19:52 UTC (permalink / raw)
  To: Emacs Devel

Why? (I am looking for a subtle bug and wonder if something is wrong here.)




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: major mode changes increments buffer-modified-tick
  2008-09-30 19:52 major mode changes increments buffer-modified-tick Lennart Borgman (gmail)
@ 2008-09-30 20:21 ` Lennart Borgman (gmail)
  2008-09-30 21:40   ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 4+ messages in thread
From: Lennart Borgman (gmail) @ 2008-09-30 20:21 UTC (permalink / raw)
  To: Emacs Devel

Lennart Borgman (gmail) wrote:
> Why? (I am looking for a subtle bug and wonder if something is wrong here.)

The bug I am hunting is that buffer get modified status when I jump to a
new location. At the same time I get the following entry in undo list:

  buffer-undo-list is a variable defined in `buffer.c'.
  Its value is
  (nil
   (t 18654 . 5897))

The doc for buffer-undo-list says

  An entry (t HIGH . LOW) indicates that the buffer previously had
  "unmodified" status.  HIGH and LOW are the high and low 16-bit portions
  of the visited file's modification time, as of that time.  If the
  modification time of the most recent save is different, this entry is
  obsolete.

Now (visited-file-modtime) gives just these figures.

If I do the same jump again I get a new similar entry (or entries, there
is a nil too):

  buffer-undo-list is a variable defined in `buffer.c'.
  Its value is
  (nil
   (t 18654 . 5897)
   nil
   (t 18654 . 5897))

But this does not happen just when jumping. It happens with mumamo, and
I think it is only if there is a call to (top-level) in a timer before this.

This is starting to look like a bug report ... - but I am not sure where
yet, in mumamo or Emacs.

Here is how I reproduce it:

I open the file nxhtml.html (which comes with nXhtml).

- Go to line 10 (which is a css-mode chunk)
- Go to line 1 (which is a html-mode chunk)
- Go to line 165 (which is another html-mode chunk)

Before moving from a chunk I wait until the major mode has been set in
the chunk. In this case there is a call to top-level after the major
mode has been set in the chunk.

The buffer does not get modified status if I instead do step 3 quickly,
before the timer that changes the major mode jumps in. In this case the
major mode is instead changed in pre-command-hook. In this case the call
to top-level is not done.

So I am leaning towards that there is something strange with top-level
and timers.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: major mode changes increments buffer-modified-tick
  2008-09-30 20:21 ` Lennart Borgman (gmail)
@ 2008-09-30 21:40   ` Lennart Borgman (gmail)
  2008-09-30 23:02     ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 4+ messages in thread
From: Lennart Borgman (gmail) @ 2008-09-30 21:40 UTC (permalink / raw)
  To: Emacs Devel

Lennart Borgman (gmail) wrote:
> Lennart Borgman (gmail) wrote:
>> Why? (I am looking for a subtle bug and wonder if something is wrong here.)
> 
> The bug I am hunting is that buffer get modified status when I jump to a
> new location. At the same time I get the following entry in undo list:
...
> So I am leaning towards that there is something strange with top-level
> and timers.


Eh, and that was wrong. Timers and top-level are not involved. Probably
something with mumamo ...




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: major mode changes increments buffer-modified-tick
  2008-09-30 21:40   ` Lennart Borgman (gmail)
@ 2008-09-30 23:02     ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 4+ messages in thread
From: Lennart Borgman (gmail) @ 2008-09-30 23:02 UTC (permalink / raw)
  To: Emacs Devel

Lennart Borgman (gmail) wrote:
> Lennart Borgman (gmail) wrote:
>> Lennart Borgman (gmail) wrote:
>>> Why? (I am looking for a subtle bug and wonder if something is wrong here.)
>> The bug I am hunting is that buffer get modified status when I jump to a
>> new location. At the same time I get the following entry in undo list:
> ...
>> So I am leaning towards that there is something strange with top-level
>> and timers.
> 
> 
> Eh, and that was wrong. Timers and top-level are not involved. Probably
> something with mumamo ...

Yes, it was a bug in mumamo. A forgotten remove-text-properties that was
not protected. Sigh and sorry for the noise.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-09-30 23:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-30 19:52 major mode changes increments buffer-modified-tick Lennart Borgman (gmail)
2008-09-30 20:21 ` Lennart Borgman (gmail)
2008-09-30 21:40   ` Lennart Borgman (gmail)
2008-09-30 23:02     ` Lennart Borgman (gmail)

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.