Emacs | Kosta



Automatic Latex Preview Toggling in org-mode

In my org-mode setup, initially I used to preview the whole buffer all the time. However, as my files grew bigger the waiting time for this has become prohibitively expensive. Since then I have set it up to continuously recompile the file in the background each time the file is saved. It works pretty well since instead of spawning a new async process on each save, I have a single background process which recomiles in sync and thus needs not reload all the emacs on each recompile....

February 1, 2017

Proper Way to Setup Fonts in Emacs

I have set up my system to start up an emacs daemon automatically at system startup, to avoid the several seconds delay when I want to edit a file. The problem is, that setting up fonts does not work when there are no open frames. Moreover, in archlinux, emacs 24.5.1 actually crashes if I do that. The surprising thing is that setting up fonts via either of the hooks after-make-frame-functions or before-make-frame-hook does not work - the former does not set them up the first time a frame is opened, and the second one continues leading to a crash (as one might expect)....

January 11, 2016

Org-Capture Chrome Extension

I wrote up a small chrome extension for org-protocol. Comments, improvements and positive criticism are all welcome. The code is available at https://github.com/sprig/org-capture-extension The extension can be installed from https://chrome.google.com/webstore/detail/org-capture/kkkjlfejijcjgjllecmnejhogpbcigdc Enjoy!

July 7, 2015

Disabling helm-mode for org-mode org-set-tags in emacs

I recently started using helm-mode again and find ir pretty good, except for a quirk: It does not allow to tag a heading in org with more than one tag. The code uses the 24.4 advice system, but porting it back shouldn’t be a problem. I noticed that when providing tags in a capture via the template mechanism, helm is still used. But I’ll fix that at a later point....

May 3, 2014

Emacs EasyPG on OS X

EasyPG is a (built in) gpg encryption package for emacs. It allows you, for instance, to automatically (by default) encrypt on save/decrypt on open files with a .gpg extension. Its usefulness cannot be underestimated. I recently obtained a PC with OS X installed on it, and emacs would hang when trying to open .gpg files, with “Decrypting /path/to/file.gpg…0%” showing in the minibuffer. It turns out that with gnupg installed from ports, gpg would background a pinentry-ncurses process to take a decryption password from the user....

April 17, 2014