* Re: Contiguous redisplay of the menu and beeps
[not found] ` <465811AB.6080507@gmx.at>
@ 2007-05-26 13:41 ` martin rudalics
2007-05-26 14:12 ` Stephen Berman
0 siblings, 1 reply; 20+ messages in thread
From: martin rudalics @ 2007-05-26 13:41 UTC (permalink / raw)
To: martin rudalics; +Cc: emacs-pretest-bug, emacs-devel
> > In GNU Emacs 22.0.990 on Windows, the following operation causes
> > contiguous redisplay of the menu and beeps. And Emacs doesn't
> > accept any operations for a while.
> >
> > emacs -q
> > M-x html-mode ;; in the scratch buffer
> > M-x column-number-mode
> > <html></html>
> > C-u 8 C-b ;; move back the cursor on `>' of "<html>"
> > C-c C-i ;; runs the command sgml-tags-invisible
>
> In fact these are two problems: To solve the first one could specbind
> Vinhibit_point_motion_hooks to Qt before calculating the column number.
> The second is that sgml-mode shouldn't scan list forwards before a ">".
Could someone test whether this happens on non-Windows OSs too? AFAICT
the bug is (1) caused by repeatedly running a point-entered hook (but I
can't detect whether it is run by something in redisplay) and (2) hence
could be related to the table cell menu bug reported earlier by Tak Ota.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-26 13:41 ` martin rudalics
@ 2007-05-26 14:12 ` Stephen Berman
2007-05-26 14:22 ` Stephen Berman
0 siblings, 1 reply; 20+ messages in thread
From: Stephen Berman @ 2007-05-26 14:12 UTC (permalink / raw)
To: emacs-pretest-bug; +Cc: emacs-devel
On Sat, 26 May 2007 15:41:27 +0200 martin rudalics <rudalics@gmx.at> wrote:
>> > In GNU Emacs 22.0.990 on Windows, the following operation causes
>> > contiguous redisplay of the menu and beeps. And Emacs doesn't
>> > accept any operations for a while.
>> >
>> > emacs -q
>> > M-x html-mode ;; in the scratch buffer
>> > M-x column-number-mode
>> > <html></html>
>> > C-u 8 C-b ;; move back the cursor on `>' of "<html>"
>> > C-c C-i ;; runs the command sgml-tags-invisible
>>
>> In fact these are two problems: To solve the first one could specbind
>> Vinhibit_point_motion_hooks to Qt before calculating the column number.
>> The second is that sgml-mode shouldn't scan list forwards before a ">".
>
> Could someone test whether this happens on non-Windows OSs too? AFAICT
> the bug is (1) caused by repeatedly running a point-entered hook (but I
> can't detect whether it is run by something in redisplay) and (2) hence
> could be related to the table cell menu bug reported earlier by Tak Ota.
It happens for me on GNU Emacs 22.1.50.1 (i686-pc-linux-gnu, GTK+
Version 2.10.6) of 2007-04-30
Steve Berman
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-26 14:12 ` Stephen Berman
@ 2007-05-26 14:22 ` Stephen Berman
2007-05-26 14:49 ` martin rudalics
0 siblings, 1 reply; 20+ messages in thread
From: Stephen Berman @ 2007-05-26 14:22 UTC (permalink / raw)
To: emacs-pretest-bug; +Cc: emacs-devel
On Sat, 26 May 2007 16:12:04 +0200 Stephen Berman <Stephen.Berman@gmx.net> wrote:
> On Sat, 26 May 2007 15:41:27 +0200 martin rudalics <rudalics@gmx.at> wrote:
>
>>> > In GNU Emacs 22.0.990 on Windows, the following operation causes
>>> > contiguous redisplay of the menu and beeps. And Emacs doesn't
>>> > accept any operations for a while.
>>> >
>>> > emacs -q
>>> > M-x html-mode ;; in the scratch buffer
>>> > M-x column-number-mode
>>> > <html></html>
>>> > C-u 8 C-b ;; move back the cursor on `>' of "<html>"
>>> > C-c C-i ;; runs the command sgml-tags-invisible
>>>
>>> In fact these are two problems: To solve the first one could specbind
>>> Vinhibit_point_motion_hooks to Qt before calculating the column number.
>>> The second is that sgml-mode shouldn't scan list forwards before a ">".
>>
>> Could someone test whether this happens on non-Windows OSs too? AFAICT
>> the bug is (1) caused by repeatedly running a point-entered hook (but I
>> can't detect whether it is run by something in redisplay) and (2) hence
>> could be related to the table cell menu bug reported earlier by Tak Ota.
>
> It happens for me on GNU Emacs 22.1.50.1 (i686-pc-linux-gnu, GTK+
> Version 2.10.6) of 2007-04-30
That is, I get continuous beeping and Emacs consumes the CPU, but I
don't see menu redisplay. And in fact, I can stop the beeping and CPU
consumption by clicking on clicking the SGML menu and toggling tag
visibility. Clicking on the HTML menu stops the beeping but it
resumes when the menu is closed. Clicking on the other menues does
not seem to stop the beeping. I'm not sure these observations are
reliably reproducible.
Steve Berman
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-26 14:22 ` Stephen Berman
@ 2007-05-26 14:49 ` martin rudalics
2007-05-26 15:19 ` Stephen Berman
0 siblings, 1 reply; 20+ messages in thread
From: martin rudalics @ 2007-05-26 14:49 UTC (permalink / raw)
To: Stephen Berman; +Cc: emacs-devel
> That is, I get continuous beeping and Emacs consumes the CPU, but I
> don't see menu redisplay. And in fact, I can stop the beeping and CPU
> consumption by clicking on clicking the SGML menu and toggling tag
> visibility. Clicking on the HTML menu stops the beeping but it
> resumes when the menu is closed. Clicking on the other menues does
> not seem to stop the beeping. I'm not sure these observations are
> reliably reproducible.
>
> Steve Berman
What happens if you change `sgml-point-entered' to the following
non-sensical? My Emacs consumes 100% CPU and won't react to C-g.
Occasionally I can see `my-count' going up though.
(defvar my-count 0)
(defun sgml-point-entered (x y)
;; Show preceding or following hidden tag, depending of cursor direction.
(let ((inhibit-point-motion-hooks t)
(tag-string
(save-excursion
;; Strip properties, otherwise, the text is invisible.
(buffer-substring-no-properties
(point)
(if (or (and (> x y)
(not (eq (following-char) ?<)))
(and (< x y)
(eq (preceding-char) ?>)))
(condition-case nil
(backward-list)
(error (progn (message "... %s" (setq my-count (1+ my-count)))
(sit-for 1) (ding)
(point))))
(condition-case nil
(forward-list)
(error (progn (message "... %s" (setq my-count (1+ my-count)))
(sit-for 1) (ding)
(point)))))))))
(unless (string-equal tag-string "")
(message "Invisible tag: %s" tag-string))))
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-26 14:49 ` martin rudalics
@ 2007-05-26 15:19 ` Stephen Berman
2007-05-26 16:12 ` martin rudalics
0 siblings, 1 reply; 20+ messages in thread
From: Stephen Berman @ 2007-05-26 15:19 UTC (permalink / raw)
To: emacs-devel
On Sat, 26 May 2007 16:49:51 +0200 martin rudalics <rudalics@gmx.at> wrote:
> What happens if you change `sgml-point-entered' to the following
> non-sensical? My Emacs consumes 100% CPU and won't react to C-g.
> Occasionally I can see `my-count' going up though.
>
> (defvar my-count 0)
>
> (defun sgml-point-entered (x y)
> ;; Show preceding or following hidden tag, depending of cursor direction.
> (let ((inhibit-point-motion-hooks t)
> (tag-string
> (save-excursion
> ;; Strip properties, otherwise, the text is invisible.
> (buffer-substring-no-properties
> (point)
> (if (or (and (> x y)
> (not (eq (following-char) ?<)))
> (and (< x y)
> (eq (preceding-char) ?>)))
> (condition-case nil
> (backward-list)
> (error (progn (message "... %s" (setq my-count (1+ my-count)))
> (sit-for 1) (ding)
> (point))))
> (condition-case nil
> (forward-list)
> (error (progn (message "... %s" (setq my-count (1+ my-count)))
> (sit-for 1) (ding)
> (point)))))))))
> (unless (string-equal tag-string "")
> (message "Invisible tag: %s" tag-string))))
For me it's not nonsensical at all:
1. emacs -Q
2. M-x html-mode
3. M-x column-number-mode
4. eval the above defvar and defun
5. insert <html></html>
6. put the cursor on the leftmost `>'
7. C-c C-i
=> I hear two beeps, then "<html></html>" disappears and I see "... 2"
in the echo area. No further beeps or CPU consumption.
When I repeat C-c C-i the tags reappear, when I repeat C-c C-i again,
they again vanish after two beeps and the message is now "... 4". And
so on, each time incrementing by two.
Steve Berman
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-26 15:19 ` Stephen Berman
@ 2007-05-26 16:12 ` martin rudalics
0 siblings, 0 replies; 20+ messages in thread
From: martin rudalics @ 2007-05-26 16:12 UTC (permalink / raw)
To: Stephen Berman; +Cc: emacs-devel
> => I hear two beeps, then "<html></html>" disappears and I see "... 2"
> in the echo area. No further beeps or CPU consumption.
>
> When I repeat C-c C-i the tags reappear, when I repeat C-c C-i again,
> they again vanish after two beeps and the message is now "... 4". And
> so on, each time incrementing by two.
Interesting. On Windows ME this stalls somewhere in the menu-bar code.
Funnily, `table--point-entered-cell-function' would establish a direct
connection of such menu-bar behavior to repeated calls of point-entered.
I don't see anything the like in sgml-mode.
Anyway, it seems that setting point triggers `sgml-point-entered' which
sets point such that it triggers sgml-point-entered .... Such hooks
must not be allowed to set point unless they make sure that they do not
end up in text which triggers the hook again.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
@ 2007-05-27 23:21 Richard Stallman
2007-05-28 0:56 ` YAMAMOTO Mitsuharu
0 siblings, 1 reply; 20+ messages in thread
From: Richard Stallman @ 2007-05-27 23:21 UTC (permalink / raw)
To: emacs-pretest-bug; +Cc: emacs-devel
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Maybe you need to use specbind for the `current_column' call in
redisplay_internal instead.
*** src/xdisp.c.~1.1149.2.2.~ Fri May 25 11:00:00 2007
--- src/xdisp.c Sun May 27 22:48:48 2007
*************** redisplay_internal (preserve_echo_area)
*** 10888,10893 ****
--- 10888,10894 ----
Fcons (make_number (redisplaying_p), selected_frame));
++redisplaying_p;
specbind (Qinhibit_free_realized_faces, Qnil);
+ specbind (Qinhibit_point_motion_hooks, Qt);
{
Lisp_Object tail, frame;
This binds the variable across nearly all of redisplay.
That is a bit drastic as a solution; it might be right,
but it is hard to be sure.
Where is the actual call to `current_column' for which you
specifically want to bind this? Could you bind
Qinhibit_point_motion_hooks for just that?
Or what about binding it in `current_column_1'?
Maybe that is the right thing to do.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-27 23:21 Contiguous redisplay of the menu and beeps Richard Stallman
@ 2007-05-28 0:56 ` YAMAMOTO Mitsuharu
2007-05-28 2:32 ` Chong Yidong
0 siblings, 1 reply; 20+ messages in thread
From: YAMAMOTO Mitsuharu @ 2007-05-28 0:56 UTC (permalink / raw)
To: rms; +Cc: emacs-pretest-bug, MIYOSHI Masanori, emacs-devel
>>>>> On Sun, 27 May 2007 19:21:28 -0400, Richard Stallman <rms@gnu.org> said:
> Where is the actual call to `current_column' for which you
> specifically want to bind this? Could you bind
> Qinhibit_point_motion_hooks for just that?
I meant the only direct call to `current_column' from
redisplay_internal:
/* If %c is in the mode line, update it if needed. */
if (!NILP (w->column_number_displayed)
/* This alternative quickly identifies a common case
where no change is needed. */
&& !(PT == XFASTINT (w->last_point)
&& XFASTINT (w->last_modified) >= MODIFF
&& XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)
&& (XFASTINT (w->column_number_displayed)
!= (int) current_column ())) /* iftc */
w->update_mode_line = Qt;
and as I said, binding Qinhibit_point_motion_hooks just around this
part as the following patch also works for me on Mac OS X.
Could someone check if this works on Windows for the original problem?
Index: src/xdisp.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1149.2.2
diff -c -p -r1.1149.2.2 xdisp.c
*** src/xdisp.c 24 May 2007 23:21:32 -0000 1.1149.2.2
--- src/xdisp.c 28 May 2007 00:33:00 -0000
*************** redisplay_internal (preserve_echo_area)
*** 10836,10842 ****
int must_finish = 0;
struct text_pos tlbufpos, tlendpos;
int number_of_visible_frames;
! int count;
struct frame *sf;
int polling_stopped_here = 0;
--- 10836,10842 ----
int must_finish = 0;
struct text_pos tlbufpos, tlendpos;
int number_of_visible_frames;
! int count, count1;
struct frame *sf;
int polling_stopped_here = 0;
*************** redisplay_internal (preserve_echo_area)
*** 10974,10979 ****
--- 10974,10983 ----
update_mode_lines++;
}
+ /* Avoid invocation of point motion hooks by `current_column' below. */
+ count1 = SPECPDL_INDEX ();
+ specbind (Qinhibit_point_motion_hooks, Qt);
+
/* If %c is in the mode line, update it if needed. */
if (!NILP (w->column_number_displayed)
/* This alternative quickly identifies a common case
*************** redisplay_internal (preserve_echo_area)
*** 10985,10990 ****
--- 10989,10996 ----
!= (int) current_column ())) /* iftc */
w->update_mode_line = Qt;
+ unbind_to (count1, Qnil);
+
FRAME_SCROLL_BOTTOM_VPOS (XFRAME (w->frame)) = -1;
/* The variable buffer_shared is set in redisplay_window and
> Or what about binding it in `current_column_1'? Maybe that is the
> right thing to do.
Sorry, I'm afraid I'm not familiar enough with this matter.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-28 0:56 ` YAMAMOTO Mitsuharu
@ 2007-05-28 2:32 ` Chong Yidong
2007-05-28 3:11 ` YAMAMOTO Mitsuharu
2007-05-29 0:03 ` Richard Stallman
0 siblings, 2 replies; 20+ messages in thread
From: Chong Yidong @ 2007-05-28 2:32 UTC (permalink / raw)
To: emacs-devel; +Cc: emacs-pretest-bug
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> I meant the only direct call to `current_column' from
> redisplay_internal:
>
> /* If %c is in the mode line, update it if needed. */
> if (!NILP (w->column_number_displayed)
> /* This alternative quickly identifies a common case
> where no change is needed. */
> && !(PT == XFASTINT (w->last_point)
> && XFASTINT (w->last_modified) >= MODIFF
> && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)
> && (XFASTINT (w->column_number_displayed)
> != (int) current_column ())) /* iftc */
> w->update_mode_line = Qt;
>
> and as I said, binding Qinhibit_point_motion_hooks just around this
> part as the following patch also works for me on Mac OS X.
>
> Could someone check if this works on Windows for the original problem?
It fixes the bug as seen on GNU/Linux (i.e., with `debug-on-error' on,
I no longer see a `forward-list' error with original bug recipe; I
never observed the "other operations are blocked" part of the bug
report on this platform.)
Let's get this into the branch.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-28 2:32 ` Chong Yidong
@ 2007-05-28 3:11 ` YAMAMOTO Mitsuharu
2007-05-28 8:33 ` martin rudalics
2007-05-29 0:03 ` Richard Stallman
1 sibling, 1 reply; 20+ messages in thread
From: YAMAMOTO Mitsuharu @ 2007-05-28 3:11 UTC (permalink / raw)
To: Chong Yidong; +Cc: emacs-pretest-bug, emacs-devel
>>>>> On Sun, 27 May 2007 22:32:28 -0400, Chong Yidong <cyd@stupidchicken.com> said:
>> Could someone check if this works on Windows for the original
>> problem?
> It fixes the bug as seen on GNU/Linux (i.e., with `debug-on-error'
> on, I no longer see a `forward-list' error with original bug recipe;
> I never observed the "other operations are blocked" part of the bug
> report on this platform.)
> Let's get this into the branch.
Done.
Reports from Windows users still wanted.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-28 3:11 ` YAMAMOTO Mitsuharu
@ 2007-05-28 8:33 ` martin rudalics
2007-05-28 8:58 ` martin rudalics
0 siblings, 1 reply; 20+ messages in thread
From: martin rudalics @ 2007-05-28 8:33 UTC (permalink / raw)
To: YAMAMOTO Mitsuharu; +Cc: emacs-pretest-bug, Chong Yidong, emacs-devel
> Reports from Windows users still wanted.
Works here, thanks.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-28 8:33 ` martin rudalics
@ 2007-05-28 8:58 ` martin rudalics
2007-05-28 9:14 ` YAMAMOTO Mitsuharu
0 siblings, 1 reply; 20+ messages in thread
From: martin rudalics @ 2007-05-28 8:58 UTC (permalink / raw)
To: martin rudalics; +Cc: emacs-pretest-bug, Chong Yidong, emacs-devel
>> Reports from Windows users still wanted.
>
>
> Works here, thanks.
Sorry, no. With a newline after the
<html></html>
and moving down and back that line I get
sgml-point-entered: Lisp nesting exceeds `max-lisp-eval-depth'
If I define `sgml-point-entered' as
(defun sgml-point-entered (x y)
;; Show preceding or following hidden tag, depending of cursor direction.
(let ((inhibit-point-motion-hooks t)
(tag-string
(save-excursion
;; Strip properties, otherwise, the text is invisible.
(buffer-substring-no-properties
(point)
(if (or (and (> x y)
(not (eq (following-char) ?<)))
(and (< x y)
(eq (preceding-char) ?>)))
(condition-case nil
(backward-list)
(error (point)))
(condition-case nil
(forward-list)
(error (point))))))))
(unless (string-equal tag-string "")
(message "Invisible tag: %s" tag-string))))
it stalls as before with 100% CPU consumption.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-28 8:58 ` martin rudalics
@ 2007-05-28 9:14 ` YAMAMOTO Mitsuharu
2007-05-28 9:42 ` martin rudalics
2007-05-28 10:09 ` martin rudalics
0 siblings, 2 replies; 20+ messages in thread
From: YAMAMOTO Mitsuharu @ 2007-05-28 9:14 UTC (permalink / raw)
To: martin rudalics; +Cc: emacs-pretest-bug, Chong Yidong, emacs-devel
>>>>> On Mon, 28 May 2007 10:58:00 +0200, martin rudalics <rudalics@gmx.at> said:
>>> Reports from Windows users still wanted.
>>
>>
>> Works here, thanks.
> Sorry, no. With a newline after the
> <html></html>
> and moving down and back that line I get
> sgml-point-entered: Lisp nesting exceeds `max-lisp-eval-depth'
I couldn't reproduce it on Mac OS X. It only shows an error like
forward-list: Scan error: "Containing expression ends prematurely"
> If I define `sgml-point-entered' as
> (defun sgml-point-entered (x y)
> ;; Show preceding or following hidden tag, depending of cursor direction.
> (let ((inhibit-point-motion-hooks t)
> (tag-string
> (save-excursion
> ;; Strip properties, otherwise, the text is invisible.
> (buffer-substring-no-properties
> (point)
> (if (or (and (> x y)
> (not (eq (following-char) ?<)))
> (and (< x y)
> (eq (preceding-char) ?>)))
> (condition-case nil
> (backward-list)
> (error (point)))
> (condition-case nil
> (forward-list)
> (error (point))))))))
> (unless (string-equal tag-string "")
> (message "Invisible tag: %s" tag-string))))
> it stalls as before with 100% CPU consumption.
I could reproduce this, but shouldn't the above `let' be `let*'?
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-28 9:14 ` YAMAMOTO Mitsuharu
@ 2007-05-28 9:42 ` martin rudalics
2007-05-28 10:09 ` martin rudalics
1 sibling, 0 replies; 20+ messages in thread
From: martin rudalics @ 2007-05-28 9:42 UTC (permalink / raw)
To: YAMAMOTO Mitsuharu; +Cc: emacs-pretest-bug, Chong Yidong, emacs-devel
> I could reproduce this, but shouldn't the above `let' be `let*'?
My bad, let*'s ignore this.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-28 9:14 ` YAMAMOTO Mitsuharu
2007-05-28 9:42 ` martin rudalics
@ 2007-05-28 10:09 ` martin rudalics
2007-05-28 12:49 ` Chong Yidong
1 sibling, 1 reply; 20+ messages in thread
From: martin rudalics @ 2007-05-28 10:09 UTC (permalink / raw)
To: YAMAMOTO Mitsuharu; +Cc: emacs-pretest-bug, Chong Yidong, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 370 bytes --]
> I couldn't reproduce it on Mac OS X. It only shows an error like
>
> forward-list: Scan error: "Containing expression ends prematurely"
OK. To prevent this I'd apply something like the attached patch (low
priority).
We also might consider not running point-entered/-left hooks when
running a point-entered/-left hook
(as with before-/after-change-functions).
[-- Attachment #2: sgml.patch --]
[-- Type: text/plain, Size: 1444 bytes --]
*** sgml-mode.el Mon May 14 23:19:20 2007
--- sgml-mode.el Mon May 28 11:51:12 2007
***************
*** 894,911 ****
(defun sgml-point-entered (x y)
;; Show preceding or following hidden tag, depending of cursor direction.
! (let ((inhibit-point-motion-hooks t))
! (save-excursion
! (message "Invisible tag: %s"
! ;; Strip properties, otherwise, the text is invisible.
! (buffer-substring-no-properties
! (point)
! (if (or (and (> x y)
! (not (eq (following-char) ?<)))
! (and (< x y)
! (eq (preceding-char) ?>)))
! (backward-list)
! (forward-list)))))))
\f
(defun sgml-validate (command)
--- 894,917 ----
(defun sgml-point-entered (x y)
;; Show preceding or following hidden tag, depending of cursor direction.
! (let* ((inhibit-point-motion-hooks t)
! (tag-string
! (save-excursion
! ;; Strip properties, otherwise, the text is invisible.
! (buffer-substring-no-properties
! (point)
! (if (or (and (> x y)
! (not (eq (following-char) ?<)))
! (and (< x y)
! (eq (preceding-char) ?>)))
! (condition-case nil
! (backward-list)
! (error (point)))
! (condition-case nil
! (forward-list)
! (error (point))))))))
! (unless (string-equal tag-string "")
! (message "Invisible tag: %s" tag-string))))
\f
(defun sgml-validate (command)
[-- Attachment #3: Type: text/plain, Size: 161 bytes --]
_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-28 10:09 ` martin rudalics
@ 2007-05-28 12:49 ` Chong Yidong
2007-05-28 13:13 ` martin rudalics
2007-05-29 23:38 ` Davis Herring
0 siblings, 2 replies; 20+ messages in thread
From: Chong Yidong @ 2007-05-28 12:49 UTC (permalink / raw)
To: emacs-pretest-bug; +Cc: emacs-devel
martin rudalics <rudalics@gmx.at> writes:
>> I couldn't reproduce it on Mac OS X. It only shows an error like
>>
>> forward-list: Scan error: "Containing expression ends prematurely"
>
> OK. To prevent this I'd apply something like the attached patch (low
> priority).
I think it's cleaner to put the condition-case outside. Does this
work for you?
*** emacs/lisp/textmodes/sgml-mode.el.~1.121.~ 2007-05-14 10:56:30.000000000 -0400
--- emacs/lisp/textmodes/sgml-mode.el 2007-05-28 08:47:21.000000000 -0400
***************
*** 897,912 ****
;; Show preceding or following hidden tag, depending of cursor direction.
(let ((inhibit-point-motion-hooks t))
(save-excursion
! (message "Invisible tag: %s"
! ;; Strip properties, otherwise, the text is invisible.
! (buffer-substring-no-properties
! (point)
! (if (or (and (> x y)
! (not (eq (following-char) ?<)))
! (and (< x y)
! (eq (preceding-char) ?>)))
! (backward-list)
! (forward-list)))))))
\f
(defun sgml-validate (command)
--- 897,915 ----
;; Show preceding or following hidden tag, depending of cursor direction.
(let ((inhibit-point-motion-hooks t))
(save-excursion
! (condition-case nil
! (message "Invisible tag: %s"
! ;; Strip properties, otherwise, the text is invisible.
! (buffer-substring-no-properties
! (point)
! (if (or (and (> x y)
! (not (eq (following-char) ?<)))
! (and (< x y)
! (eq (preceding-char) ?>)))
! (backward-list)
! (forward-list))))
! (error nil)))))
!
\f
(defun sgml-validate (command)
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-28 12:49 ` Chong Yidong
@ 2007-05-28 13:13 ` martin rudalics
2007-05-28 14:11 ` Chong Yidong
2007-05-29 23:38 ` Davis Herring
1 sibling, 1 reply; 20+ messages in thread
From: martin rudalics @ 2007-05-28 13:13 UTC (permalink / raw)
To: Chong Yidong; +Cc: emacs-pretest-bug, emacs-devel
> I think it's cleaner to put the condition-case outside. Does this
> work for you?
Good. Eventually, someone could try to avoid theses scans when it's
easy to determine that they fail.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-28 13:13 ` martin rudalics
@ 2007-05-28 14:11 ` Chong Yidong
0 siblings, 0 replies; 20+ messages in thread
From: Chong Yidong @ 2007-05-28 14:11 UTC (permalink / raw)
To: martin rudalics; +Cc: emacs-pretest-bug, emacs-devel
martin rudalics <rudalics@gmx.at> writes:
>> I think it's cleaner to put the condition-case outside. Does this
>> work for you?
>
> Good. Eventually, someone could try to avoid theses scans when it's
> easy to determine that they fail.
I've checked it into the branch.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-28 2:32 ` Chong Yidong
2007-05-28 3:11 ` YAMAMOTO Mitsuharu
@ 2007-05-29 0:03 ` Richard Stallman
1 sibling, 0 replies; 20+ messages in thread
From: Richard Stallman @ 2007-05-29 0:03 UTC (permalink / raw)
To: Chong Yidong; +Cc: emacs-pretest-bug, emacs-devel
It fixes the bug as seen on GNU/Linux (i.e., with `debug-on-error' on,
I no longer see a `forward-list' error with original bug recipe; I
never observed the "other operations are blocked" part of the bug
report on this platform.)
Let's get this into the branch.
Yes, that is good.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Contiguous redisplay of the menu and beeps
2007-05-28 12:49 ` Chong Yidong
2007-05-28 13:13 ` martin rudalics
@ 2007-05-29 23:38 ` Davis Herring
1 sibling, 0 replies; 20+ messages in thread
From: Davis Herring @ 2007-05-29 23:38 UTC (permalink / raw)
To: Chong Yidong; +Cc: emacs-pretest-bug, emacs-devel
> --- 897,915 ----
> ;; Show preceding or following hidden tag, depending of cursor
> direction.
> (let ((inhibit-point-motion-hooks t))
> (save-excursion
> ! (condition-case nil
> ! (message "Invisible tag: %s"
> ! ;; Strip properties, otherwise, the text is invisible.
> ! (buffer-substring-no-properties
> ! (point)
> ! (if (or (and (> x y)
> ! (not (eq (following-char) ?<)))
> ! (and (< x y)
> ! (eq (preceding-char) ?>)))
> ! (backward-list)
> ! (forward-list))))
> ! (error nil)))))
> !
For utmost clarity, I'd just use `ignore-errors' here. (cl is already
used for compiling sgml-mode.el.)
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2007-05-29 23:38 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-27 23:21 Contiguous redisplay of the menu and beeps Richard Stallman
2007-05-28 0:56 ` YAMAMOTO Mitsuharu
2007-05-28 2:32 ` Chong Yidong
2007-05-28 3:11 ` YAMAMOTO Mitsuharu
2007-05-28 8:33 ` martin rudalics
2007-05-28 8:58 ` martin rudalics
2007-05-28 9:14 ` YAMAMOTO Mitsuharu
2007-05-28 9:42 ` martin rudalics
2007-05-28 10:09 ` martin rudalics
2007-05-28 12:49 ` Chong Yidong
2007-05-28 13:13 ` martin rudalics
2007-05-28 14:11 ` Chong Yidong
2007-05-29 23:38 ` Davis Herring
2007-05-29 0:03 ` Richard Stallman
[not found] <ulkfcxbvv.wl%miyoshi@meadowy.org>
[not found] ` <465811AB.6080507@gmx.at>
2007-05-26 13:41 ` martin rudalics
2007-05-26 14:12 ` Stephen Berman
2007-05-26 14:22 ` Stephen Berman
2007-05-26 14:49 ` martin rudalics
2007-05-26 15:19 ` Stephen Berman
2007-05-26 16:12 ` martin rudalics
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.