dev: merge branch 'master' into emenel

This commit is contained in:
Matt Nish-Lapidus 2024-06-28 17:50:46 -04:00
commit f58082cb0c
9 changed files with 25 additions and 29 deletions

View file

@ -316,16 +316,14 @@ exist, and `org-link' otherwise."
(defun +org-image-file-data-fn (protocol link _description)
"Intepret LINK as an image file path and return its data."
(setq
link (expand-file-name
link (pcase protocol
("download"
(or (if (require 'org-download nil t) org-download-image-dir)
(if (require 'org-attach) org-attach-id-dir)
default-directory))
("attachment"
(require 'org-attach)
org-attach-id-dir)
(_ default-directory))))
link (pcase protocol
("download"
(expand-file-name link (or (if (require 'org-download nil t) org-download-image-dir)
default-directory)))
("attachment"
(require 'org-attach)
(org-attach-expand link))
(_ (expand-file-name link default-directory))))
(when (and (file-exists-p link)
(image-type-from-file-name link))
(with-temp-buffer

View file

@ -494,7 +494,7 @@ relative to `org-directory', unless it is an absolute path."
(add-to-list 'projectile-globally-ignored-directories org-attach-id-dir)))
;; Add inline image previews for attachment links
(org-link-set-parameters "attachment" :image-data-fun #'+org-inline-image-data-fn))
(org-link-set-parameters "attachment" :image-data-fun #'+org-image-file-data-fn))
(defun +org-init-custom-links-h ()

View file

@ -64,8 +64,7 @@ server an expensive restart when its buffer is reverted."
(use-package! consult-eglot
:defer t
:when (modulep! :completion vertico)
:init
(map! :map eglot-mode-map [remap xref-find-apropos] #'consult-eglot-symbols))
:init (define-key eglot-mode-map [remap xref-find-apropos] #'consult-eglot-symbols))
(use-package! flycheck-eglot

View file

@ -33,13 +33,7 @@
(defun +tabs-disable-centaur-tabs-mode-maybe-h ()
"Disable `centaur-tabs-mode' in current buffer."
(when (centaur-tabs-mode-on-p)
(centaur-tabs-local-mode))))
(add-hook! 'doom-load-theme-hook
(defun +tabs-reload-centaur-tabs-h ()
(when (bound-and-true-p centaur-tabs-mode)
(centaur-tabs-mode -1)
(centaur-tabs-mode +1)))))
(centaur-tabs-local-mode)))))
;; TODO tab-bar-mode (emacs 27)
;; TODO tab-line-mode (emacs 27)

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; ui/tabs/packages.el
(package! centaur-tabs :pin "4a121a175e663295fcd295512642dae4d2ff9db3")
(package! centaur-tabs :pin "d6009c295a4363930247ae9a4d1125aea4d3fd74")