Posts
Install LaTeX on Ubuntu is not as simple as you think.
First of all, I am no expert in LaTeX. I am just a dude who has (a lot) of trouble installing LaTeX and was trying to solve it.
From this experience, I learn important lesson is always start digging from the official documentation of the target packages/libraries. This is because there are many two types of solution in general: general solution and environment specific solution.
In this case, its clearly a environment specific problem which required environemnt speicific solution.
Posts
A Note Of X Where X = "Debugging Org's Overwritten Variables"
To debug org related bug, org-reload reloads all lisp files in ~/.emacs.d/.local/straight/repos/org/. Reloading config.el files should inform you what information has been overwritten. If you use Doom Emacs and modify either package.el or init.el, you must run doom sync in your terminal (outside of emacs), then consequently run doom/reload inside Doom Emacs for modification to correctly take effect.
It is important to note that you should always make sure to set custom-variables — variables declared by defcustom — using custom-set-variables.
Posts
A Note On X Where X = "adding jump state to command."
“Adding jump state to command.” implies that position ((point)) that the added command is evaluated is added to jump state. In the other word, you can get back to (point) that you executed the command by using (better-jumper-jump-forward).
I was trying to add “jump state” to (+spell/previous-error) and +spell/next-error.
Note that +spell prefix means this command is provided by a Doom’s module. From a quick glance into the code, it is clear that — just like other Doom’s module — it implements branching condition to allow fallback behavior based on context such as current mode or available packages.
Posts
A Note On X Where X = "Emac's Combobulate Package"
Lets inspect combobulate-navigate-previous by step into the function.
The following functions are called in order:
combobulate-navigate-previous combobulate--move-point-to-node responsible for display and move node. (combobulate--navigate 'previous) pass previuos to combobulate--navigate combobulate--nav-get-prev-sibling get sibling node by query its parents node and get all of its nodes. sibling nodes are arrange in order, so getting previous or next siblings nodes is easy. combobulate--nav-get-sibling-nodes outputs list of nodes seq filter check for matched node.
Posts
A Note on X where X = "LSP + flycheck + lsp-pyright"
History of edit
Last edit is <2022-11-28 Mon>. There are 3 components to pay attention to including: conda.el, lsp-pyright, and flycheck.
First, conda.el allows user to activate conda env from within Emacs. Users can check conda.el by checking conda-env-home-directory, conda-env-current-name, and conda-env-current-path.
Second, LSP is language server a general concept outside of Emacs and python. LSP may have type checking as its feature. lsp-pyright is python language server (called “pyright”).
Posts
A Note On X Where X = "Making Evil Mode Not Awkward With Zsh Completion In Doom Emacs Vterm"
Set pt value to pos fix awkward completion behavior in vterm.
(defun vterm-goto-char (pos) "Set point to POSITION for vterm. The return value is `t'when point moved successfully. It will reset to original position if it can't move there." (when (and vterm--term (vterm-cursor-in-command-buffer-p) (vterm-cursor-in-command-buffer-p pos)) (let ((moved t) (origin-point (point)) pt cursor-pos succ) (vterm-reset-cursor-point) ;; Anak: this line cause weird behavior with auto completion (setq cursor-pos (point)) ;; (setq pt cursor-pos) ;; Anak commented out this line (setq pt pos) ;; Anak added this line and completion in vterm works better.
Posts
Explaining X where X is "using Extended Euclidean algorithm (EEA) to find multiplicative inverse."
I always get lost in the detail when learning or working on math, and I find that new math concept introduced only a few important concepts. The rest are filling in details by connecting new and old concepts in the right order using math notation.
Think of new math concepts as tools that are reusable for tasks in which tools are specialized for.
In this series of “Explaining X” where X is any mathematical concept, I will try to avoid mathematical details and will try my best to capture the newly introduced concept.
Posts
Implementing X where X = "Custom Doom Emacs's Scratch Buffer"
I was trying to implement my own scratch buffer.I learned alot about Emacs’s way of programming. I gained a new mental debugging tool.
The main function I started to modify is doom/open-scratch-buffer. The functions deals with opening scratch buffer when current-buffer is inside and outside of a projectile’s project.
doom/open-scratch-buffer does the following
check if scratch will open in the same buffer or as pop up buffer Then, it passes arguments to (doom-scratch-buffer &optional DONT-RESTORE-P MODE DIRECTORY PROJECT-NAME).
Posts
Must Read before running "Doom upgrade"!!!!!!
Doom discord announces important update and fixes. This is where you should take a look first before attempting to pull remote commits that are ahead of your local commits.
Doom emacs has only 1 branch. It used to have 2 main branch master and develop branch, but Henrik give up on develop branch because, I assume, its too much work to make develop branch stable before merging to master. For this reason, instead of merging develop branch to master branch.
Posts
Note of X where X = "I cannot set custom-variable of org-agenda using either setq or custom-set-variables"
I couldn’t use setq and custom-set-variables to have org-refile shows list of newly set org-agenda-files.
Started to solve, first suspect I found was when I learned about custom.el file. Custom variable set by defcustom will set custom value in custom.el. I reset all custom.el to nil to make sure that it doesn’t set custom variables under weird condition that I am not aware of.
I reloaded Doom Emacs. Changed variables didn’t reflect in helpful-variable, and org-agenda-files was not set to nil — value shown in custom.