Google Code shutting down, future of ErgoEmacs

Google announced that they are going to shut down Google Code. See http://google-opensource.blogspot.com/2015/03/farewell-to-google-code.html

ErgoEmacs is hosted on Google Code. https://code.google.com/p/ergoemacs/. What to do?

ErgoEmacs started in 2008. The goal was to create a binary usable emacs for Microsoft Windows, Mac. Note: a binary, that anyone who never heard of emacs can download and immediatly be productive like a notepad. No tech talk, but dense tech info available for those who look. Not some “welcome to the powerful editor emacs you must have heard, welcome to the elite hacker commu, now git clone this and that and unix then make, and set env var bash linux and open source be with you happy hacking fuck”

Thanks to David Capello's work over the years, the Windows binary became a reality and served its purpose well for a number of years. However, Mac version never came about.

Since about 2012, ErgoEmacs became largely dormant. David got other things to do, and i also got busy with other things. I still work on lots elisp code, but the last Microsoft Windows binary is in .

During these years, a number of things has happened. Emacs now has a package system. So, installing third-party software becomes easier and coherent. (but still require experienced emacs knowledge and programer know-how.)

Matthew L Fidler, took over the ErgoEmacs keybinding part (aka “ergoemacs-mode”), which is the main part of ErgoEmacs. Matthew has brought ergoemacs-mode to a new level, and is now released as a independent package at https://ergoemacs.github.io/, and it's also made into FSF's Elpa repository, as well as on MELPA repository.

ergoemacs-mode is the bulk of ErgoEmacs.

So, now, what should we do with ErgoEmacs? I sure don't have time to lead in building binaries. A downloadable binary that people can use right away is still lacking in the emacs community. But, i can't do it.

I'm thinking, i'll just use Google's provided tool to “migrate” to github, and just leave it there. Since 2012 ErgoEmacs binary for Microsoft Windows might still be useful for some.


Emacs Org Mode Bable bug. For emacs lisp, session is always on

Emacs Org Mode Bable bug. For emacs lisp, session is always on.

* test session; no session

#+BEGIN_SRC emacs-lisp :exports both
(setq x 3)

: 3

#+BEGIN_SRC emacs-lisp :exports both
(+ 2 x)

: 5

save the above as session-test.org, then open it, M-x org-mode. Move cursor to the elisp code block, press C-c C-c to eval. Repeat for the second block.

The expected result for second block should be error of unknown variable x.


emacs: xah fly keys, harmless key maps

Global Bindings Starting With <menu> n:
key             binding
---             -------

<menu> n RET    Prefix Command
<menu> n SPC    Prefix Command
<menu> n 0      shell-command-on-region
<menu> n 1      set-input-method
<menu> n 2      global-hl-line-mode
<menu> n 3      whitespace-mode
<menu> n 4      linum-mode
<menu> n 5      visual-line-mode
<menu> n 6      calendar
<menu> n 7      calc
<menu> n 8      shell
<menu> n 9      shell-command
<menu> n a      text-scale-adjust
<menu> n b      toggle-debug-on-error
<menu> n c      toggle-case-fold-search
<menu> n d      narrow-to-page
<menu> n e      eshell
<menu> n f      Prefix Command
<menu> n g      toggle-frame-fullscreen
<menu> n h      widen
<menu> n i      make-frame-command
<menu> n n      narrow-to-region
<menu> n r      read-only-mode
<menu> n s      flyspell-buffer
<menu> n t      narrow-to-defun
<menu> n u      menu-bar-open
<menu> n w      eww

<menu> n SPC h  xah-toggle-read-novel-mode
<menu> n SPC n  xah-toggle-line-spacing
<menu> n SPC t  xah-toggle-margin-right

<menu> n f C-f  find-file-other-frame
<menu> n f C-o  display-buffer-other-frame
<menu> n f .    find-tag-other-frame
<menu> n f 0    delete-frame
<menu> n f 1    delete-other-frames
<menu> n f 2    make-frame-command
<menu> n f b    switch-to-buffer-other-frame
<menu> n f d    dired-other-frame
<menu> n f f    find-file-other-frame
<menu> n f m    compose-mail-other-frame
<menu> n f o    other-frame
<menu> n f r    find-file-read-only-other-frame

<menu> n RET F  set-file-name-coding-system
<menu> n RET X  set-next-selection-coding-system
<menu> n RET c  universal-coding-system-argument
<menu> n RET f  set-buffer-file-coding-system
<menu> n RET k  set-keyboard-coding-system
<menu> n RET l  set-language-environment
<menu> n RET p  set-buffer-process-coding-system
<menu> n RET r  revert-buffer-with-coding-system
<menu> n RET t  set-terminal-coding-system
<menu> n RET x  set-selection-coding-system

These are keys starting with 【▤ Menu n】 from xah fly keys Mode. This key set is for commands that are “harmless” — even if called accidentally. They usually do prompt or do some display changes, and never edit anything.

What's the Impetus that Made Lambda Calculus So Powerful?

what's lambda calculus? It's a notation, and nothing but syntax & notation.

The λ-calculus is, at heart, a simple notation for functions and application. The main ideas are applying a function to an argument and forming functions by abstraction. The syntax of basic λ-calculus is quite sparse, making it an elegant, focused notation for representing functions. Functions and arguments are on a par with one another. The result is an intensional theory of functions as rules of computation, contrasting with an extensional theory of functions as sets of ordered pairs. Despite its sparse syntax, the expressiveness and flexibility of the λ-calculus make it a cornucopia of logic and mathematics. This entry develops some of the central highlights of the field and prepares the reader for further study of the subject and its applications in philosophy, linguistics, computer science, and logic.


