aboutsummaryrefslogtreecommitdiff
path: root/Doom/.config/doom/org/personal.org
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-05-07 23:54:44 +0530
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-05-07 23:54:44 +0530
commita4e68b7bf9f4875d2c0da6f54c3cb8c7bc853346 (patch)
treee8cce8153e15e0dcc475ea6e679696dca9fc8cab /Doom/.config/doom/org/personal.org
parent6b6055a85567c04fd9fabf67603fbeaa7e51df7b (diff)
downloaddotfiles-a4e68b7bf9f4875d2c0da6f54c3cb8c7bc853346.tar.gz
dotfiles-a4e68b7bf9f4875d2c0da6f54c3cb8c7bc853346.tar.bz2
dotfiles-a4e68b7bf9f4875d2c0da6f54c3cb8c7bc853346.zip
(Doom)-Deleted Doom
I've superseded all the functionality I wanted in doom for quite some time now. I don't see any reason for using it, and it usually makes it a bit annoying to find stuff in the project due to file name conflicts. As a final note, thank you very much Doom Emacs (hlissner in particular) for introducing me to this amazing software. The community was really welcoming and I was very much eased into the learning curve of Emacs, after coming from Vim.
Diffstat (limited to 'Doom/.config/doom/org/personal.org')
-rw-r--r--Doom/.config/doom/org/personal.org101
1 files changed, 0 insertions, 101 deletions
diff --git a/Doom/.config/doom/org/personal.org b/Doom/.config/doom/org/personal.org
deleted file mode 100644
index 7398769..0000000
--- a/Doom/.config/doom/org/personal.org
+++ /dev/null
@@ -1,101 +0,0 @@
-#+TITLE: Personal module
-
-* Preclude
-Personal functionality or variables that aid my workflow or are just cool.
-* Variables
-Some user variables
-#+BEGIN_SRC elisp
-(setq user-full-name "Aryadev Chavali"
- user-mail-address "aryadevchavali1@gmail.com")
-#+END_SRC
-* Change theme
-Allow user to set a theme from a limited set of candidates, based on "dx:theme-list".
-
-- Themes sanctioned by me:
- - doom-solarized-dark: just the right everything. best for day.
- - doom-gruvbox: good contrast, better for night.
- - doom-city-lights: Eh contrast, quite dark
- - doom-outrun-electric: Interesting colour palette
- - doom-vibrant: Good contrast, bit lighter
- - doom-molokai/doom-monokai-classic: hacker style
- - doom-solarized-light: Light orange theme that's actually okay on the eyes
- - doom-acario-light: Light theme with not bad colours
-- Themes not sanctioned:
- - Light themes other than solarized-light and acario
- - Horrid low contrast ones with no colour. Grayscale particularly. I can't
- handle those.
-
-#+BEGIN_SRC elisp
-(setq dx:themes/theme-list '(doom-solarized-dark
- doom-gruvbox
- doom-molokai
- doom-monokai-classic
- doom-solarized-light
- doom-acario-light))
-
-(defun dx:themes/set-new-theme ()
- "Set the theme from my own selection, mutate as you see fit"
- (interactive)
- (let ((theme (completing-read "Select theme: " dx:themes/theme-list)))
- (condition-case nil
- (progn
- (mapc #'disable-theme custom-enabled-themes)
- (load-theme (intern theme) t)
- (when (fboundp 'powerline-reset)
- (powerline-reset)))
- (error "Problem loading theme %s" theme))))
-#+END_SRC
-* Password store
-Function to get a password given a key.
-#+BEGIN_SRC elisp
-(defun dx:password-store/get-password (KEY)
- (shell-command-to-string (concat "pass " KEY)))
-#+END_SRC
-* Insert newlines without o/O
-Insert a newline without having to exit normal mode!
-#+BEGIN_SRC elisp
-(defun dx:newline (&optional BACKWARD)
- (interactive)
- (message "%s" BACKWARD)
- (let ((old (point)))
- (cond ((and BACKWARD (= BACKWARD 1)) (+default/newline-above))
- (t (+default/newline-below)))
- (goto-char (+ old 1))
- (evil-normal-state)))
-#+END_SRC
-* Convert auto-fill lines to long truncate-lines
-Consider some org file with auto filled lines.
-I don't like auto-filled lines.
-So I want to convert them.
-I've setup macros countless times to do this operation for me, may as well formalize it as a function.
-
-Firstly, I need a function to count the number of instances of some substring occur in some other string.
-Shamelessly copied from rosetta code.
-#+BEGIN_SRC elisp
-(defun dx:org/count-sub (str pat)
- (loop with z = 0 with s = 0 while s do
- (when (setf s (cl-search pat str :start2 s))
- (incf z) (incf s (length pat)))
- finally (return z)))
-#+END_SRC
-
-Then the main function, works like so:
-1) Search the text in the region for newlines then join the lines to make a single segment
-2) Search for sentences through Emacs builtin =forward-sentence= and =forward-char= functions then newline via sentences
-#+BEGIN_SRC elisp
-(defun dx:org/fill-to-long-lines ()
- (interactive)
- (let* ((beg (region-beginning))
- (end (region-end))
- (region-text (buffer-substring-no-properties beg end))
- (n-sentences (dx:org/count-sub region-text "."))
- (parsed-text (apply #'concatenate 'string (cl-loop for c from beg to end collect
- (if (string= (buffer-substring-no-properties c (+ c 1)) "\n") " "
- (buffer-substring-no-properties c (+ c 1)))))))
- (delete-region beg end)
- (insert parsed-text)
- (message "%s" n-sentences)
- (evil-normal-state)
- (evil-digit-argument-or-evil-beginning-of-line)
- (cl-loop for i from 1 to n-sentences do (forward-sentence) (forward-char) (newline))))
-#+END_SRC