[Emacs] Better keybind generation with noweb
This commit is contained in:
parent
848162b3c7
commit
f04293d664
@ -70,7 +70,7 @@ doing this:
|
|||||||
I don’t understand why some people add two spaces behind a full stop,
|
I don’t understand why some people add two spaces behind a full stop,
|
||||||
I sure don’t. Let’s tell Emacs.
|
I sure don’t. Let’s tell Emacs.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq sentence-end-double-space nil)
|
(setq-default sentence-end-double-space nil)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
There is a minor mode in Emacs which allows to have a finer way of
|
There is a minor mode in Emacs which allows to have a finer way of
|
||||||
@ -698,43 +698,47 @@ prefix them with a comma (I’ve taken this habit from Spacemacs).
|
|||||||
#+header: :tangle no :exports none :results value :cache yes
|
#+header: :tangle no :exports none :results value :cache yes
|
||||||
#+begin_src emacs-lisp :var table=mu4e-keybindings-view-tbl
|
#+begin_src emacs-lisp :var table=mu4e-keybindings-view-tbl
|
||||||
(mapconcat (lambda (line)
|
(mapconcat (lambda (line)
|
||||||
(let ((key (car line))
|
(let* ((key (car line))
|
||||||
(function (cadr line))
|
(function (cadr line))
|
||||||
(comment (caddr line)))
|
(function (if (or (string= "nil" function)
|
||||||
|
(string= "" function))
|
||||||
|
":ignore"
|
||||||
|
function))
|
||||||
|
(comment (caddr line)))
|
||||||
(format "\"%s\" %s" key
|
(format "\"%s\" %s" key
|
||||||
(if (string= "" comment)
|
(if (string= "" comment)
|
||||||
(if (string= "nil" function)
|
(if (string= "nil" function)
|
||||||
"nil"
|
"nil"
|
||||||
(concat "#'" function))
|
(concat "#'" function))
|
||||||
(format "'(%s :wk \"%s\")"
|
(format "'(%s :which-key \"%s\")"
|
||||||
function
|
function
|
||||||
(if (string= "" function)
|
(if (string= "" function)
|
||||||
"nil"
|
"nil"
|
||||||
comment))))))
|
comment))))))
|
||||||
table
|
table
|
||||||
"\n")
|
"\n")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+RESULTS[daed5b240a2fd64608b66fc9bf38bb73f1d90db2]: general-keybindings-gen
|
#+RESULTS[fa2948b693499edc6458f60c46357955b8ace1fb]: general-keybindings-gen
|
||||||
#+begin_example
|
#+begin_example
|
||||||
"&" #'mu4e-view-pipe
|
"&" #'mu4e-view-pipe
|
||||||
"." '(mu4e-headers-split-adjust-width/body :wk "mu4e-headers width")
|
"." '(mu4e-headers-split-adjust-width/body :which-key "mu4e-headers width")
|
||||||
"a" '(nil :wk "attachments")
|
"a" '(:ignore :which-key "attachments")
|
||||||
"a&" #'mu4e-view-pipe-attachment
|
"a&" #'mu4e-view-pipe-attachment
|
||||||
"aa" #'mu4e-view-attachment-action
|
"aa" #'mu4e-view-attachment-action
|
||||||
"ao" #'mu4e-view-open-attachment
|
"ao" #'mu4e-view-open-attachment
|
||||||
"aO" #'mu4e-view-open-attachment-with
|
"aO" #'mu4e-view-open-attachment-with
|
||||||
"c" '(nil :wk "compose")
|
"c" '(:ignore :which-key "compose")
|
||||||
"cc" #'mu4e-compose-new
|
"cc" #'mu4e-compose-new
|
||||||
"ce" #'mu4e-compose-edit
|
"ce" #'mu4e-compose-edit
|
||||||
"cf" #'mu4e-compose-forward
|
"cf" #'mu4e-compose-forward
|
||||||
"cr" #'mu4e-compose-reply
|
"cr" #'mu4e-compose-reply
|
||||||
"cR" #'mu4e-compose-resend
|
"cR" #'mu4e-compose-resend
|
||||||
"g" '(nil :wk "go to")
|
"g" '(:ignore :which-key "go to")
|
||||||
"gu" #'mu4e-view-go-to-url
|
"gu" #'mu4e-view-go-to-url
|
||||||
"gX" #'mu4e-view-fetch-url
|
"gX" #'mu4e-view-fetch-url
|
||||||
"l" #'mu4e-show-log
|
"l" #'mu4e-show-log
|
||||||
"m" '(nil :wk "mark")
|
"m" '(:ignore :which-key "mark")
|
||||||
"md" #'mu4e-view-mark-for-trash
|
"md" #'mu4e-view-mark-for-trash
|
||||||
"mD" #'mu4e-view-mark-for-delete
|
"mD" #'mu4e-view-mark-for-delete
|
||||||
"mm" #'mu4e-view-mark-for-move
|
"mm" #'mu4e-view-mark-for-move
|
||||||
@ -742,8 +746,8 @@ prefix them with a comma (I’ve taken this habit from Spacemacs).
|
|||||||
"mR" #'mu4e-view-mark-for-read
|
"mR" #'mu4e-view-mark-for-read
|
||||||
"mu" #'mu4e-view-mark-for-unread
|
"mu" #'mu4e-view-mark-for-unread
|
||||||
"mU" #'mu4e-view-mark-for-unmark
|
"mU" #'mu4e-view-mark-for-unmark
|
||||||
"t" '(nil :wk "thread")
|
"t" '(:ignore :which-key "thread")
|
||||||
"T" '(nil :wk "toggle")
|
"T" '(:ignore :which-key "toggle")
|
||||||
"Tc" #'mu4e-view-toggle-hide-cited
|
"Tc" #'mu4e-view-toggle-hide-cited
|
||||||
"Th" #'mu4e-view-toggle-html
|
"Th" #'mu4e-view-toggle-html
|
||||||
"n" #'mu4e-view-headers-next
|
"n" #'mu4e-view-headers-next
|
||||||
|
Loading…
Reference in New Issue
Block a user