Use more completing-read in capture functions
This commit is contained in:
parent
02b0369d87
commit
2c4665ee2a
2 changed files with 36 additions and 11 deletions
19
config.org
19
config.org
|
@ -49,14 +49,21 @@ I don’t want finding files to be case-sensitive, same as in =zsh=:
|
|||
(setq read-buffer-completion-ignore-case t)
|
||||
#+END_SRC
|
||||
|
||||
Remove certain graphical elements.
|
||||
Allow typing spaces in the minibuffer.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq inhibit-startup-screen t)
|
||||
(tool-bar-mode -1)
|
||||
(unless (string-equal system-type "android")
|
||||
(scroll-bar-mode -1))
|
||||
(tooltip-mode -1)
|
||||
(define-key minibuffer-local-completion-map " " 'self-insert-command)
|
||||
(define-key minibuffer-local-must-match-map " " 'self-insert-command)
|
||||
#+END_SRC
|
||||
|
||||
Remove certain graphical elements.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq inhibit-startup-screen t)
|
||||
(tool-bar-mode -1)
|
||||
(unless (string-equal system-type "android")
|
||||
(scroll-bar-mode -1))
|
||||
(tooltip-mode -1)
|
||||
#+END_SRC
|
||||
|
||||
Make everything just a little tiny bit transparent unless I’m using the boring Windows desktop.
|
||||
|
|
|
@ -224,6 +224,24 @@
|
|||
(setq returnprogress (concat "*" bookprogress "%.* "))
|
||||
returnprogress)
|
||||
|
||||
(defun setgame ()
|
||||
"Suggest game titles from a list"
|
||||
(setq games (s-split "\n" (f-read "~/Documents/proj/trackers/gamescomplete") t))
|
||||
(setq thegame (completing-read "Title: " games))
|
||||
thegame)
|
||||
|
||||
(defun setauthor ()
|
||||
"Suggest authors from a list"
|
||||
(setq authors (s-split "\n" (f-read "~/Documents/proj/trackers/authorscomplete") t))
|
||||
(setq theauthor (completing-read "Author: " authors))
|
||||
theauthor)
|
||||
|
||||
(defun setbook ()
|
||||
"Suggest book titles from a list"
|
||||
(setq books (s-split "\n" (f-read "~/Documents/proj/trackers/bookscomplete") t))
|
||||
(setq thebook (completing-read "Title: " books))
|
||||
thebook)
|
||||
|
||||
(defun timenow ()
|
||||
"Print the current time"
|
||||
(format-time-string "%H:%M:%S"))
|
||||
|
@ -235,7 +253,7 @@
|
|||
:jump-to-captured t)
|
||||
("b" "Finished book" entry
|
||||
(file+function "" findread)
|
||||
"* %^{Author} /%^{Title}/%(therating)%(theworkbook)"
|
||||
"* %(setauthor) /%(setbook)/%(theworkbook)"
|
||||
:jump-to-captured t)
|
||||
("f" "Watched film" entry
|
||||
(file+function "" findwatched)
|
||||
|
@ -243,7 +261,7 @@
|
|||
:jump-to-captured t)
|
||||
("g" "Beat game" entry
|
||||
(file+function "" findbeaten)
|
||||
"* %^{Title} (%(setconsole))"
|
||||
"* %(setgame) (%(setconsole))"
|
||||
:jump-to-captured t)
|
||||
("m" "Musical performance" entry
|
||||
(file+function "" findperf)
|
||||
|
@ -251,7 +269,7 @@
|
|||
:jump-to-captured t)
|
||||
("n" "Gameplay progress" entry
|
||||
(file+function "" findgaming)
|
||||
"* %^{Title} (%(setconsole))\n%?"
|
||||
"* %(setgame) (%(setconsole))\n%?"
|
||||
:jump-to-captured t)
|
||||
("o" "Obtained game" entry
|
||||
(file+function "" findobtained)
|
||||
|
@ -263,7 +281,7 @@
|
|||
:jump-to-captured t)
|
||||
("r" "Reading progress" entry
|
||||
(file+function "" findreading)
|
||||
"* %^{Author} /%^{Title}/%(theworkbook)\n%(bookcalc)%?"
|
||||
"* %(setauthor) /%(setbook)/%(theworkbook)\n%(bookcalc)%?"
|
||||
:jump-to-captured t)
|
||||
("u" "Website update" entry
|
||||
(file+function "" findweb)
|
||||
|
@ -275,7 +293,7 @@
|
|||
:jump-to-captured t)
|
||||
("1" "Completed game" entry
|
||||
(file+function "" findhundred)
|
||||
"* %^{Title} (%(setconsole))"
|
||||
"* %(setgame) (%(setconsole))"
|
||||
:jump-to-captured t)))
|
||||
|
||||
(defun org-capture-today ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue