fix awesome-tray settings, to not break some org src block return actions and set org-src-preserve-indentation t

This commit is contained in:
2022-01-08 16:28:12 +01:00
parent eff7048f28
commit 50cd101a05
3 changed files with 842 additions and 3 deletions

View File

@@ -151,6 +151,14 @@ DISPLAY-START: `integer', e.g. 3820"
""
(car args)))
(advice-add 'awesome-tray-module-file-path-info :filter-return #'my-awesome-tray-module-file-path-info-advice)
;; old `awesome-tray-module-buffer-name-info'. new one breaks some org-mod src block return actions.
(defun awesome-tray-module-buffer-name-info ()
(if awesome-tray-buffer-name-buffer-changed
(if (and (buffer-modified-p)
(not (eq buffer-file-name nil)))
(concat (buffer-name) awesome-tray-buffer-name-buffer-changed-style)
(buffer-name))
(format "%s" (buffer-name))))
(awesome-tray-mode 1))
(use-package doc-view

View File

@@ -311,13 +311,21 @@ Example defines
(add-to-list 'image-file-name-extensions "eps" t)) ;; TODO: eps not needed?
;; org core libs
(use-package org-src
:defer t
:config
(setq org-edit-src-content-indentation 0)
(setq org-src-preserve-indentation t))
(use-package org-contrib
:after (org)
:load-path (lambda () (list (concat config-dir "lisp/org-contrib"))))
;;; org-contrib libs
;; Make invisible parts of Org elements appear visible.
(use-package org-appear
:after (org)
:hook (org-mode . org-appear-mode)
:config
(setq org-appear-autoentities t) ;; toogle entities: \alpha -> ɑ, needs `org-pretty-entries' active
@@ -343,7 +351,7 @@ Example defines
;; org-brain-ensure-ids-in-buffer. Even more comfortable is to add
;; that to before-save-hook, so that it runs when saving.
(add-hook 'before-save-hook #'org-brain-ensure-ids-in-buffer)
;; to add information at the end of an entry, without visiting the file.
;; to add information at the end of an entry, without visiting the file.
(push '("b" "Brain" plain (function org-brain-goto-end)
"* %i%?" :empty-lines 1)
org-capture-templates)
@@ -361,6 +369,22 @@ Example defines
;; (setq org-brain-include-file-entries nil)
;; (setq org-brain-file-entries-use-title nil)
(require 'all-the-icons)
(defun org-brain-insert-resource-icon (link)
"Insert an icon, based on content of org-mode LINK."
(insert (format "%s "
(cond ((string-prefix-p "brain:" link)
(all-the-icons-fileicon "brain"))
((string-prefix-p "info:" link)
(all-the-icons-octicon "info"))
((string-prefix-p "help:" link)
(all-the-icons-material "help"))
((string-prefix-p "http" link)
(all-the-icons-icon-for-url link))
(t
(all-the-icons-icon-for-file link))))))
(add-hook 'org-brain-after-resource-button-functions #'org-brain-insert-resource-icon)
(require 'deft)
(defun org-brain-deft ()
"Use `deft' for files in `org-brain-path'."
@@ -488,7 +512,6 @@ Suggest the URL title as a description for resource."
(list ?I :foreground "#df5f5f" :weight 'bold))))
(use-package org-fragtog
:after (org)
:hook (org-mode . org-fragtog-mode))
(use-package org-id ;; used by org-brain