emacs fixes

This commit is contained in:
Emmet
2025-04-15 09:03:54 -05:00
parent 56c66b47e5
commit 1cd425c2b1

View File

@ -790,67 +790,73 @@
(interactive "p") (interactive "p")
(dotimes (_ count) (+org--insert-item 'above))) (dotimes (_ count) (+org--insert-item 'above)))
;;;###autoload (defun +org-indent-maybe-h ()
(defun +org-indent-maybe-h () "Indent the current item (header or item), if possible.
"Indent the current item (header or item), if possible. Made for `org-tab-first-hook' in evil-mode."
Made for `org-tab-first-hook' in evil-mode." (interactive)
(interactive) (cond ((not (and (bound-and-true-p evil-local-mode)
(cond ((not (and (bound-and-true-p evil-local-mode) (evil-insert-state-p)))
(evil-insert-state-p))) nil)
nil) ((and (bound-and-true-p org-cdlatex-mode)
((and (bound-and-true-p org-cdlatex-mode) (or (org-inside-LaTeX-fragment-p)
(or (org-inside-LaTeX-fragment-p) (org-inside-latex-macro-p)))
(org-inside-latex-macro-p))) nil)
nil) ((org-at-item-p)
((org-at-item-p) (if (eq this-command 'org-shifttab)
(org-indent-item-tree) (org-outdent-item-tree)
t) (org-indent-item-tree))
((org-at-heading-p) t)
(ignore-errors ((org-at-heading-p)
(org-demote) (ignore-errors
t) (if (eq this-command 'org-shifttab)
((org-in-src-block-p t) (org-promote)
(save-window-excursion (org-demote)))
(org-babel-do-in-edit-buffer t)
(call-interactively #'indent-for-tab-command))) ((org-in-src-block-p t)
t) (save-window-excursion
((and (save-excursion (org-babel-do-in-edit-buffer
(skip-chars-backward " \t") (call-interactively #'indent-for-tab-command)))
(bolp)) t)
(org-in-subtree-not-table-p)) ((and (save-excursion
(call-interactively #'tab-to-tab-stop) (skip-chars-backward " \t")
t)))) (bolp))
(org-in-subtree-not-table-p))
(call-interactively #'tab-to-tab-stop)
t)))
;;;###autoload (defun +org-reverse-indent-maybe-h ()
(defun +org-reverse-indent-maybe-h () "Indent the current item (header or item), if possible.
"Indent the current item (header or item), if possible. Made for `org-tab-first-hook' in evil-mode."
Made for `org-tab-first-hook' in evil-mode." (interactive)
(interactive) (cond ((not (and (bound-and-true-p evil-local-mode)
(cond ((not (and (bound-and-true-p evil-local-mode) (evil-insert-state-p)))
(evil-insert-state-p))) nil)
nil) ((and (bound-and-true-p org-cdlatex-mode)
((and (bound-and-true-p org-cdlatex-mode) (or (org-inside-LaTeX-fragment-p)
(or (org-inside-LaTeX-fragment-p) (org-inside-latex-macro-p)))
(org-inside-latex-macro-p))) nil)
nil) ((org-at-item-p)
((org-at-item-p) (if (eq this-command 'org-shifttab)
(org-outdent-item-tree) (org-outdent-item-tree)
t) (org-outdent-item-tree))
((org-at-heading-p) t)
(ignore-errors ((org-at-heading-p)
(org-promote) (ignore-errors
t) (if (eq this-command 'org-shifttab)
((org-in-src-block-p t) (org-promote)
(save-window-excursion (org-promote)))
(org-babel-do-in-edit-buffer t)
(call-interactively #'indent-for-tab-command))) ((org-in-src-block-p t)
t) (save-window-excursion
((and (save-excursion (org-babel-do-in-edit-buffer
(skip-chars-backward " \t") (call-interactively #'indent-for-tab-command)))
(bolp)) t)
(org-in-subtree-not-table-p)) ((and (save-excursion
(call-interactively #'tab-to-tab-stop) (skip-chars-forward " \t")
t))))) (bolp))
(org-in-subtree-not-table-p))
(call-interactively #'tab-to-tab-stop)
t))))
(use-package org-roam (use-package org-roam
:after (org) :after (org)