155 lines
4.9 KiB
EmacsLisp
155 lines
4.9 KiB
EmacsLisp
;;; org-config.el --- Configuración de org-mode
|
|
|
|
;; Author: kj <webmaster@outcontrol.net>
|
|
;; URL: https://git.kj2.me/kj/confi-emacs-actual
|
|
|
|
;;; Commentary:
|
|
|
|
;;; Code:
|
|
(defun kj/org-hook ()
|
|
"Configuración para el hook de 'org-mode'."
|
|
|
|
(display-line-numbers-mode 0)
|
|
(variable-pitch-mode 1)
|
|
(visual-line-mode 1)
|
|
(visual-fill-column-mode 1)
|
|
|
|
;; Configuración de fonts
|
|
;; (set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face))
|
|
|
|
;; Ensure that anything that should be fixed-pitch in Org files appears that way
|
|
(set-face-attribute 'org-hide nil :inherit 'fixed-pitch)
|
|
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
|
|
(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
|
|
(set-face-attribute 'org-table nil :inherit '(shadow fixed-pitch))
|
|
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
|
|
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
|
|
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
|
|
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
|
|
|
|
;; Tachar los elementos "DONE"
|
|
(set-face-attribute 'org-done nil :strike-through t)
|
|
(set-face-attribute 'org-headline-done nil
|
|
:strike-through t
|
|
:foreground "light gray")
|
|
|
|
)
|
|
|
|
(use-package org
|
|
:defer t
|
|
:pin org
|
|
:hook
|
|
(org-mode . kj/org-hook)
|
|
:config
|
|
(setq company-dabbrev-ignore-case nil) ; Hacer el autocompletado case-sensitive.
|
|
(setq org-ellipsis " ▾")
|
|
(setq org-hide-emphasis-markers t)
|
|
(setq org-startup-folded 'content)
|
|
|
|
(setq org-agenda-start-with-log-mode t)
|
|
(setq org-log-done 'time)
|
|
(setq org-log-into-drawer t)
|
|
(setq org-cycle-separator-lines 2)
|
|
|
|
;; Identación
|
|
(setq org-startup-indented t)
|
|
(setq org-src-preserve-indentation nil)
|
|
(setq org-edit-src-content-indentation 0)
|
|
(setq org-src-tab-acts-natively t)
|
|
|
|
;; Palabras claves del To Do de org-mode
|
|
(setq org-todo-keywords
|
|
;;'((sequence "☐" "✔" "⌛" "❌")))
|
|
'((sequence "TODO(t)" "DOING(n)" "WAITING(w)" "|" "DONE(d!)" "CANCELED(c!)")))
|
|
(setq org-todo-keyword-faces
|
|
'(("TODO" . "#ff6464")
|
|
("DOING" . "yellow")
|
|
("DONE" . "green")
|
|
("WAITING" . "orange")
|
|
("CANCELED" . "#aaa"))
|
|
)
|
|
|
|
|
|
;; Embellecer los checkbox
|
|
;; (add-hook 'org-mode-hook (lambda ()
|
|
;; "Beautify Org Checkbox Symbol"
|
|
;; (push '("[ ]" . "☐") prettify-symbols-alist)
|
|
;; (push '("[X]" . "☑" ) prettify-symbols-alist)
|
|
;; (push '("[-]" . "❍" ) prettify-symbols-alist)
|
|
;; (prettify-symbols-mode)))
|
|
|
|
;; Tachar los checkbox marcados como terminados
|
|
(defface org-checkbox-done-text
|
|
'((t (:foreground "#71696A" :strike-through t)))
|
|
"Face for the text part of a checked org-mode checkbox.")
|
|
|
|
(font-lock-add-keywords
|
|
'org-mode
|
|
`(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?:X\\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)"
|
|
1 'org-checkbox-done-text prepend))
|
|
'append)
|
|
|
|
;; Archivos a usarse en org-agenda
|
|
(setq org-agenda-files
|
|
'("~/Proyectos/ORGenda/Ideas.org"
|
|
"~/Proyectos/ORGenda/IdeasTwitch.org"
|
|
"~/Proyectos/ORGenda/Proyectos.org"
|
|
"~/Proyectos/ORGenda/Tareas.org")
|
|
)
|
|
|
|
;; Archivos entre los que se moverán las tareas
|
|
(setq org-refile-targets
|
|
'(("Archivo.org" :maxlevel . 1)
|
|
("Proyectos.org" :maxlevel . 1)
|
|
("IdeasTwitch.org" :maxlevel . 1)
|
|
("Ideas.org" :maxlevel . 1)
|
|
("Tareas.org" :maxlevel . 1)))
|
|
|
|
;; Guardar los archivos cuando se muevan tareas entre ellos
|
|
(advice-add 'org-refile :after 'org-save-all-org-buffers)
|
|
|
|
(setq org-capture-templates
|
|
`(("t" "Tareas / Projectos")
|
|
("tt" "Tareas" entry (file+olp "~/Proyectos/ORGenda/Tareas.org")
|
|
"* TODO %?\n %U\n %a\n %i" :empty-lines 1)
|
|
("tp" "Proyectos" entry (file+olp "~/Proyectos/ORGenda/Proyectos.org")
|
|
"* TODO %?\n %U\n %a\n %i" :empty-lines 1)
|
|
("i" "Ideas")
|
|
("ii" "Ideas General" entry
|
|
(file+olp "~/Proyectos/ORGenda/ideas.org")
|
|
"* TODO %?\n %a\n %i" :empty-lines 1)
|
|
("it" "Ideas Twitch" entry
|
|
(file+olp "~/Proyectos/ORGenda/IdeasTwitch.org")
|
|
"* TODO %?\n %a\n %i" :empty-lines 1)
|
|
)
|
|
)
|
|
)
|
|
|
|
(use-package org-bullets
|
|
:defer t
|
|
:hook
|
|
(org-mode . org-bullets-mode))
|
|
|
|
(use-package visual-fill-column
|
|
:config
|
|
;; Tamaño de la columna
|
|
(setq-default visual-fill-column-width 150)
|
|
;; Centrar el texto
|
|
(setq-default visual-fill-column-center-text t)
|
|
)
|
|
|
|
(use-package org-roam
|
|
:defer t
|
|
:ensure t
|
|
:init
|
|
(setq org-roam-v2-ack t)
|
|
(setq org-roam-completion-system 'ivy)
|
|
:custom
|
|
(org-roam-directory "~/Proyectos/RoamNotes")
|
|
(org-roam-completion-everywhere t)
|
|
:config
|
|
(org-roam-setup))
|
|
|
|
(provide 'org-config)
|
|
;;; org-config.el ends here
|