{"id":26870953,"url":"https://github.com/btbytes/emacsconf","last_synced_at":"2026-01-08T12:44:32.286Z","repository":{"id":255902855,"uuid":"853517933","full_name":"btbytes/emacsconf","owner":"btbytes","description":"my emacs config","archived":false,"fork":false,"pushed_at":"2024-09-08T19:07:19.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T03:53:35.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"YASnippet","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/btbytes.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-06T20:19:36.000Z","updated_at":"2024-09-08T19:07:23.000Z","dependencies_parsed_at":"2024-09-07T19:36:24.012Z","dependency_job_id":null,"html_url":"https://github.com/btbytes/emacsconf","commit_stats":null,"previous_names":["btbytes/emacsconf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Femacsconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Femacsconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Femacsconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btbytes%2Femacsconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/btbytes","download_url":"https://codeload.github.com/btbytes/emacsconf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246429498,"owners_count":20775809,"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-03-31T07:17:58.701Z","updated_at":"2026-01-08T12:44:32.250Z","avatar_url":"https://github.com/btbytes.png","language":"YASnippet","readme":"#+TITLE: My Emacs Configuration\n#+AUTHOR: Pradeep Gowda\n#+EMAIL: btbytes@gmail.com\n#+OPTIONS: num:nil \n\nMy emacs configuration written in literate style using org-mode.\n\n* Repos \u0026 Core Packages\n** Melpa \nMelpa is the big package repo that nearly /everything/ can be\nfound. It's a must for emacs configs.\n\n#+BEGIN_SRC emacs-lisp\n(require 'package)\n(add-to-list 'package-archives '(\"melpa\" . \"http://melpa.org/packages/\"))\n(package-initialize)\n#+END_SRC\n\n** Setup =use-package= if isn't already\n#+BEGIN_SRC emacs-lisp\n(unless (package-installed-p 'use-package)\n  (package-refresh-contents)\n  (package-install 'use-package))\n\n(eval-when-compile\n  (require 'use-package))\n#+END_SRC\n\n* Core Setup\n** Basic Stuff\n\n*** Better Defaults\n#+BEGIN_SRC emacs-lisp\n  (use-package better-defaults\n    :ensure t)\n#+END_SRC\n\n*** Splash Screen\nRemove splash screen and use *scratch* instead as the home buffer\n#+BEGIN_SRC emacs-lisp\n  (setq inhibit-startup-message t\n        inhibit-startup-echo-area-message t)\n#+END_SRC\n\nIncrease the garbage-collection threshold.\n\n#+begin_src emacs-lisp\n  (setq gc-cons-threshold 100000000)\n  (setq max-specpdl-size 5000)\n#+end_src\n\n\nThe most useful Emacs command is execute-extended-command. It should be painless to access from the home row. (bind-key* ensures that this setting is propagated through all major modes, which saves us a bunch of unbind-key calls in use-package stanzas.) Why not something even easier, like C-;, you ask? Unfortunately, macOS Terminal.app swallows that keybinding and does nothing with it. I’m sure this is correct behavior by some sort of standard, but I have to work around it, since occasionally I do use Emacs in the terminal.\n\n#+begin_src emacs-lisp\n  (bind-key* \"C-c ;\" #'execute-extended-command)\n  (bind-key* \"C-c 4\" #'execute-extended-command) ;; for a purely left-handed combo\n  (bind-key* \"C-c C-;\" #'execute-extended-command-for-buffer)\n#+end_src\n\nWith this auxiliary package for use-package, we can instruct Emacs that a given package depends on the presence of a system tool. It will even install this tool with the system’s recommended package manager.\n\n#+begin_src emacs-lisp\n  (use-package use-package-ensure-system-package)\n#+end_src\n\n\n** Fix the Defaults\n\n#+begin_src emacs-lisp\n  (setq\n   inhibit-startup-screen t\n   initial-scratch-message nil\n   ring-bell-function 'ignore\n   save-interprogram-paste-before-kill t\n   use-dialog-box nil\n   kill-whole-line t\n   default-directory \"~/code/\"\n   load-prefer-newer t\n   confirm-kill-processes nil\n   ;; unicode ellipses are better\n   truncate-string-ellipsis \"…\"\n   delete-by-moving-to-trash t\n   )\n#+end_src\n\nUTF-8 should be the default\n#+begin_src emacs-lisp\n  (set-charset-priority 'unicode)\n  (prefer-coding-system 'utf-8-unix)\n#+end_src\n\nTurn off backups and autosaves.\n\n#+begin_src emacs-lisp\n  (setq\n   make-backup-files nil\n   auto-save-default nil\n   create-lockfiles nil\n   )\n#+end_src\n\nBy default, Emacs stores any configuration you make through its UI by writing custom-set-variables invocations to your init file, or to the file specified by custom-file. Though this is convenient, it’s also an excellent way to cause aggravation when the variable you keep trying to modify is being set in some custom-set-variables invocation. We can disable this by mapping it to a temporary file. (I used to map this to /dev/null, but this started causing a bunch of inane save dialogues.)\n\n#+begin_src emacs-lisp\n  (setq custom-file (make-temp-name \"/tmp/\"))\n#+end_src\n\nDisable warning about theme safety\n\n#+begin_src emacs-lisp\n  (setq custom-safe-themes t)\n#+end_src\n\n** Visuals\n\nEmacs looks a lot better when it has a modern monospaced font and VSCode-esque icons, as well as smooth scrolling.\n\n#+begin_src emacs-lisp\n  (set-face-attribute 'default nil :font \"Fira Code-13\")\n  (set-face-attribute 'variable-pitch nil :font \"Noto Sans-13\")\n#+end_src\n\nOccupy all the screen space you can.\n\n#+begin_src emacs-lisp\n(add-to-list 'default-frame-alist '(fullscreen . maximized))\n#+end_src\n\n** IDE Features\n\n*** Magit\n\n#+begin_src emacs-lisp\n  (use-package magit\n  :diminish magit-auto-revert-mode\n  :diminish auto-revert-mode\n  :bind ((\"C-c g\" . #'magit-status))\n  :custom\n  (magit-diff-refine-hunk t)\n  (magit-repository-directories '((\"~/src\" . 1)))\n  (magit-list-refs-sortby \"-creatordate\")\n  :config\n  (defun pt/commit-hook () (set-fill-column 80))\n  (add-hook 'git-commit-setup-hook #'pt/commit-hook)\n  (add-to-list 'magit-no-confirm 'stage-all-changes))\n#+end_src\n\nIntegration with github and other code forges.\n\n#+begin_src emacs-lisp\n  (use-package forge\n    :ensure t\n    :after magit)\n#+end_src\n\n*** Searching\n\nUse ripgrep via deadgrep.\n\n#+begin_src emacs-lisp\n  (use-package deadgrep\n  :ensure t\n  :ensure-system-package rg\n  :bind ((\"C-c H\" . #'deadgrep)))\n#+end_src\n\n*** Snippets\n\n#+begin_src emacs-lisp\n  (use-package yasnippet\n    :ensure t\n    :defer 15\n    :config (yas-global-mode)\n    :custom (yas-prompt-functions '(yas-completing-prompt)))\n#+end_src\n\n\n** Language specific configurations\n\n*** Clojure\n\n#+begin_src emacs-lisp\n  (use-package cider\n    :ensure t\n    )\n  (add-hook 'clojure-mode-hook #'cider-mode)\n#+end_src\n\n*** markdown\n\n#+begin_src emacs-lisp\n    (use-package markdown-mode\n      :ensure t\n      :hook (gfm-mode . visual-line-mode)\n      :bind (:map markdown-mode-map (\"C-c C-s a\" . markdown-table-align))\n      :mode (\"\\\\.md$\" . gfm-mode)\n      :init (setq markdown-command \"pandoc\"))\n#+end_src\n\n*** just\n\njust is a great replacement for make.\n\n#+begin_src emacs-lisp\n  (use-package just-mode\n    :ensure t)\n#+end_src\n\n** Miscellaneous\n\n#+begin_src emacs-lisp\n  (use-package restclient\n    :ensure t)\n#+end_src\n\n** References\n\n- [[https://github.com/patrickt/emacs/blob/master/readme.org][patrickt/emacs]]\n- [[https://github.com/himmAllRight/dotfiles/tree/master/emacs][himmAllright/emacs]]\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtbytes%2Femacsconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbtbytes%2Femacsconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtbytes%2Femacsconf/lists"}