kickingvegas / casual

A collection of opinionated keyboard-driven user interfaces for various built-in Emacs modes.
GNU General Public License v3.0
11 stars 2 forks source link

Support calc-user-define-formula #31

Open Gallipo opened 7 months ago

Gallipo commented 7 months ago

Under the prefix keys Z and z there are a variety of useful but not very accessible functions. Support would be great.

kickingvegas commented 7 months ago

@Gallipo - Thanks for the input! Will consider this enhancement but also wonder if this is out-of-bounds with the stated design intent of Casual as programming is such an advanced feature. If work is to proceed on this front, it will likely be far ahead on the roadmap.

kickingvegas commented 5 months ago

@Gallipo No promises, but starting to explore Calc user-defined formulas. One thing that seems broken is calc-user-define-permanent (“Z-P”) which keeps you from persisting a user-defined formula in Emacs 29.3. Do you also see this?

kickingvegas commented 5 months ago

Sent following bug report to bug-gnu-emacs@gnu.org. I consider this to be a blocker to supporting user-defined functions in Casual.

Title

Calc function calc-user-define-permanent broken in 29.3

Description

In Calc, invoking calc-user-define-permanent (binding “Z-P”) does not persist a user-defined formula.

Environment

Emacs: 29.3 OS: macOS 14.5, Ubuntu 22.04.4 LTS

Steps to Reproduce

  1. Enter “emacs -Q” on the command line.
  2. Enter “M-x calc” to start Calc.
  3. Enter the algebraic expression “‘3 x + 7”.
  4. Enter “Z-F” to user-define a formula.
    1. Enter “1” for the user key.
    2. Enter “f1” for the command name.
    3. Enter RET to default use the command name (“f1”).
    4. Enter RET to accept the default argument list (“(x)”).
    5. Enter “y” to leave it symbolic for non-constant arguments.
  5. Enter “Z-P” to make permanent (persist) the user-defined formula.

Expected Result

The calc.el file in the Emacs init configuration directory should be modified holding the persisted user-defined formula “f1”.

Actual Result

The calc.el file is unchanged.

kickingvegas commented 5 months ago

So, it turns out I was holding calc-user-define-permanent wrong. I was pressing RET instead of specifying a key binding.

The good news: This issue is not blocked. The bad news: calc-user-define-permanent is a dumb command because it forces you specify each user-defined function you want to save. This is onerous if you have many user defined functions.