Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
emacs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Hauspie
emacs
Commits
9e552e65
Commit
9e552e65
authored
9 months ago
by
Michael Hauspie
Browse files
Options
Downloads
Patches
Plain Diff
Move more org configuration to its :custom block in use-package
parent
7dbe9d34
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configuration.org
+101
-103
101 additions, 103 deletions
configuration.org
with
101 additions
and
103 deletions
configuration.org
+
101
−
103
View file @
9e552e65
...
...
@@ -417,88 +417,106 @@ org with contributed packages added.
** Basics
#+BEGIN_SRC emacs-lisp
(use-package org
:bind (("C-c l" . 'org-store-link)
("C-c a" . 'org-agenda)
("C-c c" . 'org-capture)
)
:custom
;; Tab keeps indenting in src blocks
(org-src-tab-acts-natively t)
;; IDO for completion when applicable
(org-completion-use-ido t)
;; hide emphasis markers
;; (org-hide-emphasis-markers t)
(org-file-apps '(("org" . emacs)
("rs" . emacs)
("c" . emacs)
("h" . emacs)
))
;; Define the right latexmk command to export to latex
(org-latex-pdf-process (list "latexmk -pdflatex='pdflatex -shell-escape -interaction nonstopmode' -output-directory=%o -pdf %f"))
;; Task management configuration
(org-log-done 'time)
(org-enforce-todo-dependencies t)
(org-enforce-todo-checkbox-dependencies t)
(org-todo-keywords '((sequence "TODO" "WAITING" "|" "DONE")))
;; where org mode can find its files for archiving and capture
(org-directory "~/documents/org")
(org-archive-location "~/documents/org/archive.org::* From %s")
(org-agenda-files (list "~/documents/org/index.org"
"~/.emacs.d/configuration.org"
"~/documents/org/work.org"
"~/documents/org/archive.org"))
;; Agenda
;; The week begin today
(org-agenda-start-on-weekday nil)
;; 15 days in agenda view
(org-agenda-span 15)
;;
;; Define a custom agenda view. I want my agenda with tasks that are scheduled or have a deadline,
;; but also all other tasks that do not have a date scheduled or as deadline. This is for tasks
;; that I will eventualy do later.
(org-agenda-custom-commands
'(("a" "Agenda"
(
(agenda "" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))))
(alltodo "" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled 'deadline 'todo 'done))))
))))
;; Define some capture template to be able to create tasks, or maybe
;; other things later
(org-capture-templates
'(("f" "Finished book"
table-line (file "~/Documents/org/books-read.org")
"| %^{Title} | %^{Author} | %u |")
("t" "Todo"
entry
(file+headline org-index-file "Tâches")
"* TODO %?\n:PROPERTIES:\nCREATED: %u\n:END:\n")
("b" "Bookmarks"
table-line (file "~/Documents/org/bookmarks.org")
"| %^{prompt|rust|other} | %^{url} | %^{what}")
("c" "Cycling"
table-line (file "~/Documents/org/cycling.org")
"| %t | balade | %^{prompt|standard|électrique} | %^{Distance} |")
("w" "Cycling to work"
table-line (file "~/Documents/org/cycling.org")
"| %t | boulot | %^{prompt|électrique|standard} | 26.2 |")))
:config
(add-to-list 'org-structure-template-alist
'("el" . "src emacs-lisp"))
(set-face-foreground 'org-verbatim "orange1")
;; Define a document class that do not use parts and start with chapters for latex export
)
(use-package org
:bind (("C-c l" . 'org-store-link)
("C-c a" . 'org-agenda)
("C-c c" . 'org-capture)
)
:custom
;; Tab keeps indenting in src blocks
(org-src-tab-acts-natively t)
;; IDO for completion when applicable
(org-completion-use-ido t)
;; hide emphasis markers
;; (org-hide-emphasis-markers t)
(org-file-apps '(("org" . emacs)
("rs" . emacs)
("c" . emacs)
("h" . emacs)
))
;; Define the right latexmk command to export to latex
(org-latex-pdf-process (list "latexmk -pdflatex='pdflatex -shell-escape -interaction nonstopmode' -output-directory=%o -pdf %f"))
;; Task management configuration
(org-log-done 'time)
(org-enforce-todo-dependencies t)
(org-enforce-todo-checkbox-dependencies t)
(org-todo-keywords '((sequence "TODO" "WAITING" "|" "DONE")))
;; where org mode can find its files for archiving and capture
(org-directory "~/documents/org")
(org-archive-location "~/documents/org/archive.org::* From %s")
(org-agenda-files (list "~/documents/org/index.org"
"~/.emacs.d/configuration.org"
"~/documents/org/work.org"
"~/documents/org/archive.org"))
;; Agenda
;; The week begin today
(org-agenda-start-on-weekday nil)
;; 15 days in agenda view
(org-agenda-span 15)
;;
;; Define a custom agenda view. I want my agenda with tasks that are scheduled or have a deadline,
;; but also all other tasks that do not have a date scheduled or as deadline. This is for tasks
;; that I will eventualy do later.
(org-agenda-custom-commands
'(("a" "Agenda"
(
(agenda "" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))))
(alltodo "" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled 'deadline 'todo 'done))))
))))
;; Define some capture template to be able to create tasks, or maybe
;; other things later
(org-capture-templates
'(("f" "Finished book"
table-line (file "~/Documents/org/books-read.org")
"| %^{Title} | %^{Author} | %u |")
("t" "Todo"
entry
(file+headline org-index-file "Tâches")
"* TODO %?\n:PROPERTIES:\nCREATED: %u\n:END:\n")
("b" "Bookmarks"
table-line (file "~/Documents/org/bookmarks.org")
"| %^{prompt|rust|other} | %^{url} | %^{what}")
("c" "Cycling"
table-line (file "~/Documents/org/cycling.org")
"| %t | balade | %^{prompt|standard|électrique} | %^{Distance} |")
("w" "Cycling to work"
table-line (file "~/Documents/org/cycling.org")
"| %t | boulot | %^{prompt|électrique|standard} | 26.2 |")))
;;
;; Babel code blocks evaluation
(org-babel-load-languages
'((emacs-lisp . t)
(C . t)
(latex . t)
(gnuplot . t)
(dot . t)
(java . t)
(python . t)
(makefile . t)
(org . t)
(perl . t)
(sed . t)
(shell . t)
(rust . t)
))
:config
(add-to-list 'org-structure-template-alist
'("el" . "src emacs-lisp"))
(set-face-foreground 'org-verbatim "orange1")
;; Define a document class that do not use parts and start with chapters for latex export
)
#+END_SRC
Add a shortcut to toggle display of emphasis characters
...
...
@@ -536,7 +554,7 @@ Use bullets instead of asterisks
)
#+end_src
** Tree slide
Tree slide displays an org file as /slides/
...
...
@@ -623,31 +641,11 @@ Turn off validate link in org html export:
** Source code evaluation
So that source code blocks can be evaluated inside =org-mode=, we add
it to babel languages. =org-babel= is what executes code and outputs
its result in your org file.
#+begin_src emacs-lisp
(use-package gnuplot)
(use-package gnuplot-mode)
(use-package ob-rust)
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(C . t)
(latex . t)
(gnuplot . t)
(dot . t)
(java . t)
(python . t)
(makefile . t)
(org . t)
(perl . t)
(sed . t)
(shell . t)
(rust . t)
))
#+END_SRC
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment