[literate] fix init errors, reinstate literate-elisp
This commit is contained in:
parent
359b524228
commit
dad20b4938
|
@ -7,7 +7,7 @@
|
|||
("SPC" . self-insert-command)
|
||||
("<f1> <f1>" . slime-documentation))
|
||||
:config
|
||||
(slime-setup)
|
||||
(slime-setup t)
|
||||
(setq inferior-lisp-program
|
||||
;; "/usr/bin/ecl"
|
||||
"/home/anon/bin/sbcl"
|
||||
|
@ -16,11 +16,7 @@
|
|||
(defun cp-slime-completion-in-region (_fn completions start end)
|
||||
(funcall completion-in-region-function start end completions))
|
||||
(advice-add 'slime-display-or-scroll-completions
|
||||
:around #'cp-slime-completion-in-region))
|
||||
|
||||
(use-package slime-tramp
|
||||
:load-path "/home/anon/.emacs.d/elpa/slime-20210202.1426/contrib/"
|
||||
:config
|
||||
:around #'cp-slime-completion-in-region)
|
||||
(add-to-list 'slime-filename-translations
|
||||
(slime-create-filename-translator
|
||||
:machine-instance "tilde"
|
||||
|
|
33
init.org
33
init.org
|
@ -1,11 +1,10 @@
|
|||
#+TODO: TODO WIP WISH CLEANUP FIXME REVIEW |
|
||||
#+PROPERTY: header-args :tangle yes
|
||||
|
||||
I initially tried using the literate-elisp package, but -
|
||||
1. It doesn't interoperate with =describe-*=, =helpful=, or =xref= (see https://github.com/jingtaozf/literate-elisp/issues/7 )
|
||||
2. It seems to evaluate one source block at a time, resulting in an error if I split up a form across multiple source blocks.
|
||||
=org-babel-tangle= takes nearly 27 seconds to tangle this file, at the time of writing. So for a brief while I used this sed script instead -
|
||||
# eval: (progn (make-local-variable 'after-save-hook) (add-hook 'after-save-hook (lambda () (start-process-shell-command "sed-tangle" "sed-tangle" "sed -n -e '/#+BEGIN_SRC emacs-lisp$/,/#+END_SRC$/{//!p;}' init.org > init.el"))))
|
||||
|
||||
And =org-babel-tangle= takes nearly 27 seconds to tangle this file, at the time of writing. So I went back to using =sed= - see file local variables below.
|
||||
But after ironing out [[https://github.com/jingtaozf/literate-elisp/issues/7][some issues]], I switched back to =literate-elisp=. It /does/ interoperate with the rest of Emacs, just be sure to not get any errors in your init!
|
||||
|
||||
* init.org
|
||||
** user interface
|
||||
|
@ -165,11 +164,12 @@ This needs to be before =boon=, or you get a "failed to define function ido-mini
|
|||
(bound-and-true-p slime-popup-buffer-mode)))
|
||||
(add-to-list 'boon-special-conditions var))
|
||||
(setq hi-lock-auto-select-face t)
|
||||
(define-key boon-command-map (kbd "x d f") nil)
|
||||
;; (define-key boon-command-map (kbd "x d f") nil)
|
||||
(general-def boon-command-map
|
||||
"M" 'ido-mini
|
||||
"J" 'ido-mini
|
||||
"x d" 'dired-jump)
|
||||
;; "x d" 'dired-jump
|
||||
)
|
||||
;; :hook
|
||||
;; ((text-mode . turn-on-boon-mode)
|
||||
;; (prog-mode . turn-on-boon-mode)
|
||||
|
@ -1062,10 +1062,7 @@ and eval it."
|
|||
(use-package ibuffer
|
||||
:bind
|
||||
(:map ibuffer-mode-map
|
||||
#+END_SRC
|
||||
This is basically here because Boon hijacks the x key.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
("X" . 'ibuffer-do-kill-on-deletion-marks)))
|
||||
("X" . 'ibuffer-do-kill-on-deletion-marks))) ;; Boon hijacks the x key.
|
||||
#+END_SRC
|
||||
** info
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@ -1178,7 +1175,7 @@ This is basically here because Boon hijacks the x key.
|
|||
#+END_SRC
|
||||
** Unicode keys
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; (global-unset-key (kbd "M-'"))
|
||||
(global-unset-key (kbd "M-'"))
|
||||
(general-def
|
||||
:prefix "M-'"
|
||||
"r -" [?₹]
|
||||
|
@ -1212,7 +1209,6 @@ Suggestion by lampilelo for extending =iso-transl-ctl-x-8-map= (https://dpaste.c
|
|||
version-control t)
|
||||
|
||||
#+END_SRC
|
||||
|
||||
** browse-url
|
||||
SLIME opens CLHS links in Firefox, but I'd rather open them in Tor Browser; Tor Browser, however, does not permit other applications to open tabs in a running instance. So I wrote this to copy the links automatically instead.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@ -1297,9 +1293,10 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
|
|||
(:map emacs-lisp-mode-map
|
||||
("TAB" . company-indent-or-complete-common)
|
||||
("C-i" . company-indent-or-complete-common))
|
||||
(:map c-mode-map
|
||||
("TAB" . company-indent-or-complete-common)
|
||||
("C-i" . company-indent-or-complete-common))
|
||||
;; Error (use-package): company/:catch: Symbol’s value as variable is void: c-mode-map
|
||||
;; (:map c-mode-map
|
||||
;; ("TAB" . company-indent-or-complete-common)
|
||||
;; ("C-i" . company-indent-or-complete-common))
|
||||
:config
|
||||
(add-to-list 'company-backends 'company-irony))
|
||||
|
||||
|
@ -1511,6 +1508,11 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
|
|||
#+END_SRC
|
||||
*** c
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package c-mode
|
||||
:bind (:map c-mode-map
|
||||
("TAB" . company-indent-or-complete-common)
|
||||
("C-i" . company-indent-or-complete-common)))
|
||||
|
||||
(use-package cc-mode)
|
||||
|
||||
(use-package irony-eldoc
|
||||
|
@ -1844,5 +1846,4 @@ Must put this after loading the custom file, or I get prompted about the theme e
|
|||
# nameless-current-name: "contrapunctus"
|
||||
# eval: (visual-fill-column-mode -1)
|
||||
# eval: (nameless-mode)
|
||||
# eval: (progn (make-local-variable 'after-save-hook) (add-hook 'after-save-hook (lambda () (start-process-shell-command "sed-tangle" "sed-tangle" "sed -n -e '/#+BEGIN_SRC emacs-lisp$/,/#+END_SRC$/{//!p;}' init.org > init.el"))))
|
||||
# End:
|
||||
|
|
Loading…
Reference in New Issue