Opened 14 years ago

Closed 14 years ago

#314 closed defect (fixed)

Duplication of some special messages

Reported by: Makarius Owned by: David Aspinall
Priority: major Milestone: PG-Emacs-4.0
Component: 2:pg-emacs Keywords:
Cc: krauss@…

Description

Special messages, such as priority ones, but probably also tracing, are often duplicated in the output. The *isabelle* buffer contains messages only once, as expected.

This has been reported on Ubuntu with Emacs 23, but also other combinations.

Change History (7)

comment:1 Changed 14 years ago by David Aspinall

Can you provide a test case?

comment:2 Changed 14 years ago by David Aspinall

Resolution: needmoreinfo
Status: newclosed

comment:3 Changed 14 years ago by Alexander Krauss

Cc: krauss@… added
Resolution: needmoreinfo
Status: closedreopened

Test case:

  • Load the theory "$ISABELLE_HOME/src/HOL/Library/Fundamental_Theorem_Algebra.thy" (as of Isabelle 2009-1)
  • Do "Next" three times (the third one actually processes the theory header)

-> In the response buffer, the message 'Loading theory "Polynomial"' appears multiple times (5 times for me), but it should only appear once.

I have this behaviour in many situations with different theories, so this is just an example, and there is nothing special with these concrete theories.

Observed with PG CVS 2009-12-07 12:24 both with and without the patch you send to us last Friday. GNU Emacs 23.1.1 on Debian

comment:4 Changed 14 years ago by Alexander Krauss

I noticed now that this behaviour does *not* occur with Isabelle 2009. So there may actually be a change in Isabelle which causes this...

comment:6 Changed 14 years ago by Makarius

The above test case works by accident in Isabelle2009, because the warning messages produced by the loaded theory are slightly different.

The following diff applied to Isabelle2009 will reproduce the same problem for the example of Fundamental_Theorem_Algebra.thy above:

diff -r 5c8618f95d24 src/Pure/Isar/code_unit.ML
--- a/src/Pure/Isar/code_unit.ML	Thu Apr 16 17:29:56 2009 +0200
+++ b/src/Pure/Isar/code_unit.ML	Mon May 17 17:33:09 2010 +0200
@@ -61,7 +61,7 @@
 fun bad_thm msg = raise BAD_THM msg;
 fun error_thm f thm = f thm handle BAD_THM msg => error msg;
 fun warning_thm f thm = SOME (f thm) handle BAD_THM msg
-  => (warning ("code generator: " ^ msg); NONE);
+  => NONE;
 fun try_thm f thm = SOME (f thm) handle BAD_THM _ => NONE;
 
 fun string_of_typ thy = setmp show_sorts true (Syntax.string_of_typ_global thy);

Platform note: Mac OS Snow Leopard, Aquamacs 2.0, Poly/ML 5.2.1.

comment:7 Changed 14 years ago by David Aspinall

Status: reopenedaccepted

Repeated, thanks for info. Experimental fix in CVS head.

comment:8 Changed 14 years ago by David Aspinall

Resolution: fixed
Status: acceptedclosed

Fix confirmed by a second person, so closing now.

Note: See TracTickets for help on using tickets.