lifelike / decide-mode

Random decisions for emacs, with functions and a minor mode. Roll various types of dice etc.
49 stars 12 forks source link

Decide tables not working #12

Closed weshmashian closed 5 years ago

weshmashian commented 5 years ago

I was happy to find decide-mode, and it looks great, however, it seems that the decide tables are just not working for me.

The following is verbatim output of ?t (decide-from-table) commands:

[<example-dragon>] -> dragon
[<example-dragon>] -> example-dragon-prefix~dragon
[<example-monster>] -> 2>>5 small goblins
[<example-monster>] -> 3d6+1 kobolds
[<card>] -> card-rank card-suit
[<card>] -> card-rank card-suit

After looking at the code for a while, it seems to me that decide-choose-from-table-list function is never called, and therefore the results are never being checked against existing tables.

For example, evaluating (decide-choose-from-table-list "card-rank card-suit"), or even (decide-choose-from-table-list "3d6+1 kobolds") will return the expected result.

Emacs version: GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)

lifelike commented 5 years ago

I just tried it (in 25.2.1) and see the issue as well. Thanks for reporting! Will have a look right away and see if I can push a fix for this.

Not great QA here on the last version (since I have mostly used an older version, as the most recent commit on master broke decide-mode on emacs24 that one of my computers still run).

lifelike commented 5 years ago

Pushed a fix for this. There was indeed a call to decide-choose-from-table-list that was missing! Thanks for also pointing out exactly what to look for.

I generated a large number of example-dragon, example-monster, and card, and saw no errors.

weshmashian commented 5 years ago

Awesome, thanks! Just tested it and works as expected.