forked from FG42/FG42
Add org support to v4
This commit is contained in:
parent
02794af163
commit
37956c6b8b
|
@ -33,9 +33,6 @@
|
|||
"Enable the support for org-journal in FG42." t)
|
||||
|
||||
|
||||
(defvar fg42/default-org-journal-heder
|
||||
"#+TITLE: Yearly Journal
|
||||
#+STARTUP: folded logdrawer logdone logreschedule indent content align constSI entitiespretty")
|
||||
|
||||
|
||||
(defcube fg42/org-ql-cube
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
eros
|
||||
org
|
||||
org-journal
|
||||
org-bullets
|
||||
org-modern
|
||||
org-sidebar
|
||||
org-super-agenda
|
||||
org-ql
|
||||
|
|
|
@ -31,8 +31,10 @@
|
|||
(require 'fg42/langs/python)
|
||||
(require 'fg42/langs/elisp)
|
||||
(require 'fg42/langs/nix)
|
||||
|
||||
(require 'fg42/git)
|
||||
(require 'fg42/wm))
|
||||
(require 'fg42/wm)
|
||||
(require 'fg42/org))
|
||||
|
||||
(require 'server)
|
||||
(require 'fg42/modeline)
|
||||
|
@ -350,7 +352,8 @@ shipped with Emacs."
|
|||
(when (not (server-running-p))
|
||||
(when-wm
|
||||
(setq server-name "fg42-wm"))
|
||||
(server-start))
|
||||
(server-start)
|
||||
(require 'org-protocol))
|
||||
|
||||
(when-wm
|
||||
;; Activating the WM mode
|
||||
|
|
|
@ -0,0 +1,183 @@
|
|||
;;; FG42 --- The mighty editor for the emacsians -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors
|
||||
;;
|
||||
;; Author: Sameer Rahmani <lxsameer@gnu.org>
|
||||
;; URL: https://devheroes.codes/FG42/FG42
|
||||
;; Version: 4.0.0
|
||||
;;
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;; Code:
|
||||
(eval-when-compile
|
||||
(require 'fpkg))
|
||||
|
||||
(defvar fg42/org-super-agenda-groups nil)
|
||||
|
||||
(defvar fg42/org-home "~/.orgs"
|
||||
"The location to the org file repository.")
|
||||
|
||||
(defvar fg42/default-org-journal-heder
|
||||
"
|
||||
#+TITLE: Yearly Journal
|
||||
#+STARTUP: folded logdrawer logdone logreschedule indent content align constSI entitiespretty
|
||||
"
|
||||
"Org journal header.")
|
||||
|
||||
(defvar fg42/notes-file "notes.org")
|
||||
|
||||
(defvar fg42/global-tags nil)
|
||||
|
||||
(defvar fg42/agenda-files "main.org")
|
||||
|
||||
|
||||
(use! org-ql
|
||||
"This package provides a query language for Org files. It offers two
|
||||
syntax styles: Lisp-like sexps and search engine-like keywords.
|
||||
|
||||
It includes three libraries: The `org-ql' library is flexible and may
|
||||
be used as a backend for other tools. The libraries `org-ql-search' and
|
||||
`helm-org-ql' (a separate package) provide interactive search commands
|
||||
and saved views."
|
||||
:after org)
|
||||
|
||||
|
||||
(use! org-super-agenda
|
||||
"This package lets you supercharge your Org daily/weekly agenda. The idea is
|
||||
to group items into sections, rather than having them all in one big list.
|
||||
|
||||
Now you can sort-of do this already with custom agenda commands, but when you
|
||||
do that, you lose the daily/weekly aspect of the agenda: items are no longer
|
||||
shown based on deadline/scheduled timestamps, but are shown no-matter-what.
|
||||
|
||||
h
|
||||
For more information checkout `https://github.com/alphapapa/org-super-agenda'"
|
||||
:after org-agenda
|
||||
:config
|
||||
(setq org-agenda-skip-scheduled-if-done t
|
||||
org-agenda-skip-deadline-if-done t
|
||||
org-agenda-include-deadlines t
|
||||
org-agenda-compact-blocks t
|
||||
org-agenda-start-day nil ;; Today
|
||||
org-agenda-span 1
|
||||
org-super-agenda-groups fg42/org-super-agenda-groups)
|
||||
(org-super-agenda-mode))
|
||||
|
||||
|
||||
;; (defun fg42/org-journal-find-location ()
|
||||
;; "Open today's journal.
|
||||
;; But specify a non-nil prefix argument in order to
|
||||
;; inhibit inserting the heading; `org-capture' will insert the heading."
|
||||
;; (org-journal-new-entry t)
|
||||
;; (unless (eq org-journal-file-type 'daily)
|
||||
;; (org-narrow-to-subtree))
|
||||
;; (goto-char (point-max)))
|
||||
|
||||
|
||||
;; (use! org-journal
|
||||
|
||||
;; :init
|
||||
|
||||
;; ;; Change default prefix key; needs to be set before loading org-journal
|
||||
;; (setq org-journal-prefix-key "C-c j ")
|
||||
;; :config
|
||||
;; (setq org-journal-file-type journal-type
|
||||
;; org-journal-file-header journal-header
|
||||
;; org-journal-dir (expand-file-name "journal" org-home)
|
||||
;; org-journal-date-format "%Y-%m-%d (%A): "))
|
||||
|
||||
;; '("j" "Journal Entry" plain #'fg42/org-journal-find-location
|
||||
;; "** %(format-time-string org-journal-time-format)%^{Title} %^G\n %?\n\n*** Context:\n %i\n From: %a"
|
||||
;; :jump-to-captured t
|
||||
;; :immediate-finish nil)
|
||||
|
||||
(use! org-capture
|
||||
"Quickly capture what is in your head."
|
||||
:bind ("<f6>" . org-capture)
|
||||
|
||||
:init
|
||||
(setq-default
|
||||
org-capture-templates
|
||||
(eval
|
||||
`(list
|
||||
'("t" "Todo" entry (file+headline ,(expand-file-name "main.org" fg42/org-home) "New Tasks")
|
||||
(file ,(expand-file-name "templates/todo" fg42/org-home))
|
||||
:prepend t)
|
||||
'("l" "Link" entry (file+headline ,(expand-file-name "bookmarks.org" fg42/org-home) "Links")
|
||||
(file ,(expand-file-name "templates/links" fg42/org-home))
|
||||
:prepend t
|
||||
:immediate-finish t
|
||||
:empty-lines 1)
|
||||
|
||||
'("h" "Thoughts" entry (file+datetree ,(expand-file-name "journal.org" fg42/org-home))
|
||||
(file ,(expand-file-name "templates/thoughts" fg42/org-home)))))))
|
||||
|
||||
|
||||
(use! org-protocol
|
||||
"`org-protocol' intercepts calls from emacsclient to trigger custom actions without external
|
||||
dependencies. Only one protocol has to be configured with your external applications or
|
||||
the operating system, to trigger an arbitrary number of custom actions. Just register
|
||||
your custom sub-protocol and handler with the variable `org-protocol-protocol-alist'.")
|
||||
|
||||
(use! org
|
||||
"A GNU Emacs major mode for keeping notes, authoring documents, computational notebooks,
|
||||
literate programming, maintaining to-do lists, planning projects, and more — in a fast
|
||||
and effective plain text system.
|
||||
|
||||
For more info on ~org-mode~ check out `https://orgmode.org/'"
|
||||
:init
|
||||
(setq
|
||||
org-auto-align-tags nil
|
||||
org-tags-column 0
|
||||
org-catch-invisible-edits 'show-and-error
|
||||
org-special-ctrl-a/e t
|
||||
org-insert-heading-respect-content t)
|
||||
org-tag-alist fg42/global-tags
|
||||
;; Org styling, hide markup etc.
|
||||
org-hide-emphasis-markers t
|
||||
org-pretty-entities t
|
||||
org-ellipsis "…"
|
||||
;; Agenda styling
|
||||
org-agenda-tags-column 0
|
||||
org-agenda-block-separator ?─
|
||||
org-agenda-time-grid
|
||||
'((daily today require-timed)
|
||||
(800 1000 1200 1400 1600 1800 2000)
|
||||
" ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
|
||||
org-agenda-current-time-string
|
||||
"<── now ─────────────────────────────────────────────────"
|
||||
org-agenda-files (concat (file-name-as-directory fg42/org-home)
|
||||
fg42/agenda-files)
|
||||
|
||||
org-directory fg42/org-home
|
||||
org-default-notes-file (concat (file-name-as-directory fg42/org-home)
|
||||
fg42/notes-file)
|
||||
|
||||
org-refile-targets '((org-agenda-files :maxlevel . 3))
|
||||
|
||||
(with-eval-after-load "ox-latex"
|
||||
(setq org-latex-default-packages-alist
|
||||
(append '(("hidelinks" "hyperref" nil))
|
||||
org-latex-default-packages-alist))))
|
||||
|
||||
|
||||
(use! org-modern
|
||||
"A modern look for the old org."
|
||||
:hook ((org-mode . org-modern-mode)
|
||||
(org-agenda-finalize . org-modern-mode)))
|
||||
|
||||
|
||||
(provide 'fg42/org)
|
||||
;;; org.el ends here
|
Loading…
Reference in New Issue