add mastodon

This commit is contained in:
Willem van den Ende
2025-05-03 08:38:00 +01:00
parent 8411982686
commit bd7723a225
4 changed files with 42 additions and 42 deletions
+13 -3
View File
@@ -44,6 +44,10 @@
; (define-key org-roam-mode-map [mouse-1] #'org-roam-visit-thing)
(require 'org-roam)
(setq mastodon-instance-url "https://mastodon.social"
mastodon-active-user "mostalive")
;; elixir
;; inspiration https://medium.com/@victor.nascimento/elixir-emacs-development-2023-edition-1a6ccc40629
(use-package
@@ -82,6 +86,7 @@
(push '("|>" . ?\u25B7) prettify-symbols-alist)))
(before-save . eglot-format))
(add-hook 'after-init-hook #'global-mise-mode)
;; fix pdflatex for pdf export
(setenv "PATH" (concat (getenv "PATH") ":/Library/TeX/texbin"))
@@ -311,9 +316,13 @@ only the description"
(delete-region link-begin (- link-end 1))
(insert content)))))))
(bind-key "C-c r" 'qwan/org-replace-link-by-link-description)
(defun org-roam-replace-file-link-by-website-or-description ()
"If a linked org-roam file has a website as key, use that as the link target instead of the filename. Otherwise, remove the link, and leave just
the description. This may destroy existing links, or change their targets so use in a copy of buffers you hold dearly as notes"
"If a linked org-roam file has a website as key,
use that as the link target instead of the filename.
Otherwise, remove the link, and leave just the description.
This may destroy existing links, or change their targets so
use in a copy of buffers you hold dearly as notes"
(interactive)
(let ((elem (org-element-context)))
(if (eq (car elem) 'link)
@@ -421,7 +430,8 @@ the description. This may destroy existing links, or change their targets so use
;; tests are better than literate programming when you want to triangulate on the same function
;; org only shows the last return value by default, you can return a list of course, but still
(defun as-function-name (candidate-name)
"Take the string and make it suitable to be a function name. Replaces space with dash and make string all lowercase."
"Take the string and make it suitable to be a function name.
Replaces space with dash and make string all lowercase."
(declare (side-effect-free t))
(s-join "-" (mapcar 'downcase (split-string candidate-name " " t))))
;; (s-join "-" (mapcar 'downcase (s-split-words s))))