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

Submitted by:  Miguel de Benito <mdbenito>
Submitted on:  Sat 28 Dec 2013 04:22:25 PM UTC  
Category:  User Interface Priority:  5 - Normal
Item Group:  Error Status:  Confirmed
Privacy:  Public Assigned to:  Joris van der Hoeven <vdhoeven>
Originator Name:  Open/Closed:  Open
Release:  Release:  None
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>
Project 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>
Project Member


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)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    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.5