and that's why, syntax is the most important thing in languages. Programing Language Syntax Soup


Clojure Support in emacs org-mode via nREPL/CIDER

Clojure Support in emacs org-mode via nREPL/CIDER

as you know, org-mode supports evaluating embedded source code of many languages. (that is, you can have many lang's code such as python in org file, then press a key to eval the code block and have the result embedded in the file (or just displayed), and when you export to HTML, you can also have it eval all source code and have result embedded in the doc.)

the current released version supports Clojure, but via SLIME, which is a engine for interaction with Common Lisp.

Using Clojure in emacs with SLIME is being obsoleted.

The good news is that, in the org-mode development version, it has a working version of clojure support with nREPL/CIDER.

goto http://orgmode.org/ and get the dev version.

basically, you just need to replace the old ob-clojure.el file with new.

how to use org mode's eval lang support? I'll have a article coming up. For now, you can read the official doc at http://orgmode.org/manual/Working-With-Source-Code.html#Working-With-Source-Code

if you don't know org mode basics, see Emacs: Writing Outline, org-mode Tutorial

Thanks to Bastien Guerry ( http://bzg.fr/ ), the current org-mode leader, and Eric Schulte ( http://www.cs.unm.edu/~eschulte/ ) who created the eval lang system in org-mode.

does md5 creates more randomness?

given a 32 digits hex number that is random enough. If i pass it thru md5, is the result more random or less?

few years back, i wrote a function to generate UUID, here: Emacs Lisp: Insert Random ID, Random UUID

I was simply calling random number function in emacs. Christopher Wellons improved it by first gather bunch of random info such as time, user's name, last keystroke typed, etc, then, feed it to md5, then basically use that result as UUID.

The question is, would that actually improve the function? That is, reduce the chances of generating the same UUID?

If you begin with random info such as time and user's last few keystrokes, then yes. But the step i don't quite understand is md5.

md5 takes arbitrary text and returns a 32 digits hexadecimal. Most or all other “hash function” do the same, that is, take a arbitrarily long or short text as input, and returns a fixed number of digits. But the interesting question is, such thing is mathematically impossible. Somewhat like a pigeon hole principle. You can never take many things and produce less things such that it is always unique for every input. The gist of “hash function” is about the impossibility of generating the input given the output. But, i don't know what's the uniqueness property.


clojure problem: string not in core

string manipulation is the most important element in modern programing. This is the first thing you teach to beginners, about any language.

But with clojrue, it's not core part of the language. You need to load it as a lib, or, go use Java's string stuff.

Try to tell that to beginner. You either face the immense complexity of clojure namespace , or the immense complexity of dealing with a entire complexity bag the interoperation with Java.

PS: actually, just prefix the namespace. ⁖ (clojure.string/upper-case "xyz").


One Weird Annoyance About Clojure: Java

one annoying thing about Clojure is that it runs on Java Virtual Machine. Clojure is actually a so-called hosted language, and this is by spec. (and JavaScript is a hosted language too. 〔➤ JavaScript Tutorial: Understand JavaScript in Depth〕).

This practically means is that, Clojure isn't a “fixed” language. For example, when it's running on JVM, its regex is Java syntax, its string functions are Java language's string methods. When it runs in JavaScript world (as ClojureScript do), its regex is JavaScript's regex. 〔➤ JavaScript Regex Syntax

But, that's not all. The MOST annoying thing is that, you actually need to know a lot about stinking Java in order to do any real world work with Clojure. (don't let any hacker type fanatics tell you otherwise) You need to know Java class/object system, its package system, its namespace scheme, Java Virtual Machine system, its compilation cycle, its tools and achive files. Even the official Clojure documentation, outright simply say things like “returns a Java xyz object.” with no further explanation, in lots of places.

it is not to be taken lightly, that when you learn Clojure, you actally need to gradually understand a lot about Java ecosystem too.

but at least, thank god, it's a lisp that has industrial value, and is a Java replacement.


show/edit zip file content in emacs

there's a patch for opening zip files in emacs. When opening a zip archive of a single file, emacs now can display its content (and you can edit it)

See: 〈bug#1702: [PATCH]: feature request: correctly display single file zip archive〉 at

It's going to be in emacs 25.x. Thanks to Matthew Leach for the patch.


clojure parser instaparse, and excellency of clojure docs

A clojure parser lib, instaparse: https://github.com/Engelberg/instaparse, seems to be the topnotch parser. Instaparse is written by Mark Engelberg.

It has excellent tutorial too. Clear, to the point.

so far i've seen, clojure community's doc is top-notch. The official documentation is excellent. The lib/build manager Leiningen's documentation is excellent. 〔➤ Clojure Leiningen Tutorial〕And now the instaparse documentation is excellent.

it appears, a language's community pretty much follows the style of its leader. In this case, it's Rich Hickey. You can see Hickey's writings, his documentation style, in several essays titled “Reference Documentation” at http://clojure.org/documentation. They are, concise, to the point.

meanwhile, python's documentation are pretentious garbage, following Guido's style. Here's a typical one: Python, Lambda, Guido: is Language Design Just Solving Puzzles?.

and perl's drivels are derived from Larry Wall's drivel. Here's a sample: Perl Documentation: the Key to Perl

for much more, see programing doc idiocies collection