aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/config.org
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2022-07-28 18:12:07 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2022-07-28 18:12:07 +0100
commit79522df565ed5afebbe9b64341843b592955ad84 (patch)
treeaf5594e107f1df0d6b6ac5d529b1898dfc4efafb /Emacs/.config/emacs/config.org
parentd7a6d933c8e11562d69fc62b47e6e35779ad96e3 (diff)
downloaddotfiles-79522df565ed5afebbe9b64341843b592955ad84.tar.gz
dotfiles-79522df565ed5afebbe9b64341843b592955ad84.tar.bz2
dotfiles-79522df565ed5afebbe9b64341843b592955ad84.zip
(Emacs)+org agenda configuration, +binding for org auto compile
Diffstat (limited to 'Emacs/.config/emacs/config.org')
-rw-r--r--Emacs/.config/emacs/config.org47
1 files changed, 41 insertions, 6 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index 6e2f511..471849a 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -2094,8 +2094,7 @@ Emacs was very helpful here.
(use-package org
:defer t
:custom
- (org-agenda-files `(,(expand-file-name "~/Text")))
- (org-agenda-window-setup 'current-window)
+ (org-directory "~/Text")
(org-edit-src-content-indentation 0)
(org-goto-interface 'outline)
(org-src-window-setup 'current-window)
@@ -2170,14 +2169,14 @@ Some bindings for org mode.
(use-package org
:general
(leader
- "aa" #'org-agenda
- "fa" (proc (interactive) (find-file (car org-agenda-files))))
+ "fw" #'org-capture)
(local-leader
:keymaps 'org-mode-map
"t" #'org-ctrl-c-ctrl-c
"l" #'org-latex-preview
"s" #'org-property-action
- "e" #'org-export-dispatch))
+ "e" #'org-export-dispatch
+ "o" #'org-edit-special))
#+end_src
*** Org message
Org message allows for the use of org mode when composing mails,
@@ -2208,10 +2207,18 @@ crash (like the async handler for org-export). Works really well with
~pdf-view-mode~.
#+begin_src emacs-lisp
(use-package org
- :config
+ :init
(defvar +org/compile-to-pdf-on-save-p
nil
"Non-nil to activate compile functionality.")
+ :general
+ (local-leader
+ :keymaps 'org-mode-map
+ "C" (proc (interactive)
+ (if (+org/compile-to-pdf-on-save-f)
+ (setq-local +org/compile-to-pdf-on-save-p nil)
+ (setq-local +org/compile-to-pdf-on-save-p t))))
+ :config
(+dx/create-auto-save
+org/compile-to-pdf-on-save-f
(and (eq major-mode 'org-mode) +org/compile-to-pdf-on-save-p)
@@ -2259,6 +2266,34 @@ better than the default asterisks.
(use-package org-superstar
:hook (org-mode-hook . org-superstar-mode))
#+end_src
+*** Org agenda
+Org agenda provides a nice viewing for schedules. With org mode it's
+a very tidy way to manage your time.
+#+begin_src emacs-lisp
+(use-package org-agenda
+ :after (org evil)
+ :straight nil
+ :init
+ (setq org-agenda-files (list (expand-file-name "~/Text"))
+ org-agenda-window-setup 'current-window
+ org-agenda-skip-deadline-prewarning-if-scheduled t)
+ :config
+ (evil-set-initial-state 'org-agenda-mode 'normal)
+ :general
+ (leader
+ "fa" (proc (interactive) (find-file (car org-agenda-files)))
+ "aa" #'org-agenda)
+ (general-def
+ :states '(normal motion)
+ :keymaps 'org-agenda-mode-map
+ "J" #'org-agenda-later
+ "K" #'org-agenda-earlier
+ "t" #'org-agenda-todo
+ "." #'org-agenda-goto-today
+ "," #'org-agenda-goto-date
+ "q" #'org-agenda-quit
+ "r" #'org-agenda-redo))
+#+end_src
** C/C++
Setup for C and C++ modes via the cc-mode package. C and C++ are
great languages for general purpose programming. Furthermore, they