sstraust/shannonmax

org-mode not automatically set for `shannon-max-results`

Closed this issue · 4 comments

⛔ Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer #<buffer shannon-max-results> (fundamental-mode)

This prevented shannon-max-results from displaying properly, being stuck at Loading….
It loaded in Fundamental mode for me, not sure if it's because I have scratch-mode set to it.

This is great, cheers. You should have discussions enable or some contact info, wouldn't be able to tell you I appreciate this if I had no issue.

thanks!

I want to write some more automated tests before pushing new changes, so I may be a little slow to update on this, but I will work on debugging/fixing this.

I was not able to reproduce running a clean install on an ubuntu VM.

The error message means that something expects shannon-max-results to have org-mode as its major mode. It's hard for me to diagnose without a repro, but my best guess is that scratch-mode is running something that expeects its buffers to be in org-mode somehow.

Steps I used

  • Launch a new AWS Ubuntu instance

  • sudo apt update

  • sudo apt install emacs

  • get the files -- replace the git url with the URL on the branch you want to grab

  • for example, wget https://raw.githubusercontent.com/sstraust/shannonmax/refs/heads/add-unit-tests/shannon-max.el

  • and also get the jar file the same way (right click on Raw to grab the link)

  • open emacs
    follow the shannonmax docs to configure shannonmax and turn it on

  • exit emacs and restart it

  • open a file and play around in it
    do some commands

  • open the emacs-logged-keys file and verify it makes sense

  • install java

    • sudo apt install default-jre
  • run shannon-max-analyze and verify the results

i'm closing this, but feel free to re-open if you think this issue persists

i'm closing this, but feel free to re-open if you think this issue persists

Of course, I can't remember if I tried this on a "clean" emacs but I will as soon as possible.
I believed that the generated results table would require org-mode.
Thanks for your time.