Compare commits

...

4 commits

Author SHA1 Message Date
Bram Schoenmakers d1af9b3a27 Add comment 2023-02-13 22:45:16 +01:00
Bram Schoenmakers daceaa0ea0 Add tags 2023-02-13 22:45:02 +01:00
Bram Schoenmakers b0907c376e s/gitea/Forgejo/ 2023-02-13 22:43:28 +01:00
Bram Schoenmakers a0c7b8fecb Fix typo 2023-02-13 22:36:55 +01:00
2 changed files with 25 additions and 6 deletions

View file

@ -4,7 +4,7 @@
#+begin_src org :tangle README.org
Gists referred from [[https://emacs.ch/@bram85][@bram85@emacs.ch]].
Unfortunately gitea has no gist support and there's no mature yet lightweight gist solution suitable for self-hosting, so resorting to this poor-man's setup of sharing gists with an audience.
Unfortunately Forgejo has no gist support and there's no mature yet lightweight gist solution suitable for self-hosting, so resorting to this poor-man's setup of sharing gists with an audience.
#+end_src
* Termux keys :termux:emacs:
@ -302,7 +302,7 @@ My vertico-repeat setup.
,#+end_example
#+end_src
* Define a lambda in a let expression
* Define a lambda in a let expression :elisp:emacs:
#+begin_src elisp :tangle gists/let-lambda.el
;; https://stackoverflow.com/questions/36039840/elisp-bind-a-lambda-in-a-let-and-execute-it
@ -329,10 +329,29 @@ Found [[https://www.reddit.com/r/emacs/comments/e2u5n9/comment/f918t22/][a Reddi
(eshell-mode . outline-minor-mode))
#+end_src
* Paredit inside minibuffer commands
* Automatically reformat source blocks in Org Mode :org:orgbabel:emacs:
#+begin_src elisp :tangle gists/format-org-mode-source-blocks.el
;; https://github.com/lassik/emacs-format-all-the-code
(use-package format-all)
(use-package org
:config
(defun my/format-all-advice ()
(ignore-errors ; in case there's no language support
(call-interactively #'format-all-buffer)))
(advice-add #'org-edit-src-exit :before #'my/format-all-advice))
#+end_src
Better adapt the README file instead.
* Paredit inside minibuffer commands :emacs:
Used [[https://github.com/purcell/emacs.d/blob/master/lisp/init-paredit.el][Purcell's configation]] as a starting point.
It turns out it didn't work as well as I hoped, paredit steals the RET binding so a newline is inserted in the minibuffer, instead of submitting the input.
#+name: minibuffer-paredit
#+begin_src elisp :tangle gists/minibuffer-paredit.el
(use-package paredit
@ -361,7 +380,7 @@ Used [[https://github.com/purcell/emacs.d/blob/master/lisp/init-paredit.el][Purc
(bind-key (kbd "RET") #'paredit-newline paredit-mode-map)))
#+end_src
* Store revision of Emacs configuration in a constant
* Store revision of Emacs configuration in a constant :emacs:
#+begin_src elisp :tangle gists/store-configuration-revision-in-constant.el
;; Store the Git revision of your Emacs configuration at the moment
@ -424,7 +443,7 @@ Used [[https://github.com/purcell/emacs.d/blob/master/lisp/init-paredit.el][Purc
;;
;; - type the search term / ID only once
;; - or, use the region instead, if active
;; - no visible prefixes (link abbrevations)
;; - no visible prefixes (link abbreviations)
;;
;; We need to store the region before the templating kicks
;; in, because the region can be used only once in a template. For

View file

@ -34,7 +34,7 @@
;;
;; - type the search term / ID only once
;; - or, use the region instead, if active
;; - no visible prefixes (link abbrevations)
;; - no visible prefixes (link abbreviations)
;;
;; We need to store the region before the templating kicks
;; in, because the region can be used only once in a template. For