up config
This commit is contained in:
parent
ef099a4827
commit
6472cbc16f
|
@ -8,12 +8,15 @@
|
||||||
|
|
||||||
Voici la documentation au format Orgmode de ma configuration d'Emacs. Pour que cela fonctionne, il faut demander au fichier de config dans le dossier utilisateur, le fichier ".emacs" débutant par un point, de charger ce fichier config.org.
|
Voici la documentation au format Orgmode de ma configuration d'Emacs. Pour que cela fonctionne, il faut demander au fichier de config dans le dossier utilisateur, le fichier ".emacs" débutant par un point, de charger ce fichier config.org.
|
||||||
|
|
||||||
|
J'utilise un dossier Nextcloud pour stocker mes textes, on retrouvera donc souvent des mentions à ce dossier dans la config. Ma liste d0s tâches [[file:tasks.org]] pour la gestion de projets se compose d'un fichier principal et de quelques autres.
|
||||||
J'utilise un dossier Nextcloud pour stocker mes textes, on retrouvera donc souvent des mentions à ce dossier dans la config. Ma liste des tâches [[file:tasks.org]] pour la gestion de projets se compose d'un fichier principal et de quelques autres.
|
|
||||||
Les réunions ont leur propre fichier, le journal aussi.
|
Les réunions ont leur propre fichier, le journal aussi.
|
||||||
[[file:reunions.org]].
|
Fichiers souvent utiles:
|
||||||
[[file:journal.org]].
|
- file:/home/tykayn/Nextcloud/textes/orgmode/tasks.org
|
||||||
[[id:d8636e1d-0137-4502-9384-767b41c892b0][boulot]] [[id:c1c19fdf-ccab-4d78-b191-dbe0f8c66609][lemonway]]
|
- [[file:reunions.org]].
|
||||||
|
- [[file:journal.org]].
|
||||||
|
- [[id:d8636e1d-0137-4502-9384-767b41c892b0][boulot]]
|
||||||
|
- [[id:c1c19fdf-ccab-4d78-b191-dbe0f8c66609][lemonway]]
|
||||||
|
|
||||||
Contenu du fichier de config [[file:~/.emacs]]
|
Contenu du fichier de config [[file:~/.emacs]]
|
||||||
#+begin_quote
|
#+begin_quote
|
||||||
;; straight el bootstrap https://github.com/raxod502/straight.el#getting-started
|
;; straight el bootstrap https://github.com/raxod502/straight.el#getting-started
|
||||||
|
@ -32,12 +35,16 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
|
|
||||||
(straight-use-package 'use-package)
|
(straight-use-package 'use-package)
|
||||||
(setq straight-use-package-by-default t)
|
(setq straight-use-package-by-default t)
|
||||||
|
;; Disable package.el in favor of straight.el
|
||||||
|
(setq package-enable-at-startup nil)
|
||||||
|
|
||||||
(use-package org)
|
(use-package org)
|
||||||
|
|
||||||
|
|
||||||
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
|
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
|
||||||
|
|
||||||
(org-babel-load-file "~/Nextcloud/textes/orgmode/config.org")
|
(org-babel-load-file "~/Nextcloud/textes/orgmode/config.org")
|
||||||
|
|
||||||
#+end_quote
|
#+end_quote
|
||||||
|
|
||||||
* Introduction
|
* Introduction
|
||||||
|
@ -55,14 +62,26 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
|
|
||||||
Plus sur mon blog:
|
Plus sur mon blog:
|
||||||
https://www.cipherbliss.com
|
https://www.cipherbliss.com
|
||||||
|
|
||||||
|
* List packages
|
||||||
|
Adding Melpa
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
|
;; add melpa packages
|
||||||
|
(require 'package)
|
||||||
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
|
||||||
|
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
|
||||||
|
;; and `package-pinned-packages`. Most users will not need or want to do this.
|
||||||
|
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
|
||||||
|
(package-initialize)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Orgmode
|
* Orgmode
|
||||||
** Grobal
|
** Grobal
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
;; Org-Mode
|
;; Org-Mode
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; Things we can't set as defaults above, we can set here
|
; Things we can't set as defaults above, we can set here
|
||||||
(defun org-setup ()
|
(defun org-setup ()
|
||||||
(setq line-spacing 3)
|
(setq line-spacing 3)
|
||||||
|
@ -131,6 +150,17 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
)
|
)
|
||||||
(add-hook 'org-mode-hook #'org-setup)
|
(add-hook 'org-mode-hook #'org-setup)
|
||||||
|
|
||||||
|
;; click a link in the same frame when opening a file
|
||||||
|
(custom-set-variables
|
||||||
|
'(org-link-frame-setup
|
||||||
|
'((vm . vm-visit-folder-other-frame)
|
||||||
|
(vm-imap . vm-visit-imap-folder-other-frame)
|
||||||
|
(gnus . org-gnus-no-new-news)
|
||||||
|
(file . find-file)
|
||||||
|
(wl . wl-other-frame)))
|
||||||
|
|
||||||
|
'(git-gutter:visual-line t)
|
||||||
|
)
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
** Contextes d'agenda
|
** Contextes d'agenda
|
||||||
|
@ -172,7 +202,7 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
|
|
||||||
(setq org-todo-keywords
|
(setq org-todo-keywords
|
||||||
'((sequence
|
'((sequence
|
||||||
"TODO(t)" ; next action
|
"TODO(t!)" ; next action
|
||||||
"STARTED(s)"
|
"STARTED(s)"
|
||||||
;; "TOBLOG(b)" ; next action
|
;; "TOBLOG(b)" ; next action
|
||||||
"WAITING(w@/!)"
|
"WAITING(w@/!)"
|
||||||
|
@ -449,37 +479,58 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
|
|
||||||
** Template de capture
|
** Template de capture
|
||||||
|
|
||||||
|
https://orgmode.org/manual/Template-expansion.html
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;;; templates de capture pour les nouvelles tâches
|
;;; templates de capture pour les nouvelles tâches
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
'(
|
'(
|
||||||
("t" "Todo" entry (file+headline "~/Nextcloud/textes/orgmode/tasks.org" "Inbox")
|
("t" "Todo" entry (file+headline "~/Nextcloud/textes/orgmode/tasks.org" "Inbox")
|
||||||
"* TODO %?\n %i\n ")
|
"* TODO %?\n")
|
||||||
("l" "ToLearn" entry (file+headline "~/Nextcloud/textes/orgmode/tasks.org" "Recherches et éducation")
|
("l" "ToLearn" entry (file+headline "~/Nextcloud/textes/orgmode/tasks.org" "Recherches et éducation")
|
||||||
"* LEARN %?\n %i\n %a")
|
"* LEARN %?\n %i\n %a")
|
||||||
("b" "Boulot" entry (file+headline "~/Nextcloud/textes/orgmode/boulot.org" "Inbox")
|
("b" "Boulot" entry (file+headline "~/Nextcloud/textes/orgmode/boulot.org" "Inbox")
|
||||||
"* TODO %?\n :boulot:work: %i\n %a")
|
"* TODO %?\n :boulot:work: \n %a")
|
||||||
;; (file "~/Nextclod/textes/orgmode/org-roam/20220620110632-meeting_template.org")
|
;; (file "~/Nextclod/textes/orgmode/org-roam/20220620110632-meeting_template.org")
|
||||||
("m" "Meeting" entry (file+datetree "~/Nextcloud/textes/orgmode/reunions.org" "Réunions")
|
("m" "Meeting" entry (file+datetree "~/Nextcloud/textes/orgmode/reunions.org" "Réunions")
|
||||||
"* Réunion %T \n :[[id:d8636e1d-0137-4502-9384-767b41c892b0][boulot:meeting:]] \n**** Gens présents\n**** Notes\n - %?\n**** Choses à investiguer\n -\n**** Prochaines actions\n - Fin de la réunion: \n"
|
"* Réunion %T \n :[[id:d8636e1d-0137-4502-9384-767b41c892b0][boulot:meeting:]] \n**** Gens présents\n**** Notes\n - %?\n**** Choses à investiguer\n -\n**** Prochaines actions\n - Fin de la réunion: \n"
|
||||||
)
|
)
|
||||||
("e" "E-mail" entry (file+headline "~/Nextcloud/textes/orgmode/tasks.org" "Inbox")
|
("e" "E-mail" entry (file+headline "~/Nextcloud/textes/orgmode/tasks.org" "Inbox")
|
||||||
"* TODO %? :mail:écriture:\n %i\n %a")
|
"* TODO %? :mail:écriture:\n ")
|
||||||
("n" "Next Task" entry (file+headline org-default-notes-file "Next")
|
("n" "Next Task" entry (file+headline org-default-notes-file "Next")
|
||||||
"** NEXT %? \nDEADLINE: %t")
|
"** NEXT %? \nDEADLINE: %t")
|
||||||
("p" "Phone call" entry (file+headline "~/Nextcloud/textes/orgmode/tasks.org" "Tel")
|
("p" "Phone call" entry (file+headline "~/Nextcloud/textes/orgmode/tasks.org" "Tel")
|
||||||
"* PHONE %? :tel:\n%U" :clock-in t :clock-resume t)
|
"* PHONE %? :tel:\n%U" :clock-in t :clock-resume t)
|
||||||
("j" "Journal" entry (file+datetree "~/Nextcloud/textes/orgmode/journal.org")
|
("j" "Journal" entry (file+datetree "~/Nextcloud/textes/orgmode/journal.org")
|
||||||
"* %?\nEntered on %U\n %i\n %a"))
|
"* %?\nEntered on %U\n "))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
;; raccourci custom pour clavier sans pavé numérique
|
;; raccourci custom pour clavier sans pavé numérique
|
||||||
(global-set-key (kbd "C-T") 'org-todo)
|
(global-set-key (kbd "C-T") 'org-todo)
|
||||||
|
|
||||||
|
(defun insert-created-date(&rest ignore)
|
||||||
|
(insert (format-time-string
|
||||||
|
(concat "\nCREATED: "
|
||||||
|
(cdr org-time-stamp-formats))
|
||||||
|
))
|
||||||
|
(org-back-to-heading) ; in org-capture, this folds the entry; when inserting a heading, this moves point back to the heading line
|
||||||
|
(move-end-of-line()) ; when inserting a heading, this moves point to the end of the line
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
; add to the org-capture hook
|
||||||
|
(add-hook 'org-capture-before-finalize-hook
|
||||||
|
#'insert-created-date
|
||||||
|
)
|
||||||
|
|
||||||
|
; hook it to adding headings with M-S-RET
|
||||||
|
; do not add this to org-insert-heading-hook, otherwise this also works in non-TODO items
|
||||||
|
; and Org-mode has no org-insert-todo-heading-hook
|
||||||
|
(advice-add 'org-insert-todo-heading :after #'insert-created-date)
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
** Org Roam, wiki personnel
|
** Org Roam, wiki personnel
|
||||||
https://systemcrafters.net/build-a-second-brain-in-emacs/capturing-notes-efficiently/
|
https://systemcrafters.net/build-a-second-brain-in-emacs/capturing-notes-efficiently/
|
||||||
|
|
||||||
|
@ -526,7 +577,6 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
(setq org-roam-directory "~/Nextcloud/textes/orgmode/org-roam")
|
(setq org-roam-directory "~/Nextcloud/textes/orgmode/org-roam")
|
||||||
(setq org-roam-completion-everywhere t)
|
(setq org-roam-completion-everywhere t)
|
||||||
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Roam graph
|
*** Roam graph
|
||||||
|
@ -642,6 +692,16 @@ exemple : <2022-06-27 lun. 18:51>
|
||||||
:custom
|
:custom
|
||||||
(cwm-centered-window-width 180))
|
(cwm-centered-window-width 180))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
* Dossiers
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; (use-package dirvish
|
||||||
|
;; :init
|
||||||
|
;; Let Dirvish take over Dired globally
|
||||||
|
;;(dirvish-override-dired-mode)
|
||||||
|
;; )
|
||||||
|
;; (require 'dirvish)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Fichiers récents
|
* Fichiers récents
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -997,7 +1057,10 @@ Deft
|
||||||
#+end_src
|
#+end_src
|
||||||
** Gestion de version
|
** Gestion de version
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
;; https://github.com/emacsorphanage/git-gutter
|
||||||
(use-package git-gutter)
|
(use-package git-gutter)
|
||||||
|
(global-git-gutter-mode +1)
|
||||||
|
(global-set-key (kbd "C-x C-g") 'git-gutter)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Auto format
|
** Auto format
|
||||||
|
@ -1131,7 +1194,7 @@ Deft
|
||||||
(interactive)
|
(interactive)
|
||||||
(message "Olivetti text-mode-hook")
|
(message "Olivetti text-mode-hook")
|
||||||
(text-scale-increase 1.5)
|
(text-scale-increase 1.5)
|
||||||
(olivetti-set-width .81)
|
(olivetti-set-width .67)
|
||||||
;; (hidden-mode-line-mode)
|
;; (hidden-mode-line-mode)
|
||||||
(olivetti-mode 1)))
|
(olivetti-mode 1)))
|
||||||
|
|
||||||
|
@ -1196,6 +1259,60 @@ Deft
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
*** Beamer
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(require 'ox-latex)
|
||||||
|
(add-to-list 'org-latex-classes
|
||||||
|
'("beamer"
|
||||||
|
"\\documentclass\[presentation\]\{beamer\}"
|
||||||
|
("\\section\{%s\}" . "\\section*\{%s\}")
|
||||||
|
("\\subsection\{%s\}" . "\\subsection*\{%s\}")
|
||||||
|
("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** présentation reveal js
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(straight-use-package '(ox-reveal :host github
|
||||||
|
:repo "yjwen/org-reveal"
|
||||||
|
:branch "master"))
|
||||||
|
|
||||||
|
(setq org-reveal-root "file:///home/tykayn/Nextcloud/textes/orgmode/reveal.js")
|
||||||
|
|
||||||
|
(require 'ox-reveal)
|
||||||
|
#+end_src
|
||||||
|
*** publication de site web du wiki
|
||||||
|
Ox-Hugo https://ox-hugo.scripter.co/doc/installation/
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; ----- hugo export to publish website
|
||||||
|
(use-package ox-hugo
|
||||||
|
:straight t ;Auto-install the package from Melpa
|
||||||
|
:pin melpa ;`package-archives' should already have ("melpa" . "https://melpa.org/packages/")
|
||||||
|
:after ox)
|
||||||
|
|
||||||
|
(setq org-hugo-base-dir "~/Nextcloud/textes/hugo")
|
||||||
|
(with-eval-after-load 'ox
|
||||||
|
(require 'ox-hugo))
|
||||||
|
|
||||||
|
(require 'ox-hugo)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Exports
|
||||||
|
|
||||||
|
*** export en JSON
|
||||||
|
|
||||||
|
Pour la création d'une page de rapport d'activités en HTML.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
|
(use-package ox-json
|
||||||
|
:straight t)
|
||||||
|
(require 'ox-json)
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Mystères
|
* Mystères
|
||||||
trucs à trouver comment faire
|
trucs à trouver comment faire
|
||||||
faire de la recherche avec Ctrl + F
|
faire de la recherche avec Ctrl + F
|
||||||
|
@ -1204,27 +1321,6 @@ Deft
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Exports
|
|
||||||
|
|
||||||
*** fichier JSON
|
|
||||||
Pour la création d'une page de rapport d'activités en HTML.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package ox-json
|
|
||||||
:straight t)
|
|
||||||
(require 'ox-json)
|
|
||||||
#+end_src
|
|
||||||
*** publication de site web du wiki
|
|
||||||
Ox-Hugo
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
;; ----- hugo export to publish website
|
|
||||||
(use-package ox-hugo
|
|
||||||
:after ox)
|
|
||||||
(setq org-hugo-base-dir "~/Nextcloud/textes/hugo")
|
|
||||||
(with-eval-after-load 'ox
|
|
||||||
(require 'ox-hugo))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Autre
|
* Autre
|
||||||
La suite est à inventer.
|
La suite est à inventer.
|
||||||
Pour installer cette configuration d'emacs, lancez le script
|
Pour installer cette configuration d'emacs, lancez le script
|
||||||
|
|
Loading…
Reference in New Issue