re-run serveral lines from history

Issue #687 new
Christian Kuhlmann created an issue

Since speedcrunch does not support multiple calculations per line (which is fine for a calculator IMHO), it would be great if several history lines could be executed at once. I imagine it could work like this:

  1. select several lines from the history panel (which should allow multi-select) by using either shift or ctrl + click to select them
  2. right click: a context menu should appear which allows to run the selected lines
  3. speedcrunch should execute the selected lines one after another (oldest to newest) and show the results for each without any further user interaction. It may either halt on error or skip error lines (preferred)

This could be further enhanced by creating "snippets" from several history lines, which can also be run (similar to saved history files, but stored in the session and therefore easier to access). This would simplify repetitive calculations that lead to multiple result values (e.g. give a radius, calculate both area and circumference)

Comments (4)

  1. Helder Correia repo owner

    Hi @CKuhlmann. It is possible to copy, say:

    sin(pi)
    cos(pi)
    tan(pi)
    

    into the editor at once and have it all calculated in one go. Is this what you need?

  2. Christian Kuhlmann reporter

    Hi Helder, it's good to know that the parser splits strings at newline chars. However, this requires the extra step of preparing those lines e.g. in a text document. I'd like to have the ability to create such a list from several history items. The reasoning is that I need intermediate results and therefore cannot inline all the calculations into one line.

    Maybe as a first step the history panel could be enhanced to export all selected lines as a new-line delimited list to the clipboard. Then I could either paste them in the editor or a separate document. It's rather tedious to copy the entries one by one.

  3. Log in to comment