Skip to content

Commit

Permalink
Merge pull request #166 from kickingvegas/merge-development-to-main-2…
Browse files Browse the repository at this point in the history
…0240805_143910

Merge development to main 20240805_143910
  • Loading branch information
kickingvegas authored Aug 5, 2024
2 parents 47d8c4f + 950c283 commit a817e29
Show file tree
Hide file tree
Showing 50 changed files with 1,650 additions and 1,022 deletions.
45 changes: 35 additions & 10 deletions README.org
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[https://melpa.org/#/casual][file:https://melpa.org/packages/casual-badge.svg]]
* Casual Calc
An opinionated [[https://github.com/magit/transient][Transient]]-based porcelain to support the casual usage of Emacs [[https://www.gnu.org/software/emacs/manual/html_mono/calc.html][Calc]].
An opinionated [[https://github.com/magit/transient][Transient]]-based user interface to support the casual usage of Emacs [[https://www.gnu.org/software/emacs/manual/html_mono/calc.html][Calc]].

[[file:docs/images/casual-calc-tmenu.png]]

Expand Down Expand Up @@ -34,16 +34,31 @@ If installed via ~list-packages~ then add this line to your Emacs initialization

If you use ~use-package~, here is the recipe for installing it.
#+begin_src elisp :lexical no
(use-package calc
:defer t)

(use-package casual-calc
:ensure t
:bind (:map calc-mode-map ("C-o" . #'casual-calc-tmenu)))
:ensure nil
:bind (:map
calc-mode-map
("C-o" . casual-calc-tmenu)
:map
calc-alg-map
("C-o" . casual-calc-tmenu)))
:after (calc))
#+end_src

Casual Calc requires Emacs 29.1+.

* Usage
1. Invoke ~M-x calc~ to launch Calc.
2. When the point is in the Calc window, invoke ~C-o~ (or a binding of your choosing) to launch the Casual Calc menu.
2. When the point is in the Calc window, invoke ~C-o~ (or a binding of your choosing) to launch the Casual Calc interface.

Once raised, the Casual Calc interface can be dismissed via:
- ~C-g~ to dismiss the current menu.
- ~C-q~ to dismiss the interface completely.

For nearly all menus, algebraic entry via the ' binding is available, as well as basic calculator operations (addition, subtraction, multiplication, division) and stack operations (pop, enter).

* Common Menu Actions
Casual Calc is built using Transient menus and as such adopts much of its default behavior.
Expand All @@ -58,7 +73,7 @@ Pressing the ~?~ key will toggle help for all the menu items. Press the key of i

Some menus have arguments (example ~--rate=~) which you can set. You can persist these settings by typing ~C-x C-s~.

** Menu item notation
Menu item notation
The following conventions are used to denote menu items.

If the label ends with a ~›~, it is a sub-menu.
Expand Down Expand Up @@ -99,12 +114,22 @@ If you enjoy using Casual Calc, consider making a modest financial contribution
[[https://www.buymeacoffee.com/kickingvegas][file:docs/images/default-yellow.png]]

* See Also
If you like Casual Calc, these other Emacs packages might interest you:
Casual Calc is part of a suite of user interfaces for different Emacs packages.

To get all current and future Casual user interfaces, please install [[https://github.com/kickingvegas/casual-suite][Casual Suite]] from [[https://melpa.org/#/casual-suite][MELPA]].

User Interfaces currently supported by Casual are listed below:

- [[https://github.com/kickingvegas/casual-isearch][Casual I-Search]] - a Transient menu for I-Search.
- [[https://github.com/kickingvegas/casual-dired][Casual Dired]] - a Transient user interface for the Dired file manager.
- [[https://github.com/kickingvegas/casual-info][Casual Info]] - a Transient user interface for Info.
- [[https://github.com/kickingvegas/casual-bookmarks][Casual Bookmarks]] - a Transient user interface for Bookmarks.
- [[https://github.com/kickingvegas/casual-ibuffer][Casual IBuffer]] - a Transient user interface for IBuffer.
- [[https://github.com/kickingvegas/casual-re-builder][Casual RE-Builder]] - a Transient user interface for RE-Builder.
- [[https://github.com/kickingvegas/casual-avy][Casual Avy]] - a Transient user interface for Avy.

Users who prefer finer grained control over package installation can install each user interface above individually.

- [[https://github.com/kickingvegas/casual-dired][Casual Dired]] - an opinionated Transient porcelain for the file manager Dired.
- [[https://github.com/kickingvegas/casual-info][Casual Info]] - an opinionated Transient porcelain for the Info reader.
- [[https://github.com/kickingvegas/casual-avy][Casual Avy]] - an opinionated Transient porcelain for Avy, a package for jumping to visible text using a char-based decision tree.
- [[https://github.com/kickingvegas/casual-isearch][Casual I-Search]] - A Transient menu for I-Search.

* Acknowledgments
A heartfelt thanks to all the contributors to Calc and Transit. Casual would not be possible without your efforts.
2 changes: 1 addition & 1 deletion docs/developer.org
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ All of the above is intended to ensure that Casual Calc releases are of high qua
- Casual Calc UX does not use the Calc /inverse/ or /hyperbolic/ key modifier.
- Calc functions requiring such modifiers are "flattened" into workflows that obviate them.
- Example: implement the menu item /arcsin/ instead of /inverse sin/.
- Rationale: Calc's support for /inverse/ and /hyperbolic/ keys is itself an emulation of Hewlett-Packard (HP) calculator behavior which was designed to compensate for its finite number of hardware buttons. As Casual Calc is a software menu porcelain, there are no such UX restrictions so it makes no effort to emulate hardware key modifiers. Furthermore, the semantics of /inverse/ and /hyperbolic/ only apply to some functions, but Calc has overused them to support functions where it semantically makes no sense (e.g. ~inverse calc-fin-fv~ to get the future value at the beginning of a payment interval). Casual Calc takes the opportunity to cease this practice.
- Rationale: Calc's support for /inverse/ and /hyperbolic/ keys is itself an emulation of Hewlett-Packard (HP) calculator behavior which was designed to compensate for its finite number of hardware buttons. As Casual Calc is a software menu user interface, there are no such UX restrictions so it makes no effort to emulate hardware key modifiers. Furthermore, the semantics of /inverse/ and /hyperbolic/ only apply to some functions, but Calc has overused them to support functions where it semantically makes no sense (e.g. ~inverse calc-fin-fv~ to get the future value at the beginning of a payment interval). Casual Calc takes the opportunity to cease this practice.
- Calc commands must be wrapped to include:
- A docstring describing its behavior and a reference section linking to:
- a Calc Info page describing the behavior of the wrapped function.
Expand Down
Binary file modified docs/images/casual-calc-tmenu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions lisp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ endif
PACKAGE_NAME=casual-calc

ELISP_INCLUDES = \
casual-calc-utils.el \
casual-calc--calc.el \
casual-calc-utils.el \
casual-calc-algebra.el \
casual-calc-predicates.el \
casual-calc-labels.el \
Expand All @@ -48,7 +48,6 @@ casual-calc-conversion.el \
casual-calc-logarithmic.el \
casual-calc-random.el \
casual-calc-rounding.el \
casual-calc-rounding.el \
casual-calc-settings.el \
casual-calc-time.el \
casual-calc-trail.el \
Expand Down
Loading

0 comments on commit a817e29

Please sign in to comment.