home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b42a2fd3a32ffbef6fbcfbc5fa3898d42a6cc904
parent c35db2395402d7325e786d1b3fdfea42ef2e4e65
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Fri, 10 Apr 2020 19:00:55 +0200

emacs: update org tags 🚕

@sthg to #sthg to reserve @ for people

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
MREADME.org | 2+-
Mdocs/emacs.org | 86++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mdocs/index.org | 2+-
Mtools/emacs/config/config-org.el | 20++++++++++----------
4 files changed, 55 insertions(+), 55 deletions(-)

diff --git a/README.org b/README.org @@ -1,5 +1,5 @@ #+TITLE: Home configuration files -#+FILETAGS: @home infra configuration dotfiles +#+FILETAGS: #home infra configuration dotfiles * What is ~home~ :PROPERTIES: diff --git a/docs/emacs.org b/docs/emacs.org @@ -219,7 +219,7 @@ /Note: the lowest emacs version I wanna support is 26 (as of today, might evolve)/ -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "CheckVer" :range-end "-CheckVer" :lines "3-13" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "CheckVer" :range-end "-CheckVer" :lines "6-16" We also want our configuration to be working the same on any computer, this means we want to define every option by ourselves, not relying on default files (~default.el~) that @@ -229,17 +229,17 @@ We also want to inhibit some initial default start messages and screen. The default screen will be as bare as possible. -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "Inhibit" :range-end "-Inhibit" :lines "16-20" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "Inhibit" :range-end "-Inhibit" :lines "19-23" Let's also use =y= or =n= instead of =yes= and =no= when exiting Emacs. -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "Confirm" :range-end "-Confirm" :lines "23-24" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "Confirm" :range-end "-Confirm" :lines "26-27" One last piece to the puzzle is the default mode. Setting it to fundamental-mode means we won't load any /heavy/ mode at startup (like =org-mode=). We also want this scratch buffer to be empty, so let's set it as well -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "DefaultMode" :range-end "-DefaultMode" :lines "27-29" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "DefaultMode" :range-end "-DefaultMode" :lines "30-32" *** Unicode all the way :PROPERTIES: @@ -249,7 +249,7 @@ By default, all my systems are configured and support =utf-8=, so let's just make it a default in Emacs ; and handle special case on demand. -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "Unicode" :range-end "-Unicode" :lines "32-37" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "Unicode" :range-end "-Unicode" :lines "35-40" *** Package management with =use-package= :PROPERTIES: @@ -275,7 +275,7 @@ We need to setup the emacs package system and install =use-package= if not present already. -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "UsePackageSetup" :range-end "-UsePackageSetup" :lines "40-89" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "UsePackageSetup" :range-end "-UsePackageSetup" :lines "43-92" *** =custom.el= :PROPERTIES: @@ -286,7 +286,7 @@ your liking, Emacs will append a piece of elisp to your init file. I prefer to have that stored in a separate file. -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "CustomFile" :range-end "-CustomFile" :lines "92-107" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "CustomFile" :range-end "-CustomFile" :lines "95-110" *** Remove built-in =org-mode= :PROPERTIES: @@ -297,14 +297,14 @@ configuration) instead of the built-in one. To do that safely, let's remove the built-in version out of the load path. -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "NoBuiltinOrg" :range-end "-NoBuiltinOrg" :lines "110-116" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "NoBuiltinOrg" :range-end "-NoBuiltinOrg" :lines "113-119" *** Pinentry :PROPERTIES: :CUSTOM_ID: h:1f016a1a-f4ef-4ef0-be01-1fd68ca0d951 :END: -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "Pinentry" :range-end "-PinEntry" :lines "119-123" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "Pinentry" :range-end "-PinEntry" :lines "122-126" *** Loading configuration files :PROPERTIES: @@ -321,29 +321,29 @@ Let's define some functions that would do the job. -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "LoadCfgFunc" :range-end "-LoadCfgFunc" :lines "126-136" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "LoadCfgFunc" :range-end "-LoadCfgFunc" :lines "129-139" Let's define some constants early, based on the system, and the environment, to be able to use those later on to skip some package or change some configuration accordingly. -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "CfgConstant" :range-end "-CfgConstant" :lines "139-170" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "CfgConstant" :range-end "-CfgConstant" :lines "142-173" Now, in order to load ~lisp~ and ~config~ files, it's just a matter of calling this function with the right argument. -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "CfgLoad" :range-end "-CfgLoad" :lines "173-176" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "CfgLoad" :range-end "-CfgLoad" :lines "176-179" Finally, I want to be able to load files for a specific machine, in case I need it (not entirely sure why yet but…) -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "CfgHostLoad" :range-end "-CfgHostLoad" :lines "179-181" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "CfgHostLoad" :range-end "-CfgHostLoad" :lines "182-184" *** Counting the time of loading :PROPERTIES: :CUSTOM_ID: h:2b645e95-6776-4f5b-a318-e5a915943881 :END: -#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "LastInit" :range-end "-LastInit" :lines "184-195" +#+INCLUDE: "../tools/emacs/init.el" src emacs-lisp :range-begin "LastInit" :range-end "-LastInit" :lines "187-198" ** ~PATH~'s customization :PROPERTIES: @@ -486,7 +486,7 @@ My current setup involves a =emacs --daemon= systemd service. We want to start the server if it's not already running, so that =emacsclient= can connect to it. -#+INCLUDE: "../tools/emacs/config/01-server.el" src emacs-lisp :range-begin "UseServer" :range-end "-UseServer" :lines "4-6" +#+INCLUDE: "../tools/emacs/config/01-server.el" src emacs-lisp :range-begin "UseServer" :range-end "-UseServer" :lines "7-9" ** Base typeface configurations :PROPERTIES: @@ -708,7 +708,7 @@ /I need to update and document =org-todo-state-tags-triggers= too/ - Tags :: I am using generic tags and some groups. Groups allow to define mutually - exclusive tags, like =@home= and =@work= (can't be both). This is achieve by using + exclusive tags, like =#home= and =#work= (can't be both). This is achieve by using =:startgroup= and =:endgroup= in the =org-tag-alist= variable. It is also possible to define [[https://orgmode.org/manual/Tag-Hierarchy.html#Tag-Hierarchy][tag hierarchies]] but I didn't look into it yet. @@ -779,15 +779,15 @@ + I turn on =auto-revert-mode= so that the buffer is always up-to-date. + I like to have header indented, so I'm enabling =org-indent-mode=. -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgHook" :range-end "-OrgHook" :lines "107-116" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgHook" :range-end "-OrgHook" :lines "107-119" Let's also use =org-id=… -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgId" :range-end "-OrgId" :lines "119-148" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgId" :range-end "-OrgId" :lines "122-151" … and =org-crypt= (for encrypted =org-mode= files). -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCrypt" :range-end "-OrgCrypt" :lines "151-156" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCrypt" :range-end "-OrgCrypt" :lines "154-159" **** TODO Refiling :PROPERTIES: @@ -822,11 +822,11 @@ agenda views. This allows to group things and overall set-up the agenda view I want. This agenda view uses the =n= key. -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgAgenda" :range-end "-OrgAgenda" :lines "159-208" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgAgenda" :range-end "-OrgAgenda" :lines "162-211" Let's try to get my work calendar entries in my agenda too. It is a little bit tricky 👼. -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgGcal" :range-end "-OrgGcal" :lines "211-225" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgGcal" :range-end "-OrgGcal" :lines "214-228" *** Habits :ATTACH: :PROPERTIES: @@ -858,14 +858,14 @@ [[./images/2020-02-29-14-41-59.png]] -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgHabit" :range-end "-OrgHabit" :lines "228-233" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgHabit" :range-end "-OrgHabit" :lines "231-236" *** TODO Sources :PROPERTIES: :CUSTOM_ID: h:82c3b800-9d80-408d-b3b6-54dc15b0590c :END: -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgSrc" :range-end "-OrgSrc" :lines "236-243" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgSrc" :range-end "-OrgSrc" :lines "239-246" *** TODO Capture :PROPERTIES: @@ -882,7 +882,7 @@ options. This is very interesting when you want to group some capture template together (like templates related to /work/, …). -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureStart" :range-end "-OrgCaptureStart" :lines "246-250" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureStart" :range-end "-OrgCaptureStart" :lines "249-253" Some of my capture template are big and hard to read if embedded in the =emacs-lisp= code. The good thing is that =org-mode= is able to load the template from files too 💃. @@ -890,44 +890,44 @@ Here is a list of my templates: - Default :: Store a link (mainly used with =org-protocol=) and take a random note - #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureOldTemplate" :range-end "-OrgCaptureOldTemplate" :lines "253-262" + #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureOldTemplate" :range-end "-OrgCaptureOldTemplate" :lines "256-265" - Tasks :: /work/ task, like reviewing a PR, or cleaning a folder. - #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureTask" :range-end "-OrgCaptureTask" :lines "265-277" + #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureTask" :range-end "-OrgCaptureTask" :lines "268-280" - journaling :: As I use =org-mode= for my /journal/ too, I need capture entry for it. I currently have two types of journal entry : - #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureJournalBase" :range-end "-OrgCaptureJournalBase" :lines "280-282" + #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureJournalBase" :range-end "-OrgCaptureJournalBase" :lines "283-285" + standard: one title and some text #+INCLUDE: "../tools/emacs/etc/orgmode/journal.org" src org - #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureJournalEntry" :range-end "-OrgCaptureJournalEntry" :lines "285-292" + #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureJournalEntry" :range-end "-OrgCaptureJournalEntry" :lines "288-295" + worklog: related to work, to be able to say what I did, what I wanted to do, problems, … during the daily #+INCLUDE: "../tools/emacs/etc/orgmode/worklog.org" src org - #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureWorklog" :range-end "-OrgCaptureWorklog" :lines "295-300" + #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureWorklog" :range-end "-OrgCaptureWorklog" :lines "298-303" - weekly review :: each and every week, I am going through this item to make my review of the week. #+INCLUDE: "../tools/emacs/etc/orgmode/weekly.org" src org - #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureWeekly" :range-end "-OrgCaptureWeekly" :lines "303-308" + #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureWeekly" :range-end "-OrgCaptureWeekly" :lines "306-311" - blog posts :: - #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureBlog" :range-end "-OrgCaptureBlog" :lines "318-320" + #+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureBlog" :range-end "-OrgCaptureBlog" :lines "321-323" -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureEnd" :range-end "-OrgCaptureEnd" :lines "323-324" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgCaptureEnd" :range-end "-OrgCaptureEnd" :lines "326-327" -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgProtocol" :range-end "-OrgProtocol" :lines "327-329" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgProtocol" :range-end "-OrgProtocol" :lines "330-332" *** Clocking :PROPERTIES: @@ -947,32 +947,32 @@ In addition to that workflow, I want to switch the state of the task to =STARTED= when I am clocking-in, if it's not already =STARTED=. -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgClock" :range-end "-OrgClock" :lines "332-425" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgClock" :range-end "-OrgClock" :lines "335-428" *** TODO Links :PROPERTIES: :CUSTOM_ID: h:afc81fbb-f7a0-401c-8b56-19f51edebd88 :END: -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgAttach" :range-end "-OrgAttach" :lines "428-433" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgAttach" :range-end "-OrgAttach" :lines "431-436" -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgLinks" :range-end "-OrgLinks" :lines "436-461" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgLinks" :range-end "-OrgLinks" :lines "439-464" *** TODO Litterate programming :PROPERTIES: :CUSTOM_ID: h:b5f6beba-6195-4ff0-a194-502ac2a9e3da :END: -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgBabel" :range-end "-OrgBabel" :lines "464-523" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgBabel" :range-end "-OrgBabel" :lines "467-526" *** TODO Exporting :PROPERTIES: :CUSTOM_ID: h:afad00e0-367c-4c7b-b191-e3ed72be754b :END: -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgExportConstants" :range-end "-OrgExportConstants" :lines "526-528" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgExportConstants" :range-end "-OrgExportConstants" :lines "529-531" -#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgExportCfg" :range-end "-OrgExportCfg" :lines "531-542" +#+INCLUDE: "../tools/emacs/config/config-org.el" src emacs-lisp :range-begin "OrgExportCfg" :range-end "-OrgExportCfg" :lines "534-545" ** TODO Email and newsgroup :PROPERTIES: @@ -1001,7 +1001,7 @@ Before configuring any email client, we need to establish some essentials: who we are, where our credentials are stored and whether encryption is supported. -#+INCLUDE: "../tools/emacs/config/config-mails.el" src emacs-lisp :range-begin "AuthSource" :range-end "-AuthSource" :lines "4-9" +#+INCLUDE: "../tools/emacs/config/config-mails.el" src emacs-lisp :range-begin "AuthSource" :range-end "-AuthSource" :lines "7-12" *** Gnus :PROPERTIES: @@ -1201,16 +1201,16 @@ :CUSTOM_ID: h:8cd8c972-ba38-40c2-b30f-68a4233593d6 :END: -#+INCLUDE: "../tools/emacs/config/config-mails.el" src emacs-lisp :range-begin "SendmailCfg" :range-end "-SendmailCfg" :lines "22-38" +#+INCLUDE: "../tools/emacs/config/config-mails.el" src emacs-lisp :range-begin "SendmailCfg" :range-end "-SendmailCfg" :lines "25-41" -#+INCLUDE: "../tools/emacs/config/config-mails.el" src emacs-lisp :range-begin "MessageCfg" :range-end "-MessageCfg" :lines "41-52" +#+INCLUDE: "../tools/emacs/config/config-mails.el" src emacs-lisp :range-begin "MessageCfg" :range-end "-MessageCfg" :lines "44-61" *** TODO ~notmuch~ configuration :PROPERTIES: :CUSTOM_ID: h:b67b377e-0fbc-4237-857c-641cdf2de1cf :END: -#+INCLUDE: "../tools/emacs/config/config-mails.el" src emacs-lisp :range-begin "Notmuch" :range-end "-Notmuch" :lines "55-73" +#+INCLUDE: "../tools/emacs/config/config-mails.el" src emacs-lisp :range-begin "Notmuch" :range-end "-Notmuch" :lines "64-82" * User interface and interactions :PROPERTIES: diff --git a/docs/index.org b/docs/index.org @@ -1,5 +1,5 @@ #+TITLE: Configurations -#+FILETAGS: @home infra configuration dotfiles +#+FILETAGS: #home infra configuration dotfiles #+SETUPFILE: ./.setupfile.org This set of pages and articles are describing and discussion my diff --git a/tools/emacs/config/config-org.el b/tools/emacs/config/config-org.el @@ -60,10 +60,10 @@ ("openshift") ("redhat") ("tektoncd") ("kubernetes") ("knative" ) ("docker") ("docs") ("code") ("review") (:startgroup . nil) - ("@home" . ?h) ("@work" . ?w) ("@errand" . ?e) ("@health" . ?l) + ("#home" . ?h) ("#work" . ?w) ("#errand" . ?e) ("#health" . ?l) (:endgroup . nil) (:startgroup . nil) - ("@link" . ?i) ("@read" . ?r) ("@project" . ?p) + ("#link" . ?i) ("#read" . ?r) ("#project" . ?p) (:endgroup . nil)) org-log-done 'time org-log-redeadline 'time @@ -179,11 +179,11 @@ org-agenda-custom-commands `(("w" "Work agenda" ((agenda "") - (tags-todo "@work-@home-goals+TODO=\"STARTED\"" + (tags-todo "#work-#home-goals+TODO=\"STARTED\"" ((org-agenda-overriding-header "Ongoing"))) - (tags-todo "@work-@home-goals+TODO=\"NEXT\"" + (tags-todo "#work-#home-goals+TODO=\"NEXT\"" ((org-agenda-overriding-header "Next"))) - (tags-todo "@work-@home-goals" + (tags-todo "#work-#home-goals" ((org-agenda-skip-function '(org-agenda-skip-if nil '(scheduled deadline))) (org-agenda-overriding-header "Work")))) ((org-super-agenda-groups @@ -195,17 +195,17 @@ (:habit t)))) (org-agenda-list)) ("n" "Personal agenda" - ((tags-todo "-@work-goals-incubate-inbox+TODO=\"STARTED\"" + ((tags-todo "-#work-goals-incubate-inbox+TODO=\"STARTED\"" ((org-agenda-overriding-header "Ongoing"))) - (tags-todo "-@work-goals-incubate-inbox+TODO=\"NEXT\"" + (tags-todo "-#work-goals-incubate-inbox+TODO=\"NEXT\"" ((org-agenda-overriding-header "Next"))) - (tags-todo "-@work-goals-incubate-inbox" + (tags-todo "-#work-goals-incubate-inbox" ((org-agenda-skip-function '(org-agenda-skip-if nil '(scheduled deadline))) (org-agenda-overriding-header "Home")))) ((org-super-agenda-groups '((:name "Important" :priority "A") - (:name "Home" :tag "@home") - (:name "Writing" :tag "@writing") + (:name "Home" :tag "#home") + (:name "Writing" :tag "#writing") (:habit t)))) (org-agenda-list))))) ;; -OrgAgenda