Skip to content

Commit

Permalink
Merge pull request #2 from positron-solutions/dual-hook-high-performance
Browse files Browse the repository at this point in the history
Dual hook high performance
  • Loading branch information
psionic-k authored Nov 17, 2023
2 parents 74b7bd8 + 642ec38 commit 03df232
Show file tree
Hide file tree
Showing 5 changed files with 474 additions and 143 deletions.
31 changes: 24 additions & 7 deletions .github/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
description = "This flake provides CI & local development dependencies";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=release-22.11";
nixpkgs.url = "github:nixos/nixpkgs?ref=release-23.05";
flake-utils.url = "github:numtide/flake-utils";
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
Expand All @@ -42,7 +42,7 @@

emacsPackages = [
"emacs"
"emacsGit" # to see changes in upstreams
"emacs29" # to see changes in upstreams
];

devShells = pkgs.lib.genAttrs emacsPackages (emacsPkg:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
emacsPkg: [ emacs, emacsGit ]
emacsPkg: [ emacs, emacs29 ]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -58,10 +58,10 @@ jobs:
# Linting the package is less useful on multiple version. Modify the
# logic if you wish to expand lint coverage.
- name: lint package
if: matrix.emacsPkg == 'emacs'
if: matrix.emacsPkg == 'emacs29'
run: |
eval "$(nix print-dev-env \
--override-input nixpkgs github:nixos/nixpkgs/release-22.11 \
--override-input nixpkgs github:nixos/nixpkgs/release-23.05 \
--update-input emacs-overlay \
.github#${{ matrix.emacsPkg }})"
Expand All @@ -71,7 +71,7 @@ jobs:
- name: load package
run: |
eval "$(nix print-dev-env \
--override-input nixpkgs github:nixos/nixpkgs/release-22.11 \
--override-input nixpkgs github:nixos/nixpkgs/release-23.05 \
--update-input emacs-overlay \
.github#${{ matrix.emacsPkg }})"
Expand Down
51 changes: 28 additions & 23 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#+HTML: <a href="https://github.com/positron-solutions/command-log/actions/?workflow=CI"><img src="https://github.com/positron-solutions/command-log/actions/workflows/ci.yml/badge.svg" alt="CI workflow status"></a>
#+HTML: <a href="https://github.com/positron-solutions/command-log/actions/?workflow=Developer+Certificate+of+Origin"><img src="https://github.com/positron-solutions/command-log/actions/workflows/dco.yml/badge.svg" alt="DCO Check"></a>

Please see the [[https://github.com/tarsius/keycast/tree/master][keycast]] package, which has options to display in a posframe,
headline, or modeline. It's a pretty well written package. This package was
started to clean up the [[https://github.com/lewang/command-log-mode][command-log-mode]] package that is still ranking highly in
a lot of search results.
Please see the [[https://github.com/tarsius/keycast/tree/master][keycast]] and [[https://github.com/chuntaro/emacs-keypression][keypression]] package, which has options to display in
a posframe, headline, or modeline. It's a pretty well written package. This
package was forked to clean up the [[https://github.com/lewang/command-log-mode][command-log-mode]] package that is still
ranking highly in a lot of search results.

** What it do?

Expand All @@ -28,17 +28,16 @@ a lot of search results.
should support pointing at specific repositories) to use this repo.

#+begin_src elisp
;; using elpaca (recommended to add a hash for reproducibility)
(use-package
:elpaca (command-log
:host github
:repo "positron-solutions/command-log"))

;; using straight use-package with custom recipe
(use-package command-log
:straight '(command-log
:type git :host github :repo "positron-solutions/command-log"))

;; using elpaca (recommended to add a hash for reproducibility)
(elpaca-use-package
(command-log :host github
:repo "positron-solutions/command-log"))

#+end_src

** How do I use it?
Expand All @@ -49,29 +48,35 @@ a lot of search results.
Customize the =command-log= group for more options.

#+begin_src elisp

(use-package command-log
:custom
(command-log-window-text-scale 2 "Command log two steps higher text scale")
(command-log-logging-shows-buffer t "Toggling will show the buffer.")
(command-log-hiding-disables-logging t "Toggling visible buffer turns off logging.")
(command-log-disabling-logging-kills-buffer t "The buffer will be new when displayed again.")
(command-log-log-globally t "Auto-enable with global minor mode (including minibuffer)")
(command-log-filter-commands '(self-insert-command) "Be chatty.
Show everything besides self-insert-command"))

:config
(setopt command-log-filter-commands '(self-insert-command) ; commands you don't care about
(setopt command-log-mouse t)
(setopt command-log-text t) ; print strings rather than streams of `self-insert-command'.

(setopt command-log-merge-repeats t) ; show repeat counts without making new entries
;; This following option and some related options can be powerful for
;; revealing how commands are delegating out to other commands, such as M-x
;; and ivy. Read the docs ;-)
(setopt command-log-merge-repeat-targets 'post-command)
#+end_src

You can reveal all commands by running [M-x]
=command-log-toggle-show-all-commands=.
*** Unveiling More Details

You can reveal all commands temporarily by running [M-x]
~command-log-toggle-show-all~. It overrides several behaviors to try to reveal
more.

There is also ~command-log-tail-dribble~ if you need to see your inputs for
debugging. Don't forget about simple ~view-lossage~ and refreshing with =g=.

Commands to toggle buffer showing and to turn everything off without doing it
on every toggle are sorely needed. PR's welcome!

** License

All post-fork work is GPL licensed. This increasingly covers most of the
package. The CI is MIT licensed for ease of use. See [[./CONTRIBUTING.org][CONTRIBUTING.org]] for
package. The CI is MIT licensed for convenience. See [[./CONTRIBUTING.org][CONTRIBUTING.org]] for
information about submitting changes correctly.

This package is a fork of [[http://www.foldr.org/~michaelw/emacs/mwe-log-commands.el][mwe-log-commands.el]] by Michael Weber
Expand Down
Loading

0 comments on commit 03df232

Please sign in to comment.