* [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
@ 2006-08-10 1:13 Richard Stallman
2006-08-10 22:50 ` Chong Yidong
2006-08-15 23:19 ` Chong Yidong
0 siblings, 2 replies; 14+ messages in thread
From: Richard Stallman @ 2006-08-10 1:13 UTC (permalink / raw)
This bug is important to fix. It probably has to do with the recent
font-lock changes. Would someone please start working on it?
------- Start of forwarded message -------
Date: Wed, 9 Aug 2006 12:23:43 +0200 (MEST)
From: Klaus Zeitler <kzeitler@sfsws1.de.lucent.com>
To: emacs-pretest-bug@gnu.org
Subject: Buffer sometimes changes to modified with
truncate-partial-width-windows set to nil
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed
version=3.0.4
1. start emacs -Q
2. in scratch buffer evaluate the following 2 expressions
(setq ediff-split-window-function 'split-window-horizontally)
(setq truncate-partial-width-windows nil)
3. M-x ediff-files file1 file2
Now when I move (with <n> in Ediff Control Panel) from diff to diff, it's
only a matter of time till at least one of the buffers changes the
buffer-modified flag without any apparent reason.
In GNU Emacs 22.0.50.7 (sparc-sun-solaris2.8, Motif Version 2.1.0)
of 2006-08-09 on sfsws4
X server distributor `Sun Microsystems, Inc.', version 11.0.6410
configured using `configure '--with-gcc' '--prefix=/vol/freeware/SunOS-5.8/emacs/cvs' '--sharedstatedir=/vol/freeware/SunOS-5.8/emacs/cvs/share' '--with-x-toolkit=motif' '--x-includes=/usr/openwin/include:/usr/local/gnu/include:/opt/exp/gnu/include:/opt/exp/include:/opt/exp/lib/xpm/include' '--x-libraries=/usr/openwin/lib:/usr/local/gnu/lib:/opt/exp/gnu/lib:/opt/exp/lib:/opt/exp/lib/xpm/lib' '--with-pop' 'CC=gcc''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: C
locale-coding-system: nil
default-enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
<help-echo> <help-echo> <help-echo> <menu-bar> <help-menu>
<report-emacs-bug>
Recent messages:
(/usr/local/gnu/cvs/head/bin/emacs -Q)
For information about the GNU Project and its goals, type C-h C-p.
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done
_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-10 1:13 [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil] Richard Stallman
@ 2006-08-10 22:50 ` Chong Yidong
2006-08-11 6:50 ` Klaus Zeitler
2006-08-15 23:19 ` Chong Yidong
1 sibling, 1 reply; 14+ messages in thread
From: Chong Yidong @ 2006-08-10 22:50 UTC (permalink / raw)
Cc: kifer, emacs-devel
Richard Stallman <rms@gnu.org> writes:
> This bug is important to fix. It probably has to do with the recent
> font-lock changes. Would someone please start working on it?
I think Stefan fixed this already.
2006-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
* jit-lock.el (jit-lock-fontify-now): Preserve the buffer's
modification status when forcing the second redisplay.
> From: Klaus Zeitler <kzeitler@sfsws1.de.lucent.com>
> Subject: Buffer sometimes changes to modified with
> truncate-partial-width-windows set to nil
> To: emacs-pretest-bug@gnu.org
>
> 1. start emacs -Q
> 2. in scratch buffer evaluate the following 2 expressions
> (setq ediff-split-window-function 'split-window-horizontally)
> (setq truncate-partial-width-windows nil)
> 3. M-x ediff-files file1 file2
>
> Now when I move (with <n> in Ediff Control Panel) from diff to diff, it's
> only a matter of time till at least one of the buffers changes the
> buffer-modified flag without any apparent reason.
>
>
>
> In GNU Emacs 22.0.50.7 (sparc-sun-solaris2.8, Motif Version 2.1.0)
> of 2006-08-09 on sfsws4
> X server distributor `Sun Microsystems, Inc.', version 11.0.6410
> configured using `configure '--with-gcc' '--prefix=/vol/freeware/SunOS-5.8/emacs/cvs' '--sharedstatedir=/vol/freeware/SunOS-5.8/emacs/cvs/share' '--with-x-toolkit=motif' '--x-includes=/usr/openwin/include:/usr/local/gnu/include:/opt/exp/gnu/include:/opt/exp/include:/opt/exp/lib/xpm/include' '--x-libraries=/usr/openwin/lib:/usr/local/gnu/lib:/opt/exp/gnu/lib:/opt/exp/lib:/opt/exp/lib/xpm/lib' '--with-pop' 'CC=gcc''
>
> Important settings:
> value of $LC_ALL: nil
> value of $LC_COLLATE: nil
> value of $LC_CTYPE: nil
> value of $LC_MESSAGES: nil
> value of $LC_MONETARY: nil
> value of $LC_NUMERIC: nil
> value of $LC_TIME: nil
> value of $LANG: C
> locale-coding-system: nil
> default-enable-multibyte-characters: t
>
> Major mode: Lisp Interaction
>
> Minor modes in effect:
> tooltip-mode: t
> tool-bar-mode: t
> mouse-wheel-mode: t
> menu-bar-mode: t
> file-name-shadow-mode: t
> global-font-lock-mode: t
> font-lock-mode: t
> blink-cursor-mode: t
> unify-8859-on-encoding-mode: t
> utf-translate-cjk-mode: t
> auto-compression-mode: t
> line-number-mode: t
>
> Recent input:
> <help-echo> <help-echo> <help-echo> <menu-bar> <help-menu>
> <report-emacs-bug>
>
> Recent messages:
> (/usr/local/gnu/cvs/head/bin/emacs -Q)
> For information about the GNU Project and its goals, type C-h C-p.
> Loading emacsbug...
> Loading regexp-opt...done
> Loading emacsbug...done
>
>
> _______________________________________________
> emacs-pretest-bug mailing list
> emacs-pretest-bug@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
> ----------
>
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-10 22:50 ` Chong Yidong
@ 2006-08-11 6:50 ` Klaus Zeitler
2006-08-11 19:23 ` Richard Stallman
0 siblings, 1 reply; 14+ messages in thread
From: Klaus Zeitler @ 2006-08-11 6:50 UTC (permalink / raw)
Cc: rms, kifer, emacs-devel
>>>>> "Chong" == Chong Yidong <cyd@stupidchicken.com> writes:
Chong>
Chong> I think Stefan fixed this already.
Chong>
Chong> 2006-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
Chong>
Chong> * jit-lock.el (jit-lock-fontify-now): Preserve the buffer's
Chong> modification status when forcing the second redisplay.
No, it's still there. I can reproduce it easily.
Klaus
--
------------------------------------------
| Klaus Zeitler Lucent Technologies |
| Email: kzeitler@lucent.com |
------------------------------------------
---
In any formula, constants (especially those obtained
from handbooks) are to be treated as variables.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-11 6:50 ` Klaus Zeitler
@ 2006-08-11 19:23 ` Richard Stallman
0 siblings, 0 replies; 14+ messages in thread
From: Richard Stallman @ 2006-08-11 19:23 UTC (permalink / raw)
Cc: cyd, kifer, emacs-devel
Thanks. Would someone please DTRT and ack this message?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-10 1:13 [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil] Richard Stallman
2006-08-10 22:50 ` Chong Yidong
@ 2006-08-15 23:19 ` Chong Yidong
2006-08-16 7:50 ` martin rudalics
` (2 more replies)
1 sibling, 3 replies; 14+ messages in thread
From: Chong Yidong @ 2006-08-15 23:19 UTC (permalink / raw)
Cc: kifer, emacs-devel
> From: Klaus Zeitler <kzeitler@sfsws1.de.lucent.com>
> Subject: Buffer sometimes changes to modified with
> truncate-partial-width-windows set to nil
>
> 1. start emacs -Q
> 2. in scratch buffer evaluate the following 2 expressions
> (setq ediff-split-window-function 'split-window-horizontally)
> (setq truncate-partial-width-windows nil)
> 3. M-x ediff-files file1 file2
>
> Now when I move (with <n> in Ediff Control Panel) from diff to diff, it's
> only a matter of time till at least one of the buffers changes the
> buffer-modified flag without any apparent reason.
This seems to be an effect of the "orig-start" code that Stefan added
to `jit-lock-fontify-now'. The problem goes away if this chunk is
commented out. I don't know why the chunk has the effect, though; as
far as I can tell, it ought to preserve buffer modification status
since everything is wrapped in a `with-buffer-prepared-for-jit-lock'
macro. I can confirm that `buffer-modified-p' is nil when the timer
function is run:
;; The redisplay engine has already rendered the buffer up-to
;; `orig-start' and won't notice if the above jit-lock-functions
;; changed the appearance of any part of the buffer prior
;; to that. So if `start' is before `orig-start', we need to
;; cause a new redisplay cycle after this one so that any changes
;; are properly reflected on screen.
;; To make such repeated redisplay happen less often, we can
;; eagerly extend the refontified region with
;; jit-lock-after-change-extend-region-functions.
(when (< start orig-start)
(lexical-let ((start start)
(orig-start orig-start)
(buf (current-buffer)))
(run-with-timer
0 nil (lambda ()
(with-buffer-prepared-for-jit-lock
(put-text-property start orig-start
'fontified t buf))))))
Even more bizaarely, tweaking set-buffer-modified-p inside the
`with-buffer-prepared-for-jit-lock' block, as shown below, also causes
the bug to go away. By right, it should do nothing. The
set-buffer-modified-p call can be put later in `jit-lock-fontify-now',
but putting it any earlier causes the bug to resurface. Anyone have
any idea what's going on here?
*** emacs/lisp/jit-lock.el.~1.53.~ 2006-08-15 18:27:36.000000000 -0400
--- emacs/lisp/jit-lock.el 2006-08-15 19:16:50.000000000 -0400
***************
*** 368,373 ****
--- 368,375 ----
;; We mark it first, to make sure that we don't indefinitely
;; re-execute this fontification if an error occurs.
(put-text-property start next 'fontified t)
+ (set-buffer-modified-p nil)
+
(condition-case err
(run-hook-with-args 'jit-lock-functions start next)
;; If the user quits (which shouldn't happen in normal on-the-fly
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-15 23:19 ` Chong Yidong
@ 2006-08-16 7:50 ` martin rudalics
2006-08-16 11:55 ` Klaus Zeitler
` (2 more replies)
2006-08-17 15:19 ` Richard Stallman
2006-08-25 20:23 ` Richard Stallman
2 siblings, 3 replies; 14+ messages in thread
From: martin rudalics @ 2006-08-16 7:50 UTC (permalink / raw)
Cc: monnier, kifer, emacs-devel
> Even more bizaarely, tweaking set-buffer-modified-p inside the
> `with-buffer-prepared-for-jit-lock' block, as shown below, also causes
> the bug to go away. By right, it should do nothing. The
> set-buffer-modified-p call can be put later in `jit-lock-fontify-now',
> but putting it any earlier causes the bug to resurface. Anyone have
> any idea what's going on here?
Would the following handle it?
*** jit-lock.el.~1.53.~ Tue Aug 15 10:00:50 2006
--- jit-lock.el Wed Aug 16 09:40:26 2006
***************
*** 391,399 ****
(buf (current-buffer)))
(run-with-timer
0 nil (lambda ()
! (with-buffer-prepared-for-jit-lock
! (put-text-property start orig-start
! 'fontified t buf))))))
;; Find the start of the next chunk, if any.
(setq start (text-property-any next end 'fontified nil))))))))
--- 391,400 ----
(buf (current-buffer)))
(run-with-timer
0 nil (lambda ()
! (with-current-buffer buf
! (with-buffer-prepared-for-jit-lock
! (put-text-property start orig-start
! 'fontified t)))))))
;; Find the start of the next chunk, if any.
(setq start (text-property-any next end 'fontified nil))))))))
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-16 7:50 ` martin rudalics
@ 2006-08-16 11:55 ` Klaus Zeitler
2006-08-16 12:51 ` martin rudalics
2006-08-16 14:07 ` Chong Yidong
2006-08-17 15:07 ` Stefan Monnier
2 siblings, 1 reply; 14+ messages in thread
From: Klaus Zeitler @ 2006-08-16 11:55 UTC (permalink / raw)
Cc: Chong Yidong, monnier, kifer, emacs-devel
>>>>> "martin" == martin rudalics <rudalics@gmx.at> writes:
martin>
martin> Would the following handle it?
No it's still the same.
Klaus
--
------------------------------------------
| Klaus Zeitler Lucent Technologies |
| Email: kzeitler@lucent.com |
------------------------------------------
---
The Abrams' Principle:
The shortest distance between two points is off the wall.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-16 11:55 ` Klaus Zeitler
@ 2006-08-16 12:51 ` martin rudalics
0 siblings, 0 replies; 14+ messages in thread
From: martin rudalics @ 2006-08-16 12:51 UTC (permalink / raw)
Cc: Chong Yidong, monnier, kifer, emacs-devel
> martin> Would the following handle it?
>
> No it's still the same.
Could you please verify whether the scenario described by Chong _is_
responsible for the buffer modification you see. Try to set a
breakpoint somwhere within the
(when (< start orig-start)
form in jit-lock.el or insert an according message. The values of
`start', `orig-start', and `next' would interest me.
martin
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-16 7:50 ` martin rudalics
2006-08-16 11:55 ` Klaus Zeitler
@ 2006-08-16 14:07 ` Chong Yidong
2006-08-17 6:19 ` Klaus Zeitler
2006-08-17 15:07 ` Stefan Monnier
2 siblings, 1 reply; 14+ messages in thread
From: Chong Yidong @ 2006-08-16 14:07 UTC (permalink / raw)
Cc: monnier, kifer, emacs-devel
martin rudalics <rudalics@gmx.at> writes:
> Would the following handle it?
>
> (run-with-timer
> 0 nil (lambda ()
> ! (with-current-buffer buf
> ! (with-buffer-prepared-for-jit-lock
> ! (put-text-property start orig-start
> ! 'fontified t)))))))
Yes! Thanks very much for finding the problem.
Klaus Zeitler <kzeitler@lucent.com> writes:
> No it's still the same.
Did you recompile Emacs? jit-lock.el is loaded before dumping, so if
you want changes in that file to show up, you have to do a `make'
after byte compiling it.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-16 14:07 ` Chong Yidong
@ 2006-08-17 6:19 ` Klaus Zeitler
0 siblings, 0 replies; 14+ messages in thread
From: Klaus Zeitler @ 2006-08-17 6:19 UTC (permalink / raw)
Cc: martin rudalics, monnier, kifer, emacs-devel
>>>>> "Chong" == Chong Yidong <cyd@stupidchicken.com> writes:
Chong>
Chong> Did you recompile Emacs? jit-lock.el is loaded before dumping, so if
Chong> you want changes in that file to show up, you have to do a `make'
Chong> after byte compiling it.
Oops, didn't think of that. At least I thought of byte compiling it :-).
And you're right the bug is gone. Tried it a few times, no more inadvertent
changes of the modified flag.
Thanks to Martin and Chong.
Klaus
--
------------------------------------------
| Klaus Zeitler Lucent Technologies |
| Email: kzeitler@lucent.com |
------------------------------------------
---
If all else fails, immortality can always be assured
by spectacular error. -- John Kenneth Galbraith
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-16 7:50 ` martin rudalics
2006-08-16 11:55 ` Klaus Zeitler
2006-08-16 14:07 ` Chong Yidong
@ 2006-08-17 15:07 ` Stefan Monnier
2 siblings, 0 replies; 14+ messages in thread
From: Stefan Monnier @ 2006-08-17 15:07 UTC (permalink / raw)
Cc: Chong Yidong, kifer, emacs-devel
> ! (with-buffer-prepared-for-jit-lock
> ! (put-text-property start orig-start
> ! 'fontified t buf))))))
> --- 391,400 ----
> ! (with-current-buffer buf
> ! (with-buffer-prepared-for-jit-lock
> ! (put-text-property start orig-start
> ! 'fontified t)))))))
Thanks once more for fixing my sloppy code,
Stefan
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-15 23:19 ` Chong Yidong
2006-08-16 7:50 ` martin rudalics
@ 2006-08-17 15:19 ` Richard Stallman
2006-08-25 20:23 ` Richard Stallman
2 siblings, 0 replies; 14+ messages in thread
From: Richard Stallman @ 2006-08-17 15:19 UTC (permalink / raw)
Cc: Chong Yidong, kifer, emacs-devel
> 1. start emacs -Q
> 2. in scratch buffer evaluate the following 2 expressions
> (setq ediff-split-window-function 'split-window-horizontally)
> (setq truncate-partial-width-windows nil)
> 3. M-x ediff-files file1 file2
>
> Now when I move (with <n> in Ediff Control Panel) from diff to diff, it's
> only a matter of time till at least one of the buffers changes the
> buffer-modified flag without any apparent reason.
This seems to be an effect of the "orig-start" code that Stefan added
to `jit-lock-fontify-now'. The problem goes away if this chunk is
commented out.
Stefan, are you going to fix this?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-15 23:19 ` Chong Yidong
2006-08-16 7:50 ` martin rudalics
2006-08-17 15:19 ` Richard Stallman
@ 2006-08-25 20:23 ` Richard Stallman
2006-08-26 0:03 ` Stefan Monnier
2 siblings, 1 reply; 14+ messages in thread
From: Richard Stallman @ 2006-08-25 20:23 UTC (permalink / raw)
Cc: Chong Yidong, kifer, emacs-devel
Is this fixed now?
> 1. start emacs -Q
> 2. in scratch buffer evaluate the following 2 expressions
> (setq ediff-split-window-function 'split-window-horizontally)
> (setq truncate-partial-width-windows nil)
> 3. M-x ediff-files file1 file2
>
> Now when I move (with <n> in Ediff Control Panel) from diff to diff, it's
> only a matter of time till at least one of the buffers changes the
> buffer-modified flag without any apparent reason.
This seems to be an effect of the "orig-start" code that Stefan added
to `jit-lock-fontify-now'. The problem goes away if this chunk is
commented out.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil]
2006-08-25 20:23 ` Richard Stallman
@ 2006-08-26 0:03 ` Stefan Monnier
0 siblings, 0 replies; 14+ messages in thread
From: Stefan Monnier @ 2006-08-26 0:03 UTC (permalink / raw)
Cc: Chong Yidong, kifer, emacs-devel
> Is this fixed now?
AFAIK: yes.
Stefan
>> 1. start emacs -Q
>> 2. in scratch buffer evaluate the following 2 expressions
>> (setq ediff-split-window-function 'split-window-horizontally)
>> (setq truncate-partial-width-windows nil)
>> 3. M-x ediff-files file1 file2
>>
>> Now when I move (with <n> in Ediff Control Panel) from diff to diff, it's
>> only a matter of time till at least one of the buffers changes the
>> buffer-modified flag without any apparent reason.
> This seems to be an effect of the "orig-start" code that Stefan added
> to `jit-lock-fontify-now'. The problem goes away if this chunk is
> commented out.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2006-08-26 0:03 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-10 1:13 [kzeitler@sfsws1.de.lucent.com: Buffer sometimes changes to modified with truncate-partial-width-windows set to nil] Richard Stallman
2006-08-10 22:50 ` Chong Yidong
2006-08-11 6:50 ` Klaus Zeitler
2006-08-11 19:23 ` Richard Stallman
2006-08-15 23:19 ` Chong Yidong
2006-08-16 7:50 ` martin rudalics
2006-08-16 11:55 ` Klaus Zeitler
2006-08-16 12:51 ` martin rudalics
2006-08-16 14:07 ` Chong Yidong
2006-08-17 6:19 ` Klaus Zeitler
2006-08-17 15:07 ` Stefan Monnier
2006-08-17 15:19 ` Richard Stallman
2006-08-25 20:23 ` Richard Stallman
2006-08-26 0:03 ` Stefan Monnier
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.