Since I’m continuously tweaking my Emacs configuration, I found myself repeatedly opening my init file, hitting
C-x C-f init RET (with a few moments of waiting before
RET, so that
ido has a chance to recall where my
init.el resides). Since I was a bit tired of that, I finally looked for some undefined key, found
C-h C-i (maybe not the best combo, but who cares), and did this:
(global-set-key (kbd "C-h C-i") (lambda () (interactive) (find-init-file) (orgstruct-mode 1)))
As you can see, I’m turning Orgstruct mode here. It seems that it’s the easiest way to ``orgify’’ one’s init file, and I didn’t want to turn Orgstruct mode on with a file-local variable, since then Emacs would load Org before my customization of e.g.
org-export-backends (or at least I think so, in fact, I didn’t check it). Of course, I also did
(setq orgstruct-heading-prefix-regexp ";; ")
I am currently in the process of moving my email workflow to a saner one (which I will probably write about in some time), so I tried to learn basics of applied cryptography. After successfully setting up my key pair, I went on to store passwords in encrypted files and making my email retrieval tool use some kind of agent (currently the default Ubuntu’s one, which is kind of broken – like a lot of things in Ubuntu…) to ease the pain of typing the passwords again and again. During some exchange on the Emacs mailing list, I was advised to use the pass utility instead of “raw” gpg to store my passwords. What a great little program it is! It even supports
git: if the password store is at the same time a git repo, all password changes will be automatically committed. Cute! The only reason I’m not going to migrate my KeePass database to
pass is that Kee
Pass has a nice Android client.
Tired of doing
C-h f, then typing the function name and then
C-x C-o TAB RET to go to the source, I finally put the
C-h C-f (replacing mostly useless Emacs FAQ) (I learned about
find-function from the indispensable Emacs Redux post.) However, I usually don’t want to edit my Emacs’ guts in place, so I looked up the (two-line) source for
find-function (guess how, ha, ha), and came up with this one:
(defun find-function-view-mode (fun) (interactive (find-function-read)) (find-function-do-it fun nil 'switch-to-buffer) (view-mode 1)) (global-set-key (kbd "C-h C-f") 'find-function-view-mode)
Trivial, but very useful.
As a side note: I also added
(global-set-key (kbd "C-z C-v") 'view-mode) to my C-z keymap. Being used to
less (how metaphysical!), I like
view-mode a lot. Give it a try if you happen to open files in Emacs just to look at them, not edit them.
(Więcej means More in Polish; click it to see older entries.)