{"id":28759677,"url":"https://github.com/cemkeylan/doom.d","last_synced_at":"2026-02-02T14:04:24.461Z","repository":{"id":215865138,"uuid":"324307024","full_name":"cemkeylan/doom.d","owner":"cemkeylan","description":"Private Doom Emacs configuration","archived":false,"fork":false,"pushed_at":"2020-12-25T12:23:43.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-01-08T04:21:13.686Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cemkeylan.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-12-25T06:58:54.000Z","updated_at":"2020-12-25T12:23:45.000Z","dependencies_parsed_at":"2024-01-07T04:05:34.660Z","dependency_job_id":"7891e7fd-7015-484a-8d91-40c8977ab236","html_url":"https://github.com/cemkeylan/doom.d","commit_stats":null,"previous_names":["cemkeylan/doom.d"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/cemkeylan/doom.d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cemkeylan%2Fdoom.d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cemkeylan%2Fdoom.d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cemkeylan%2Fdoom.d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cemkeylan%2Fdoom.d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cemkeylan","download_url":"https://codeload.github.com/cemkeylan/doom.d/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cemkeylan%2Fdoom.d/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260294461,"owners_count":22987624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-17T05:07:58.904Z","updated_at":"2026-02-02T14:04:19.431Z","avatar_url":"https://github.com/cemkeylan.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: Literate Doom Configuration\n#+AUTHOR: Cem Keylan\n#+PROPERTY: header-args :tangle config.el\n\nThis is my Doom Emacs literate configuration. I am new to Doom, so I don't know\nwhat I want to configure yet. I am trying to add some functions from my old\nvanilla Emacs configuration. I am still learning how to configure Doom as I was\nconfiguring my own vanilla Emacs. I prefer configuration from org-mode so I can\neasily navigate and better express myself. I also may copy parts of the Doom\ndocumentation as reference to myself.\n\n* Useful Links\n\nHere are the references that I look frequently.\n\n[[doom-docs:api.org][- API Reference]]\n- [[doom-docs:modules.org][Modules Documentation]]\n\n* BOF and Personal Information\n\nThese are just the beginning of the export files and my personal information,\nnothing special.\n\n#+begin_src elisp\n;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-\n;; This is my private configuration file, generated from the README.org file.\n\n(setq user-full-name    \"Cem Keylan\"\n      user-mail-address \"cem@ckyln.com\")\n#+end_src\n\n#+begin_src elisp :tangle packages.el\n;; -*- no-byte-compile: t; -*-\n;;; $DOOMDIR/packages.el\n#+end_src\n\n** Leader keys\n\nMost META keys are used by my window manager configuration, so I don't want to\nbind alt-keys to my META key. I also don't want my local-leader to be a part of\nthe leader itself, because I don't want to press an extra key for mode-specific\nbindings.\n\n#+begin_src elisp\n(setq doom-leader-alt-key \"C-SPC\"\n      doom-localleader-key \",\"\n      doom-localleader-alt-key \"C-,\")\n#+end_src\n\n* Reclaiming Functions\n\nThere are some features that I don't exactly appreciate, so I want to redefine\nor remove them.\n\n** Substitution\n\nI am not a big fan of =evil-snipe= as I use =s= (substitute) a lot. I've removed\nthe package from my configuration to reclaim =s=.\n\n#+begin_src elisp :tangle packages.el\n(package! evil-snipe :disable t)\n#+end_src\n\n** TAB functionality\n\nI like the default functionality of pressing TAB on Emacs. I don't want to jump\nbetween items or anything like that. I think Emacs is pretty good at indenting\nautomatically, I can re-align stuff by using space or backspace if am unhappy\nwith it. I don't want Doom to insert snippets on visual mode, or jump between\nparentheses on normal mode. Just reclaim default functionality.\n\nAs a NOTE, I only care about reclaiming this functionality on =prog-mode=.\n\n#+begin_src elisp\n(setq-hook! prog-mode tab-always-indent t)\n(map! :mode prog-mode\n      :nvmi [tab] #'indent-for-tab-command)\n#+end_src\n\n* Org-mode\n\nI save my org-mode files on the default directory set by Doom.\n\n#+begin_src elisp\n(setq org-directory \"~/org/\")\n#+end_src\n\nBelow is my main configuration for org-mode, which is set after org is loaded. I\nhave taken most of these from Bernt Hansten's [[http://doc.norang.ca/org-mode.html][Guide to Org Mode]].\n\n#+begin_src elisp\n(after! org\n  (setq-default\n  org-adapt-indentation nil\n  org-agenda-span 'week\n  org-todo-keywords `((sequence \"TODO(t)\" \"NEXT(n)\" \"|\" \"DONE(d)\")\n                       (sequence \"WAITING(w@/!)\" \"HOLD(h@/!)\" \"|\"\n                                 \"CANCELLED(c@/!)\" \"PHONE\" \"MEETING\"))\n  org-use-fast-todo-selection t\n  org-refile-targets '((nil :maxlevel . 9) (org-agenda-files :maxlevel . 9))\n  org-refile-use-outline-path t\n  org-outline-path-complete-in-steps nil\n  org-todo-keyword-faces\n  '((\"TODO\" :foreground \"orange red\" :weight bold)\n    (\"NEXT\" :foreground \"cyan\" :weight bold)\n    (\"DONE\" :foreground \"spring green\" :weight bold)\n    (\"WAITING\" :foreground \"orange\" :weight bold)\n    (\"HOLD\" :foreground \"hot pink\" :weight bold)\n    (\"CANCELLED\" :foreground \"spring green\" :weight bold)\n    (\"MEETING\" :foreground \"spring green\" :weight bold)\n    (\"PHONE\" :foreground \"spring green\" :weight bold))\n  org-export-backends '(ascii beamer html latex man md groff\n                              texinfo koma-letter)))\n#+end_src\n\n** Doct\n\n=doct= is the \"Declarative Org Capture Template\". I use it to have a better\nvisual way of understanding my capture templates.\n\n#+begin_src elisp\n(use-package! doct\n  :after org\n  :config\n  (setq org-capture-templates\n        (doct '((\"todo\"\n                 :keys \"t\"\n                 :file \"~/org/refile.org\"\n                 :clock-in t\n                 :template (\"* %{todo-state} %^{Description}\"\n                            \":PROPERTIES:\"\n                            \":Created: %U\"\n                            \":END:\" \"%?\")\n                 :children ((\"todo\"\n                             :keys \"t\"\n                             :todo-state \"TODO\")\n                            (\"next\"\n                             :keys \"n\"\n                             :todo-state \"NEXT\")))\n                (\"note\"\n                 :keys \"n\"\n                 :file \"~/org/refile.org\"\n                 :clock-in t\n                 :template (\"* %? :NOTE:\"\n                            \"%U\"\n                            \"%a\"))\n                (\"email\"\n                 :keys \"e\"\n                 :file \"~/org/refile.org\"\n                 :clock-in t\n                 :template (\"* %? :EMAIL:\" \"%U\" \"%a\"))\n                (\"phone\"\n                 :keys \"p\"\n                 :file \"~/org/refile.org\"\n                 :clock-in t\n                 :template (\"* PHONE %? :PHONE:\" \"%U\" \"%a\"))\n                (\"journal\"\n                 :keys \"j\"\n                 :file \"~/org/diary.org\"\n                 :datetree t\n                 :template (\"* %?\" \"%U\"))\n                (\"recipe\"\n                 :keys \"r\"\n                 :file \"~/org/recipe.org\"\n                 :template (\"* %^{Recipe}\"\n                            \":PROPERTIES:\"\n                            \":Created: %U\"\n                            \":END:\" \"%?\"\n                            \"** Ingredients\"\n                            \"** Instructions\"))))))\n#+end_src\n\n#+begin_src elisp :tangle packages.el\n(package! doct)\n#+end_src\n\n** Source Edit Mode\n\nWhen I am editing a source block, I want to return back to my org-mode buffer\nwith a single press.\n\n#+begin_src elisp\n(define-key!\n  :definer 'minor-mode\n  :states  'normal\n  :keymaps 'org-src-mode\n  \"RET\" #'org-edit-src-exit)\n#+end_src\n\n* Email\n\nI don't use the mu4e configuration from Doom. I have mu4e installed on my\nsystem, and I use a custom configuration which is set by [[https://github.com/cemkeylan/mu-wizard][my mu4e wizard]].\n\n#+begin_src elisp\n(use-package mu4e\n  :if (executable-find \"mu\")\n  :commands mu4e mu4e-compose-new\n  :init\n  (map!\n   :leader\n   :desc \"Open mu4e\" \"m u\" #'mu4e\n   :desc \"Compose mail\" \"m c\" #'mu4e-compose-new))\n\n(add-to-list 'load-path \"~/conf/mu4e/\")\n(use-package mu4e-config\n  :if (executable-find \"mu\")\n  :after mu4e)\n#+end_src\n\n* User Interface\n** Doom theme\n\nPeople that know me knows that I am not good with themes and colour design in\ngeneral. They also know that I slap the dracula theme to anything that I set my\neyes on. Doom is not any different for this matter.\n\n#+begin_src elisp\n(setq doom-theme 'doom-dracula)\n#+end_src\n\n** Line numbers\n\nI always use relative numbers, but I personally do not like line-numbers on Text\nmodes.\n\n#+begin_src elisp\n(setq display-line-numbers-type 'relative)\n(setq-hook! text-mode display-line-numbers-type nil)\n#+end_src\n\n* Personal packages\n\nI have some personal packages and configurations that I want to load. I also\nhave a =lisp/= directory that I want to add to my load-path.\n\n#+begin_src elisp\n(add-load-path! \"lisp/\")\n#+end_src\n\n** Doas Edit\n\nI prefer using doas instead of =sudo=, so I have customized =sudo-edit= to use\ndoas instead.\n\n#+begin_src elisp\n(use-package! doas-edit\n  :if (executable-find \"doas\")\n  :commands doas-edit-find-file doas-edit\n  :init\n  (map!\n    [remap doom/sudo-find-file] #'doas-edit-find-file\n    [remap doom/sudo-this-file] #'doas-edit))\n#+end_src\n\n#+begin_src elisp :tangle packages.el\n(package! doas-edit\n  :recipe (:host github :repo \"cemkeylan/doas-edit\"))\n#+end_src\n\n** Redo mode\n\nI use the redo build system for some of my software. I have made a simple\n=redo-mode= which adds some syntax highlighting to redo build files (shell\nscripts).\n\n#+begin_src elisp\n(use-package! redo-mode\n  :mode \"\\\\.do\\\\'\")\n#+end_src\n\n#+begin_src elisp :tangle packages.el\n(package! redo-mode\n  :recipe (:host github :repo \"cemkeylan/redo-mode\"))\n#+end_src\n\n** CPT\n\nI have some simplistic functions as a package maintainer to ease off my work.\n\n#+begin_src elisp\n(use-package! cpt\n  :commands cpt-find-file\n  :init\n  (map!\n   :leader\n   (:prefix (\"c p\" . \"Package manager\")\n    :desc \"Find package file\" \"f\" #'cpt-find-file)))\n#+end_src\n\n* Editor Configuration\n\nWhat is the point of a text editor if you are not going to configure it like a\nmaniac? What are you going to do instead? Write code? The AUDACITY!\n\nI care about readability of the source code or the text I write. Even if I am\nwriting markdown, I care more about readability with a pager than HTML output.\nHTML prettifies the text, a pager does not.\n\n** Text filling\n\nI use text-filling functions in order to stay less than 80 characters where\npossible. I enforce this on text-modes where there is no excuse for writing more\nthan 80 characters on a file.\n\n#+begin_src elisp\n(setq-default fill-column 80)\n(add-hook! text-mode 'auto-fill-mode)\n#+end_src\n\n** Visual Lines\n\nI sometimes connect to Emacs from my phone (please don't get mad I want to\ncontinue editing text while going out for a smoke). However, since the screen\nof my phone is extremely small, I use visual-line-mode for editing text, and I\nbasically map =j= to =gj= and =k= to =gk= for easier navigation.\n\n#+begin_src elisp\n;; I don't want to enforce visual-lines on prog-mode\n(add-hook! text-mode 'visual-line-mode)\n\n(map! [remap evil-next-line]     #'evil-next-visual-line\n      [remap evil-previous-line] #'evil-previous-visual-line)\n#+end_src\n\n** Getting some Emacs movements\n\nI am brain-dead so I constantly try to switch between Emacs keys and Vim keys\neven after four years of using Vim and a year of using Evil-mode. Let's accept\nthis behaviour and map some Emacs keys to evil-mode.\n\n#+begin_src elisp\n(map! :nmi  \"C-n\" #'next-line\n      :nmi  \"C-p\" #'previous-line\n      :i    \"C-a\" #'move-beginning-of-line\n      :i    \"C-e\" #'move-end-of-line)\n#+end_src\n\n** Coding system\n\nFor some reason, unless you set your preferred coding system, there will be\ninconsistencies between the terminal and GUI Emacs frames.\n\n#+begin_src elisp\n(prefer-coding-system       'utf-8)\n(set-default-coding-systems 'utf-8)\n(set-terminal-coding-system 'utf-8)\n(set-keyboard-coding-system 'utf-8)\n#+end_src\n\n* Other settings\n** Synchronizing tangled files with the README\n\nI had adopted this method while I was using my vanilla Emacs with my literate\nconfiguration. I have a =pre-commit= hook so I can commit specific hunks for\neach file.\n\n#+begin_src sh :tangle pre-commit.hook :tangle-mode (identity #o755)\n#!/bin/sh -e\n\n# Create the staged version of the README file to a temporary file\ngit show :README.org \u003e README.tmp.org\ntrap 'rm -f README.tmp.org' EXIT INT\n\n# Tangle the temporary file and stage the tangled files\norg-tangle README.tmp.org\ngit add config.el packages.el pre-commit.hook\n\n# Revert to the previous state by re-tangling the previous version\norg-tangle README.org\n#+end_src\n\nI add this hook to the repository by symbolically linking it to the =.git=\ndirectory.\n\n#+begin_src sh :tangle no\nln -sf ../../pre-commit.hook .git/hooks/pre-commit\n#+end_src\n\n** Dired\n\nI don't use coreutils, so my =ls= does not have the =--dired= option.\n\n#+begin_src elisp\n(setq dired-use-ls-dired nil)\n#+end_src\n\n* Tangling this file\n\nI automatically tangle this file on save. Saves me from having to remember doing\nit.\n\n#+begin_src elisp\n(add-hook! after-save\n  (defun tangle-doom-conf ()\n    \"Tangle the private doom configuration.\"\n    (when (equal buffer-file-name (concat doom-private-dir \"README.org\"))\n      (org-babel-tangle))))\n#+end_src\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcemkeylan%2Fdoom.d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcemkeylan%2Fdoom.d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcemkeylan%2Fdoom.d/lists"}