up config org
This commit is contained in:
parent
959c054bed
commit
99c08e560c
|
@ -6,9 +6,9 @@
|
||||||
* Ma config emacs
|
* Ma config emacs
|
||||||
|
|
||||||
|
|
||||||
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 l'actuel 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 de 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.
|
||||||
Fichiers souvent utiles:
|
Fichiers souvent utiles:
|
||||||
- file:/home/tykayn/Nextcloud/textes/orgmode/tasks.org
|
- file:/home/tykayn/Nextcloud/textes/orgmode/tasks.org
|
||||||
|
@ -20,6 +20,8 @@ Fichiers souvent utiles:
|
||||||
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
|
||||||
|
|
||||||
|
|
||||||
(defvar bootstrap-version)
|
(defvar bootstrap-version)
|
||||||
(let ((bootstrap-file
|
(let ((bootstrap-file
|
||||||
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||||
|
@ -39,9 +41,7 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
(setq package-enable-at-startup nil)
|
(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")
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
|
|
||||||
* Introduction
|
* Introduction
|
||||||
Ma configuration d'Emacs. Voir la doc personnelle des concepts généraux d'[[id:3adc0f02-729a-42fc-ae1f-7c29a1e5b11c][emacs]] ici.
|
Ma configuration d'Emacs. Voir la doc personnelle des concepts généraux d'[[id:3adc0f02-729a-42fc-ae1f-7c29a1e5b11c][emacs]] ici.
|
||||||
|
|
||||||
** Initialisation de cette configuration
|
** Initialisation de cette configuration
|
||||||
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**.
|
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.
|
J'utilise un dossier Nextcloud pour stocker mes textes, on retrouvera donc souvent des mentions à ce dossier dans la config.
|
||||||
|
@ -97,6 +96,7 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
(setq org-fontify-whole-heading-line t)
|
(setq org-fontify-whole-heading-line t)
|
||||||
(setq org-tags-column 0)
|
(setq org-tags-column 0)
|
||||||
(setq org-adapt-indentation t)
|
(setq org-adapt-indentation t)
|
||||||
|
;; (setq org-src-preserve-indentation t)
|
||||||
(setq org-deadline-warning-days 0)
|
(setq org-deadline-warning-days 0)
|
||||||
(setq line-move-visual t)
|
(setq line-move-visual t)
|
||||||
;; Keep tasks with dates on the global todo lists
|
;; Keep tasks with dates on the global todo lists
|
||||||
|
@ -171,13 +171,15 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
(tags-todo "drawing")
|
(tags-todo "drawing")
|
||||||
(tags-todo "coding")
|
(tags-todo "coding")
|
||||||
(tags-todo "writing")
|
(tags-todo "writing")
|
||||||
|
(tags-todo "reading")
|
||||||
(tags-todo "computer")
|
(tags-todo "computer")
|
||||||
(tags-todo "home")
|
(tags-todo "home")
|
||||||
|
(tags-todo "santé")
|
||||||
(tags-todo "errands"))
|
(tags-todo "errands"))
|
||||||
"Usual list of contexts.")
|
"Usual list of contexts.")
|
||||||
|
|
||||||
(setq org-agenda-sorting-strategy
|
(setq org-agenda-sorting-strategy
|
||||||
'((agenda time-up priority-down tag-up category-keep)
|
'((agenda tag-up time-up priority-down category-keep)
|
||||||
;; (todo user-defined-up todo-state-up priority-down effort-up)
|
;; (todo user-defined-up todo-state-up priority-down effort-up)
|
||||||
(todo todo-state-up priority-down effort-up)
|
(todo todo-state-up priority-down effort-up)
|
||||||
(tags user-defined-up)
|
(tags user-defined-up)
|
||||||
|
@ -196,6 +198,9 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
nil
|
nil
|
||||||
"\\<IGNORE\\>"))
|
"\\<IGNORE\\>"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
** Séquences de choses à faire
|
** Séquences de choses à faire
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -207,10 +212,6 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
;; "TOBLOG(b)" ; next action
|
;; "TOBLOG(b)" ; next action
|
||||||
"WAITING(w@/!)"
|
"WAITING(w@/!)"
|
||||||
"SOMEDAY(.)" "BLOCKED(k@/!)" "|" "DONE(x!)" "CANCELLED(c)")
|
"SOMEDAY(.)" "BLOCKED(k@/!)" "|" "DONE(x!)" "CANCELLED(c)")
|
||||||
(sequence "PROJECT" "|" "DONE(x)")
|
|
||||||
(sequence "LEARN" "TRY" "TEACH" "|" "DONE(x)")
|
|
||||||
;; (sequence "TOSKETCH" "SKETCHED" "|" "POSTED")
|
|
||||||
(sequence "TOBUY" "TOSHRINK" "TOCUT" "TOSEW" "|" "DONE(x)")
|
|
||||||
(sequence "TODELEGATE(-)" "DELEGATED(d)" "|" "DONE(x)")))
|
(sequence "TODELEGATE(-)" "DELEGATED(d)" "|" "DONE(x)")))
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -223,16 +224,9 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
|
|
||||||
(use-package org-super-agenda)
|
(use-package org-super-agenda)
|
||||||
(use-package org-ql)
|
(use-package org-ql)
|
||||||
|
|
||||||
|
|
||||||
(bind-key "<apps> a" 'org-agenda)
|
(bind-key "<apps> a" 'org-agenda)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(setq org-return-follows-link t)
|
(setq org-return-follows-link t)
|
||||||
(setq org-cycle-include-plain-lists 'integrate)
|
(setq org-cycle-include-plain-lists 'integrate)
|
||||||
|
|
||||||
|
|
||||||
(defun my-org-agenda-skip-scheduled ()
|
(defun my-org-agenda-skip-scheduled ()
|
||||||
(org-agenda-skip-entry-if 'scheduled 'deadline 'regexp "\n]+>"))
|
(org-agenda-skip-entry-if 'scheduled 'deadline 'regexp "\n]+>"))
|
||||||
|
|
||||||
|
@ -282,9 +276,16 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
("c" "Cancelled" tags-todo "CANCELLED")
|
("c" "Cancelled" tags-todo "CANCELLED")
|
||||||
("D" "Done tasks" tags-todo "DONE")
|
("D" "Done tasks" tags-todo "DONE")
|
||||||
("g". "GTD Searches") ;; category searches
|
("g". "GTD Searches") ;; category searches
|
||||||
|
("gd" "Daily"
|
||||||
|
agenda "" (
|
||||||
|
(org-agenda-overriding-header "\n-------------- Daily ------------------\n")
|
||||||
|
(org-agenda-span 1)
|
||||||
|
(tags-todo "+PRIORITY=\"A\"")
|
||||||
|
(tags-todo "+inbox")
|
||||||
|
)
|
||||||
|
)
|
||||||
("gw" "Weekly review"
|
("gw" "Weekly review"
|
||||||
agenda ""
|
agenda "" (
|
||||||
(
|
|
||||||
(org-agenda-overriding-header "\nRevue hebdomadaire\n------------------\n")
|
(org-agenda-overriding-header "\nRevue hebdomadaire\n------------------\n")
|
||||||
(org-agenda-start-day "-7d")
|
(org-agenda-start-day "-7d")
|
||||||
(org-agenda-span 7)
|
(org-agenda-span 7)
|
||||||
|
@ -308,7 +309,6 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
((org-agenda-skip-function 'my-org-agenda-skip-scheduled)
|
((org-agenda-skip-function 'my-org-agenda-skip-scheduled)
|
||||||
(org-agenda-sorting-strategy '(priority-down effort-down))
|
(org-agenda-sorting-strategy '(priority-down effort-down))
|
||||||
(org-agenda-max-entries 3)))
|
(org-agenda-max-entries 3)))
|
||||||
|
|
||||||
("p" "By priority"
|
("p" "By priority"
|
||||||
((tags-todo "+PRIORITY=\"A\"")
|
((tags-todo "+PRIORITY=\"A\"")
|
||||||
(tags-todo "+PRIORITY=\"B\"")
|
(tags-todo "+PRIORITY=\"B\"")
|
||||||
|
@ -321,11 +321,14 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
(org-agenda-start-on-weekday nil) ;; calendar begins today
|
(org-agenda-start-on-weekday nil) ;; calendar begins today
|
||||||
(org-agenda-repeating-timestamp-show-all t)
|
(org-agenda-repeating-timestamp-show-all t)
|
||||||
(org-agenda-entry-types '(:timestamp :sexp))))
|
(org-agenda-entry-types '(:timestamp :sexp))))
|
||||||
(agenda "" ((org-agenda-span 1) ; daily agenda
|
(agenda "" (
|
||||||
|
(org-agenda-span 1) ; daily agenda
|
||||||
(org-deadline-warning-days 7) ; 7 day advanced warning for deadlines
|
(org-deadline-warning-days 7) ; 7 day advanced warning for deadlines
|
||||||
(org-agenda-todo-keyword-format "[ ]")
|
(org-agenda-todo-keyword-format "[ ]")
|
||||||
(org-agenda-scheduled-leaders '("" ""))
|
(org-agenda-scheduled-leaders '("" ""))
|
||||||
(org-agenda-prefix-format "%t%s")))
|
(org-agenda-prefix-format "%t%s")
|
||||||
|
)
|
||||||
|
)
|
||||||
(todo "TODO" ;; todos sorted by context
|
(todo "TODO" ;; todos sorted by context
|
||||||
((org-agenda-prefix-format "[ ] %T: ")
|
((org-agenda-prefix-format "[ ] %T: ")
|
||||||
(org-agenda-sorting-strategy '(tag-up priority-down))
|
(org-agenda-sorting-strategy '(tag-up priority-down))
|
||||||
|
@ -361,13 +364,39 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
'(todo-state-down effort-up category-keep)))
|
'(todo-state-down effort-up category-keep)))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
))
|
)
|
||||||
|
)
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
** Ménage dans les tâches réalisées
|
||||||
|
|
||||||
** Revue mensuelle
|
#+begin_src emacs-lisp
|
||||||
|
(defun my-org-clean-up-inbox ()
|
||||||
|
"Archive all DONE tasks and sort the remainder by TODO order."
|
||||||
|
(interactive)
|
||||||
|
(with-current-buffer (find-file my-org-inbox-file)
|
||||||
|
(my-org-archive-done-tasks 'file)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(if (org-at-heading-p) (save-excursion (insert "\n")))
|
||||||
|
(org-sort-entries nil ?p)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(org-sort-entries nil ?o)
|
||||||
|
(save-buffer)))
|
||||||
|
|
||||||
|
(defun my-org-archive-done-tasks (&optional scope)
|
||||||
|
"Archive finished or cancelled tasks.
|
||||||
|
SCOPE can be 'file or 'tree."
|
||||||
|
(interactive)
|
||||||
|
(org-map-entries
|
||||||
|
(lambda ()
|
||||||
|
(org-archive-subtree)
|
||||||
|
(setq org-map-continue-from (outline-previous-heading)))
|
||||||
|
"TODO=\"DONE\"|TODO=\"CANCELLED\"" (or scope (if (org-before-first-heading-p) 'file 'tree))))
|
||||||
|
#+end_src
|
||||||
|
** Revue mensuelle (FIXME)
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
(defun my-org-review-month (start-date)
|
(defun my-org-review-month (start-date)
|
||||||
"Review the month's clocked tasks and time."
|
"Review the month's clocked tasks and time."
|
||||||
(interactive (list (org-read-date)))
|
(interactive (list (org-read-date)))
|
||||||
|
@ -432,7 +461,7 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Définir l'effort sur une tâche
|
** Définir l'effort sur une tâche
|
||||||
|
Raccourci pour définir un effort compté en nombre de minutes à consacrer à une tâche: F6.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; org-set-effort
|
;; org-set-effort
|
||||||
(global-set-key (kbd "<f6>") 'org-set-effort)
|
(global-set-key (kbd "<f6>") 'org-set-effort)
|
||||||
|
@ -470,7 +499,21 @@ Contenu du fichier de config [[file:~/.emacs]]
|
||||||
|
|
||||||
tags prédéfinis au choix lors de la qualification avec C-c C-q sur une tâche
|
tags prédéfinis au choix lors de la qualification avec C-c C-q sur une tâche
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq org-tag-alist '(("boulot" . ?b) ("family" . ?f) ("tel" . ?t) ("osm" . ?o) ("cil-gometz" . ?g) ("administratif" . ?a) ("adminsys" . ?d) ("dev" . ?v) ("inbox" . ?i) ("privacy" . ?p) ("habitudes" . ?h) ("backup" . ?u) ("email" .?e)))
|
(setq org-tag-alist '(
|
||||||
|
("adminsys" . ?A)
|
||||||
|
("administratif" . ?a)
|
||||||
|
("boulot" . ?b)
|
||||||
|
("dev" . ?d)
|
||||||
|
("email" .?e)
|
||||||
|
("GULL" . ?g)
|
||||||
|
("habitudes" . ?h)
|
||||||
|
("social" . ?s)
|
||||||
|
("tel" . ?t)
|
||||||
|
("osm" . ?o)
|
||||||
|
("inbox" . ?i)
|
||||||
|
("rangement" . ?r)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
(setq org-todo-state-tags-triggers '(("CANCELLED" ("ARCHIVE" . t))))
|
(setq org-todo-state-tags-triggers '(("CANCELLED" ("ARCHIVE" . t))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -486,6 +529,8 @@ https://orgmode.org/manual/Template-expansion.html
|
||||||
'(
|
'(
|
||||||
("t" "Todo" entry (file+headline "~/Nextcloud/textes/orgmode/tasks.org" "Inbox")
|
("t" "Todo" entry (file+headline "~/Nextcloud/textes/orgmode/tasks.org" "Inbox")
|
||||||
"* TODO %?\n")
|
"* TODO %?\n")
|
||||||
|
("d" "Todo this Day" entry (file+headline "~/Nextcloud/textes/orgmode/tasks.org" "Inbox")
|
||||||
|
"* TODO %?\nDEADLINE:%T")
|
||||||
("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")
|
||||||
|
@ -506,15 +551,14 @@ https://orgmode.org/manual/Template-expansion.html
|
||||||
|
|
||||||
|
|
||||||
;; 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-capture)
|
||||||
|
|
||||||
(defun insert-created-date(&rest ignore)
|
(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
|
(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
|
(move-end-of-line()) ; when inserting a heading, this moves point to the end of the line
|
||||||
|
(insert (format-time-string
|
||||||
|
(concat " \nCREATED: "
|
||||||
|
(cdr org-time-stamp-formats))
|
||||||
|
))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -544,7 +588,7 @@ https://orgmode.org/manual/Template-expansion.html
|
||||||
(org-roam-capture-templates
|
(org-roam-capture-templates
|
||||||
'(("d" "default" plain
|
'(("d" "default" plain
|
||||||
"%?"
|
"%?"
|
||||||
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
|
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n\n* ${title}%?")
|
||||||
:unnarrowed t)
|
:unnarrowed t)
|
||||||
("m" "meeting" plain (file "~/Nextclod/textes/orgmode/org-roam/20220620110632-meeting_template.org")
|
("m" "meeting" plain (file "~/Nextclod/textes/orgmode/org-roam/20220620110632-meeting_template.org")
|
||||||
:if-new (file+head "%<%Y%m%d%H%M%S>-meeting-${slug}.org" "#+title: ${title}\n")
|
:if-new (file+head "%<%Y%m%d%H%M%S>-meeting-${slug}.org" "#+title: ${title}\n")
|
||||||
|
@ -631,7 +675,6 @@ https://orgmode.org/manual/Template-expansion.html
|
||||||
;; agenda vue calendrier avec Ctrl Shift F12
|
;; agenda vue calendrier avec Ctrl Shift F12
|
||||||
(global-set-key (kbd "C-s-<f12>") 'cfw:open-org-calendar)
|
(global-set-key (kbd "C-s-<f12>") 'cfw:open-org-calendar)
|
||||||
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
* Insérer la date et l'heure
|
* Insérer la date et l'heure
|
||||||
|
|
||||||
|
@ -662,12 +705,10 @@ exemple : <2022-06-27 lun. 18:51>
|
||||||
;; fait par tykayn le 7-04-2022
|
;; fait par tykayn le 7-04-2022
|
||||||
;; version GNU Emacs 27.1
|
;; version GNU Emacs 27.1
|
||||||
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
** Gestion de paquets Straight.el
|
** Gestion de paquets Straight.el
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
|
|
||||||
;; on utilise straight.el pour déclarer les packages à utiliser
|
;; on utilise straight.el pour déclarer les packages à utiliser
|
||||||
#+end_src
|
#+end_src
|
||||||
** Charset UTF-8
|
** Charset UTF-8
|
||||||
|
@ -684,7 +725,6 @@ exemple : <2022-06-27 lun. 18:51>
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq initial-buffer-choice "~/Nextcloud/textes/orgmode/tasks.org")
|
(setq initial-buffer-choice "~/Nextcloud/textes/orgmode/tasks.org")
|
||||||
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
** Centrer la fenêtre
|
** Centrer la fenêtre
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -696,8 +736,8 @@ exemple : <2022-06-27 lun. 18:51>
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; (use-package dirvish
|
;; (use-package dirvish
|
||||||
;; :init
|
;; :init
|
||||||
;; Let Dirvish take over Dired globally
|
;; ;; Let Dirvish take over Dired globally
|
||||||
;;(dirvish-override-dired-mode)
|
;; (dirvish-override-dired-mode)
|
||||||
;; )
|
;; )
|
||||||
;; (require 'dirvish)
|
;; (require 'dirvish)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -742,7 +782,6 @@ exemple : <2022-06-27 lun. 18:51>
|
||||||
|
|
||||||
(global-set-key (kbd "C-<S-C>") 'comment-eclipse)
|
(global-set-key (kbd "C-<S-C>") 'comment-eclipse)
|
||||||
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
** Tout sélectionner
|
** Tout sélectionner
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -764,10 +803,12 @@ exemple : <2022-06-27 lun. 18:51>
|
||||||
"C-x C-q" ;; read-only-mode
|
"C-x C-q" ;; read-only-mode
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
* Common usage CUA
|
* Common usage CUA
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; raccourcis communs pour copier coller de texte
|
||||||
|
(cua-mode t)
|
||||||
|
#+end_src
|
||||||
* Recherche globale
|
* Recherche globale
|
||||||
Deft
|
Deft
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -784,8 +825,6 @@ Deft
|
||||||
* Lecture
|
* Lecture
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; raccourcis communs pour copier coller de texte
|
|
||||||
(cua-mode t)
|
|
||||||
|
|
||||||
;; - - - - - - - - - - - - - - - - - - - - - - - - - custom keys - - - - - - - - - - - - - - - - - - - - - - - - -
|
;; - - - - - - - - - - - - - - - - - - - - - - - - - custom keys - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
(global-set-key (kbd "C-c l") 'org-store-link)
|
(global-set-key (kbd "C-c l") 'org-store-link)
|
||||||
|
@ -794,28 +833,23 @@ Deft
|
||||||
;;---- open tasks list at startup
|
;;---- open tasks list at startup
|
||||||
(setq initial-buffer-choice "~/Nextcloud/textes/orgmode/config.org")
|
(setq initial-buffer-choice "~/Nextcloud/textes/orgmode/config.org")
|
||||||
|
|
||||||
|
|
||||||
;; barres de GUI
|
;; barres de GUI
|
||||||
(setq tool-bar-mode t)
|
(setq tool-bar-mode t)
|
||||||
(setq scroll-bar-mode t)
|
(setq scroll-bar-mode t)
|
||||||
(setq menu-bar-mode t)
|
(setq menu-bar-mode t)
|
||||||
|
|
||||||
|
|
||||||
(setq left-margin-width 5)
|
(setq left-margin-width 5)
|
||||||
(setq right-margin-width 5)
|
(setq right-margin-width 5)
|
||||||
|
|
||||||
|
|
||||||
;; highlight of lines
|
;; highlight of lines
|
||||||
(require 'hl-line)
|
(require 'hl-line)
|
||||||
(add-hook 'prog-mode-hook #'hl-line-mode)
|
(add-hook 'prog-mode-hook #'hl-line-mode)
|
||||||
(add-hook 'text-mode-hook #'hl-line-mode)
|
(add-hook 'text-mode-hook #'hl-line-mode)
|
||||||
|
|
||||||
|
|
||||||
;; fonts
|
;; fonts
|
||||||
;; font for errors
|
;; font for errors
|
||||||
(ignore-errors (set-frame-font "JuliaMono-12"))
|
(ignore-errors (set-frame-font "JuliaMono-12"))
|
||||||
|
|
||||||
|
|
||||||
(use-package doom-themes
|
(use-package doom-themes
|
||||||
:config
|
:config
|
||||||
;; Global settings (defaults)
|
;; Global settings (defaults)
|
||||||
|
@ -837,18 +871,16 @@ Deft
|
||||||
(use-package doom-modeline
|
(use-package doom-modeline
|
||||||
:config (doom-modeline-mode))
|
:config (doom-modeline-mode))
|
||||||
|
|
||||||
|
;; dossier des fichiers org à considérer pour les agendas, uniquement la racine du dossier orgmode dans Nextcloud
|
||||||
|
|
||||||
|
|
||||||
(setq org-agenda-files (list "~/Nextcloud/textes/orgmode"))
|
(setq org-agenda-files (list "~/Nextcloud/textes/orgmode"))
|
||||||
|
;; pouvoir faire du refile dans des headers de niveau 2 dans tasks.org
|
||||||
|
(setq org-refile-targets
|
||||||
|
'((nil :maxlevel . 1)
|
||||||
|
( "~/Nextcloud/textes/orgmode/tasks.org" :maxlevel . 2)))
|
||||||
|
|
||||||
;; alias
|
;; alias
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; - - - - - - - - - - - - - - matching parentheses - - - - - - - - - - - - - - - - - - - - - - - - - -
|
;; - - - - - - - - - - - - - - matching parentheses - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
(use-package paren
|
(use-package paren
|
||||||
:ensure nil
|
:ensure nil
|
||||||
|
@ -871,8 +903,6 @@ Deft
|
||||||
:after all-the-icons
|
:after all-the-icons
|
||||||
:hook (dired-mode . all-the-icons-dired-mode))
|
:hook (dired-mode . all-the-icons-dired-mode))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; - - - - - - - - - - - - - - - - - - - - - - - - - custom keys - - - - - - - - - - - - - - - - - - - - - - - - -
|
;; - - - - - - - - - - - - - - - - - - - - - - - - - custom keys - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
(global-set-key (kbd "C-c l") 'org-store-link)
|
(global-set-key (kbd "C-c l") 'org-store-link)
|
||||||
(global-set-key (kbd "C-c a") 'org-agenda)
|
(global-set-key (kbd "C-c a") 'org-agenda)
|
||||||
|
@ -892,15 +922,12 @@ Deft
|
||||||
(bind-key "C-c K" #'kill-all-buffers)
|
(bind-key "C-c K" #'kill-all-buffers)
|
||||||
(bind-key "C-x !" #'delete-other-windows) ;; Access to the old keybinding.
|
(bind-key "C-x !" #'delete-other-windows) ;; Access to the old keybinding.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defun switch-to-scratch-buffer ()
|
(defun switch-to-scratch-buffer ()
|
||||||
"Switch to the current session's scratch buffer."
|
"Switch to the current session's scratch buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(switch-to-buffer "*scratch*"))
|
(switch-to-buffer "*scratch*"))
|
||||||
(bind-key "C-c s" #'switch-to-scratch-buffer)
|
(bind-key "C-c s" #'switch-to-scratch-buffer)
|
||||||
|
|
||||||
|
|
||||||
;; voir la liste des tâches à l'état DONE
|
;; voir la liste des tâches à l'état DONE
|
||||||
(fset 'done-tasks-list
|
(fset 'done-tasks-list
|
||||||
(kmacro-lambda-form [?\C-c ?a ?t kp-2 ?r] 0 "%d"))
|
(kmacro-lambda-form [?\C-c ?a ?t kp-2 ?r] 0 "%d"))
|
||||||
|
@ -917,6 +944,7 @@ Deft
|
||||||
;; save all by default Was: isearch-forward
|
;; save all by default Was: isearch-forward
|
||||||
(defun save-all () (interactive) (save-some-buffers t))
|
(defun save-all () (interactive) (save-some-buffers t))
|
||||||
(global-set-key (kbd "C-x C-s") 'save-all)
|
(global-set-key (kbd "C-x C-s") 'save-all)
|
||||||
|
(global-set-key (kbd "C-o") 'save-all)
|
||||||
(global-set-key (kbd "C-S-c") 'comment-line)
|
(global-set-key (kbd "C-S-c") 'comment-line)
|
||||||
;; recherche dans tous les fichiers du dossier orgmode
|
;; recherche dans tous les fichiers du dossier orgmode
|
||||||
(global-set-key (kbd "C-S-f") 'deft)
|
(global-set-key (kbd "C-S-f") 'deft)
|
||||||
|
@ -924,12 +952,10 @@ Deft
|
||||||
;; recherche dans le fichier courant avec ctrl + f
|
;; recherche dans le fichier courant avec ctrl + f
|
||||||
(global-set-key (kbd "C-f") 'isearch-forward)
|
(global-set-key (kbd "C-f") 'isearch-forward)
|
||||||
|
|
||||||
|
|
||||||
(global-set-key (kbd "C-c C-f") 'org-roam-node-find)
|
(global-set-key (kbd "C-c C-f") 'org-roam-node-find)
|
||||||
(global-set-key (kbd "C-c C-i") 'org-roam-node-insert)
|
(global-set-key (kbd "C-c C-i") 'org-roam-node-insert)
|
||||||
(global-set-key (kbd "C-c i") 'org-roam-node-insert)
|
(global-set-key (kbd "C-c i") 'org-roam-node-insert)
|
||||||
|
|
||||||
|
|
||||||
(global-set-key (kbd "<f5>") 'org-capture)
|
(global-set-key (kbd "<f5>") 'org-capture)
|
||||||
(global-set-key (kbd "<f8>") 'org-cycle-agenda-files)
|
(global-set-key (kbd "<f8>") 'org-cycle-agenda-files)
|
||||||
(global-set-key (kbd "<f12>") 'org-agenda)
|
(global-set-key (kbd "<f12>") 'org-agenda)
|
||||||
|
@ -941,10 +967,8 @@ Deft
|
||||||
(global-set-key (kbd "<f2>") 'dir-treeview)
|
(global-set-key (kbd "<f2>") 'dir-treeview)
|
||||||
(global-set-key "\C-x\ \C-r" 'recentf-open-files)
|
(global-set-key "\C-x\ \C-r" 'recentf-open-files)
|
||||||
|
|
||||||
|
|
||||||
(setq org-agenda-sticky t)
|
(setq org-agenda-sticky t)
|
||||||
|
|
||||||
|
|
||||||
;; use org-bullets-mode for utf8 symbols as org bullets
|
;; use org-bullets-mode for utf8 symbols as org bullets
|
||||||
(use-package org-bullets)
|
(use-package org-bullets)
|
||||||
(require 'org-bullets)
|
(require 'org-bullets)
|
||||||
|
@ -966,9 +990,6 @@ Deft
|
||||||
;; make available "org-bullet-face" such that I can control the font size individually
|
;; make available "org-bullet-face" such that I can control the font size individually
|
||||||
(setq org-bullets-face-name (quote org-bullet-face))
|
(setq org-bullets-face-name (quote org-bullet-face))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; détail de combinaison de touches
|
;; détail de combinaison de touches
|
||||||
(use-package which-key
|
(use-package which-key
|
||||||
:diminish
|
:diminish
|
||||||
|
@ -1004,8 +1025,6 @@ Deft
|
||||||
'(org-level-5 ((t (:inherit outline-5 :height 1.0))))
|
'(org-level-5 ((t (:inherit outline-5 :height 1.0))))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Heure dans la modeline
|
* Heure dans la modeline
|
||||||
|
@ -1025,8 +1044,7 @@ Deft
|
||||||
calendar-day-abbrev-array ["dim" "lun" "mar" "mer" "jeu" "ven" "sam"]
|
calendar-day-abbrev-array ["dim" "lun" "mar" "mer" "jeu" "ven" "sam"]
|
||||||
calendar-day-name-array ["Dimanche" "Lundi" "Mardi" "Mercredi"
|
calendar-day-name-array ["Dimanche" "Lundi" "Mardi" "Mercredi"
|
||||||
"Jeudi" "Vendredi" "Samedi"]
|
"Jeudi" "Vendredi" "Samedi"]
|
||||||
calendar-month-abbrev-array
|
calendar-month-abbrev-array ["jan" "fév" "mar" "avr" "mai" "jun" "jul" "aou" "sep" "oct" "nov" "déc"]
|
||||||
["jan" "fév" "mar" "avr" "mai" "jun" "jul" "aou" "sep" "oct" "nov" "déc"]
|
|
||||||
calendar-month-name-array ["Janvier" "Février" "Mars" "Avril" "Mai"
|
calendar-month-name-array ["Janvier" "Février" "Mars" "Avril" "Mai"
|
||||||
"Juin" "Juillet" "Août" "Septembre"
|
"Juin" "Juillet" "Août" "Septembre"
|
||||||
"Octobre" "Novembre" "Décembre"]
|
"Octobre" "Novembre" "Décembre"]
|
||||||
|
@ -1046,8 +1064,6 @@ Deft
|
||||||
(save-some-buffers t))
|
(save-some-buffers t))
|
||||||
|
|
||||||
(add-hook 'focus-out-hook 'save-all)
|
(add-hook 'focus-out-hook 'save-all)
|
||||||
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
** Auto format à la sauvegarde
|
** Auto format à la sauvegarde
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -1060,14 +1076,22 @@ Deft
|
||||||
;; https://github.com/emacsorphanage/git-gutter
|
;; https://github.com/emacsorphanage/git-gutter
|
||||||
(use-package git-gutter)
|
(use-package git-gutter)
|
||||||
(global-git-gutter-mode +1)
|
(global-git-gutter-mode +1)
|
||||||
(global-set-key (kbd "C-x C-g") 'git-gutter)
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Auto format
|
** Auto format
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
(setq org-adapt-indentation t)
|
;; (setq org-adapt-indentation t)
|
||||||
|
;; *** Auto Indent
|
||||||
|
|
||||||
|
(defun indent-org-block-automatically ()
|
||||||
|
(when (org-in-src-block-p)
|
||||||
|
(org-edit-special)
|
||||||
|
(indent-region (point-min) (point-max))
|
||||||
|
(org-edit-src-exit)))
|
||||||
|
|
||||||
|
(global-set-key (kbd "C-M-f") 'indent-org-block-automatically)
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -1101,21 +1125,26 @@ Deft
|
||||||
(setq-default truncate-lines t)
|
(setq-default truncate-lines t)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
** Auto indentation et autres trucs
|
** Auto indentation et autres trucs
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
(use-package aggressive-indent)
|
(use-package aggressive-indent)
|
||||||
(global-aggressive-indent-mode 1)
|
(global-aggressive-indent-mode 1)
|
||||||
(delete-selection-mode t)
|
(delete-selection-mode t)
|
||||||
;; (global-display-line-numbers-mode t)
|
;; (global-display-line-numbers-mode t)
|
||||||
(column-number-mode)
|
(column-number-mode)
|
||||||
|
|
||||||
(add-hook 'before-save-hook #'delete-trailing-whitespace)
|
(add-hook 'before-save-hook #'delete-trailing-whitespace)
|
||||||
|
(add-hook 'before-save-hook #'indent-org-block-automatically)
|
||||||
(setq require-final-newline t)
|
(setq require-final-newline t)
|
||||||
|
|
||||||
|
;; hide some annoyances
|
||||||
(defun do-nothing (interactive))
|
(defun do-nothing (interactive))
|
||||||
(defalias 'view-emacs-news 'do-nothing)
|
(defalias 'view-emacs-news 'do-nothing)
|
||||||
(defalias 'describe-gnu-project 'do-nothing)
|
(defalias 'describe-gnu-project 'do-nothing)
|
||||||
|
|
||||||
|
;; run auto indent org block sources every 10 seconds
|
||||||
|
(run-at-time 1 10 'indent-org-block-automatically)
|
||||||
|
|
||||||
(setq user-full-name "TyKayn"
|
(setq user-full-name "TyKayn"
|
||||||
user-mail-address "contact@cipherbliss.com")
|
user-mail-address "contact@cipherbliss.com")
|
||||||
|
@ -1124,11 +1153,9 @@ Deft
|
||||||
** Markdown
|
** Markdown
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
|
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
:mode ("\\.\\(njk\\|md\\)\\'" . markdown-mode))
|
:mode ("\\.\\(njk\\|md\\)\\'" . markdown-mode))
|
||||||
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
** Json
|
** Json
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -1140,7 +1167,6 @@ Deft
|
||||||
(setq backup-directory-alist '(("." . "~/.config/emacs/backups")))
|
(setq backup-directory-alist '(("." . "~/.config/emacs/backups")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
* Écriture
|
* Écriture
|
||||||
|
|
||||||
** Références bibliographiques
|
** Références bibliographiques
|
||||||
|
@ -1185,28 +1211,26 @@ Deft
|
||||||
:config
|
:config
|
||||||
)
|
)
|
||||||
(setq olivetti-body-width .67
|
(setq olivetti-body-width .67
|
||||||
text-scale-increase 1.5
|
text-scale-increase 1.15
|
||||||
olivetti-mode t
|
olivetti-mode t
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;; change font size on load of text files
|
||||||
(add-hook 'text-mode-hook (lambda ()
|
(add-hook 'text-mode-hook (lambda ()
|
||||||
(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 .67)
|
(olivetti-set-width .67)
|
||||||
;; (hidden-mode-line-mode)
|
;; (hidden-mode-line-mode)
|
||||||
(olivetti-mode 1)))
|
(olivetti-mode 1)))
|
||||||
|
|
||||||
|
;; focus on text in fullscreen
|
||||||
|
|
||||||
(use-package writeroom-mode)
|
(use-package writeroom-mode)
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
** Auto complétion
|
** Auto complétion
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
|
|
||||||
;; Auto completion
|
;; Auto completion
|
||||||
(use-package company
|
(use-package company
|
||||||
:config
|
:config
|
||||||
|
@ -1215,7 +1239,6 @@ Deft
|
||||||
company-selection-wrap-around t))
|
company-selection-wrap-around t))
|
||||||
(global-company-mode)
|
(global-company-mode)
|
||||||
|
|
||||||
|
|
||||||
;; Helm configuration
|
;; Helm configuration
|
||||||
(use-package helm
|
(use-package helm
|
||||||
:config
|
:config
|
||||||
|
@ -1237,6 +1260,9 @@ Deft
|
||||||
|
|
||||||
** Exporter vers HTML avec un style commun
|
** Exporter vers HTML avec un style commun
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
;; exporter sans nombres ajoutés dans les titres de section
|
||||||
|
(setq org-export-with-section-numbers nil)
|
||||||
|
|
||||||
;; export with default modern css
|
;; export with default modern css
|
||||||
(defun my-org-inline-css-hook (exporter)
|
(defun my-org-inline-css-hook (exporter)
|
||||||
"Insert custom inline css"
|
"Insert custom inline css"
|
||||||
|
@ -1283,7 +1309,7 @@ Deft
|
||||||
|
|
||||||
(require 'ox-reveal)
|
(require 'ox-reveal)
|
||||||
#+end_src
|
#+end_src
|
||||||
*** publication de site web du wiki
|
*** publication de site web du wiki FIXME
|
||||||
Ox-Hugo https://ox-hugo.scripter.co/doc/installation/
|
Ox-Hugo https://ox-hugo.scripter.co/doc/installation/
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; ----- hugo export to publish website
|
;; ----- hugo export to publish website
|
||||||
|
@ -1313,26 +1339,36 @@ Deft
|
||||||
|
|
||||||
#+end_src
|
#+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
|
||||||
faire du remplacement avec Ctrl + H
|
faire du remplacement avec Ctrl + H
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
|
;; non pris en compte pour l'ajout d'une deadline ou schedule
|
||||||
|
|
||||||
|
(setq calendar-day-abbrev-array ["Dim" "Lun" "Mar" "Mer" "Jeu" "Ven" "Sam"])
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
uuuuehh
|
||||||
* 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
|
||||||
|
|
||||||
|
|
||||||
#+begin_quote bash
|
#+begin_quote bash
|
||||||
# bash install_emacs_config.sh
|
# bash install_emacs_config.sh
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
echo "installation d'emacs version snap"
|
||||||
|
|
||||||
|
sudo apt install snapd
|
||||||
snap install emacs --channel=beta --classic
|
snap install emacs --channel=beta --classic
|
||||||
|
|
||||||
mkdir -p ~/Nextcloud/textes/orgmode
|
mkdir -p ~/Nextcloud/textes/orgmode
|
||||||
mkdir -p ~/Nextcloud/textes/orgmode/org-roam
|
mkdir -p ~/Nextcloud/textes/orgmode/org-roam
|
||||||
|
|
||||||
|
mkdir -p ~/Nextcloud/textes/orgmode
|
||||||
|
|
||||||
touch ~/.emacs
|
touch ~/.emacs
|
||||||
touch ~/Nextcloud/textes/orgmode/config.org
|
touch ~/Nextcloud/textes/orgmode/config.org
|
||||||
touch ~/Nextcloud/textes/orgmode/tasks.org
|
touch ~/Nextcloud/textes/orgmode/tasks.org
|
||||||
|
|
Loading…
Reference in New Issue