1
0
Fork 0

Several fixes for ‘inbox-size’

- Make the header more robust. If we need to add more argumetns to the scsh
  command-line this will let us do that more easily in the future without having
  to change the header again.

- Don't ‘display’ the result of the call to ‘run’ because that should always be
  ‘0’, unless something went wrong. Regardless, it doesn't belong in the output
  of this program.

- Use ‘rx’ in Emacs to build the regular expression. This is easier to read,
  especially considering how many times a single ‘\’ has to be escaped (once for
  the string in scsh, and once more for the string in Emacs).
This commit is contained in:
Tom Willemse 2022-03-03 01:20:50 -08:00
parent 385176173a
commit 6e137bb1c9

View file

@ -1,6 +1,8 @@
#!/usr/bin/env -S scsh -s #!/usr/bin/env sh
;; # -*- mode: scheme; -*- # -*- mode: scheme; -*-
IFS=" "
exec scsh -s "$0" "$@"
!# !#
(display (run (emacs --quick --batch --visit ~/documents/gtd/inbox.org (run (emacs --quick --batch --visit ~/documents/gtd/inbox.org
--eval "(princ (how-many \"^\\\\* +\"))"))) --eval "(princ (how-many (rx bol \"*\" (one-or-more space))))"))