bugGNU TeXmacs - Bugs: bug #41021, Widget cache in tm_window_rep...


You are not allowed to post comments on this tracker with your current authentication level.

bug #41021: Widget cache in tm_window_rep always misses

Submitter:  Miguel de Benito <mdbenito>
Submitted:  Sat 28 Dec 2013 04:22:25 PM UTC
Category:  User Interface Priority:  5 - Normal
Item Group:  Error Status:  Confirmed
Privacy:  Public Assigned to:  vdhoeven
Originator Name:  Open/Closed:  Open
Release:  None Release: 
Fixed Release:  None Fixed Release: 

Sat 28 Dec 2013 04:32:49 PM UTC, comment #1: 

Use the attached patch to see that it is indeed a problem with the "raw" procedures. It is not intended as a workaround!

(file #30122)

Miguel de Benito <mdbenito>
Group Member
Sat 28 Dec 2013 04:22:25 PM UTC, original submission:  

To test:

  • Uncomment the debug messages in  tm_window_rep::get_menu_widget
  • type a backslash in a TeXmacs document
  • Move in and out of the newly created tag in order to see the focus bar change.
  • See how the cache misses constantly and grows with each cursor movement.

The reason:

The cache implemented for the toolbars in tm_window_rep::get_menu_widget uses the object returned by a scheme call to menu-expand as a key. Sometimes the object contains "raw" procedures which fail the equality test for the hash.

This happens whenever the menu being expanded contains plain buttons, i.e. when the following scheme syntax is used for a toolbar:

("some label" (some function))

This is the case in the focus-tag-menu when the focus tree has no variants (see generic-menu.scm). The expanded menu then contains "raw" procedures, as in:

("Hybrid" #<procedure #f ()>))

Even if the procedures are the same between two calls, these are not recognized by the equality operator.

Miguel de Benito <mdbenito>
Group Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #30122:  test.patch added by mdbenito (1KiB - application/octet-stream - This patch shows that it is indeed a problem with the "raw" procedures in the expanded menu)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mdbenito (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-12-28 mdbenito Attached File- Added test.patch, #30122

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code