Add posts repository to website project
This doesn't belong with the usual publish actions, so exclude posts from being published.
This commit is contained in:
parent
dd6442dd8e
commit
7bdefe9504
3 changed files with 28 additions and 1 deletions
1
posts/README.org
Normal file
1
posts/README.org
Normal file
|
@ -0,0 +1 @@
|
|||
These posts are not a normal part of the website project. They are not published by the org publish functions, they use [[https://git.sr.ht/~ryuslash/tekuti-el][tekuti-el]] to post to my blog at https://blog.ryuslash.org.
|
26
posts/paredit-and-ielm.org
Normal file
26
posts/paredit-and-ielm.org
Normal file
|
@ -0,0 +1,26 @@
|
|||
#+TITLE: IELM & Paredit
|
||||
#+TAGS: emacs
|
||||
#+COMMENT_STATUS: closed
|
||||
#+STATUS: publish
|
||||
#+DATE: Wed, 12 Apr 2023 07:02:45 GMT
|
||||
#+UPDATE_URL: /admin/modify-post/2023%252f04%252f12%252fielm-paredit
|
||||
|
||||
For a while I've been bothered by being unable to use IELM to evaluate Emacs Lisp expressions. Then [[https://www.n16f.net/blog/making-ielm-more-comfortable/][Making IELM More Comfortable]] pointed out that using paredit in IELM causes the =RET= and =C-j= keybindings to be bound to the wrong functions and proposes to fix them. The given fix, however, appears to change the keybindings for all buffers using paredit. I don't want that, and Emacs can do better!
|
||||
|
||||
A quick search yielded [[https://stackoverflow.com/a/13102821][Buffer-locally overriding minor-mode key bindings in Emacs]] suggesting a fix. My adaptation of that solution:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun oni-elisp-ielm-remove-paredit-newline-keys ()
|
||||
"Disable ‘C-j’ and ‘RET’ keybindings from ‘paredit-mode’."
|
||||
(let ((oldmap (map-elt minor-mode-map-alist 'paredit-mode))
|
||||
(newmap (make-sparse-keymap)))
|
||||
(set-keymap-parent newmap oldmap)
|
||||
(define-key newmap (kbd "RET") nil)
|
||||
(define-key newmap (kbd "C-j") nil)
|
||||
(make-local-variable 'minor-mode-overriding-map-alist)
|
||||
(push `(paredit-mode . ,newmap) minor-mode-overriding-map-alist)))
|
||||
|
||||
(add-hook 'ielm-mode-hook #'oni-elisp-ielm-remove-paredit-newline-keys)
|
||||
#+end_src
|
||||
|
||||
Defining =RET= and =C-j= as =nil= means that the keybinding defaults back to the major-mode keybinding.
|
|
@ -101,7 +101,7 @@
|
|||
:base-extension "svg\\|png\\|jpg"
|
||||
:publishing-function org-publish-attachment
|
||||
:publishing-directory "public/")
|
||||
("all" :components ("index" "posts" "assets"))))
|
||||
("all" :components ("index" "assets"))))
|
||||
|
||||
(defvar publish-feed-url-format
|
||||
;"https://gitlab.com/ryuslash/ryuslash.org/-/commits/master/%s?feed_token=Rf8otgpS8YEiYakJN4NR&format=atom"
|
||||
|
|
Loading…
Reference in a new issue