Irreal: Guile and Emacs

Three years ago, I wrote about a talk by Andy Wingo on the new Guile architecture. One of the most interesting things in the talk for me was Wingo’s plans to integrate Guile into Emacs by replacing the Elisp engine with the Guile engine. Guile already has an Elisp mode so the idea is that existing packages wouldn’t need to be rewritten and new code could be written in either Elisp or Scheme.

Since that talk I haven’t heard much about the project except for an occasional question on reddit or HN as to whether it was still alive. It turns out that it is alive and one of this year’s Google Summer of Code projects is to complete the integration of Guile into Emacs.

Sadly, I can’t find much useful information about the project but this article on the Emacs Wiki gives some useful background. It’s not clear that the Emacs maintainers would accept Guile as the new Emacs engine so Guile-Emacs may be just a curiosity. On the other hand, it may turn out to offer enough advantages that it does get accepted. It will be interesting to see what happens.

-1:-- Guile and Emacs (Post jcs)--L0--C0--April 24, 2014 09:32 AM

sachachua: Reinvesting time and money into Emacs

I received a wonderful token of appreciation from someone who found my Emacs posts useful. It got me thinking: what would it be like if I made Emacs a large part of my life’s work, and how can I invest even more into it?

Emacs is already a big part of my life. I like the community. I get a lot of positive feedback indicating I might be doing useful things. It’s not like much would change, except perhaps that I’d give myself permission to focus on this, to put more eggs in this basket. I might write about Emacs more often, even if it makes other people boggle. I might tweak the design of my blog to simplify browsing through Emacs-related resources, and maybe come up with an easier-to-spell domain name for that part of my site. Focusing on Emacs is probably low-risk, since my savings give me a decent runway if I need to build up more marketable skills like WordPress or Rails. (Or I could be, like, one of the few Emacs coaches/consultants in the world. ;) )

To make the decision clearer to myself, here’s what would go on the backburner: specializing in a more popular platform (WordPress, Rails, etc.), Quantified Self, helping people with blogging, helping people with sketchnoting, helping people with freelancing/semi-retirement, delegation, and so on. I could probably build up a reputation in those communities later on, but I like Emacs the most right now.

I like focusing on helping people discover the joys of exploring and customizing Emacs: blog posts, tutorials, suggestions, screencasts, maps, and maybe someday those guides and books I’ve been talking about writing. I like helping make Emacs learning slightly more manageable – “if you know about this, you might want to check out that.” I enjoy coding, but I haven’t gotten deeply into the big improvements people are working on for Emacs 24 and later. I’ll probably continue to focus on filling in the gaps instead of pushing Emacs forward.

I’ve been thinking about how I can reinvest money into the Emacs community. There was a recent thread on the Orgmode mailing list about donations – trying to figure out how to put people’s donations to the best use. Sometimes I receive donations too. Since I keep my expenses low and there’s only so much safety you can save up for, how can I put small amounts of money to good use in open source?

Domain name, hosting, etc.: I use a Linode VPS – I switched from Rackspace in 2011. A virtual private server is more expensive than shared hosting providers. I like how I can ssh to it to try different things. I’ve thought about lowering my costs by using DigitalOcean, but I don’t know enough yet about server optimization to properly configure my web server setup so that I’m confident I’d fit into a smaller plan. (Hmm, this might be worth experimenting with someday, especially since I could set up a snapshot and save it…) I’ve budgeted for this and for domain naimes since this is such a big part of what I do, so I don’t mind covering this myself and using donations/unexpected income for other things.

Transcripts for Emacs Chats and other videos: I’ve been outsourcing this instead of doing it myself because transcription is a well-specified chunk of work that I can pass to other people (who can learn a little more along the way). It takes about $35-$60 for a transcript, and then I often edit it a little. The assistant who does my Emacs Chat transcripts is interested in programming, but hasn’t gotten into Emacs specifically. It might be interesting to find someone who’s interested in Emacs and who will get even more out of transcribing videos. (If this describes you, e-mail me!)

Emacs/Org conference? Meeting folks in person was super-awesome. If last year’s conference happened because someone found a venue willing to host us for free, it makes sense for me to pay for a venue. Even if it’s over a thousand dollars, that’s cheaper than a flight and visas and all sorts of other things.

Emacs meetups? Quantified Self Labs supports QS meetups by sponsoring fees ($144 per year), pitching in for video cameras, and paying someone to process videos. They also have people working on blog posts and other community-related projects. Would a similar model make a big difference? Maybe it makes sense to get a few of them off the ground. What’s in the way of my hosting an Emacs meetup here?

Editors / information organizers: I try to make my writing easy to understand, but it can be good to have other people review something to see if it makes sense and to spot the gaps. Volunteers and blog readers help a lot. Still, it might be a good idea to pay people to help me with this. I’m not looking for surface-level editing, but more developmental editing: helping me organize ideas so that they make sense and they’re in a logical order. I’m not sure if looking on the usual freelance writer sites will help me find someone who can do this, but maybe if I can offer a good enough incentive, then maybe a freelance developer/writer will be able to spend some time helping me with this. (Or I can just take longer and I can get better at asking for feedback…)

Bounties? does not seem very popular for Emacs or Org. I’m still not sure how bounties interact with intrinsic motivation and unequal valuing of work, or how to even value a fix.

There’s still so much beyond money that I haven’t yet fully delved into. Aside from re-investing money, I can invest time – and that’s probably more important, more useful.

How can I invest more time into the Emacs community? What do I want to work towards? How can I improve how I learn and share?

Continue what I’m doing, and do more of it: Tweak Emacs and write about it. Be that friendly co-worker or friend you chat with because you know she’s always coming up with the weirdest things to try, and sometimes that leads to surprisingly useful things. Post more screenshots and screencasts, since we could really use those.

Fill in more gaps: Answer newbie questions. Map topics to learn. Write tutorials. Link to resources. Make screencasts. Organize information. Read EmacsWiki and other resources, and organize/edit/fill in as I come across opportunities to improve things.

Guide more people towards Emacs Lisp: Help people make that jump to writing their first custom bit of Emacs Lisp. Learn more about Emacs Lisp style and functionality, and help people improve their packages.

Help inspire and connect people. Bring the community together: Interview people for Emacs Chats, so that other people can get a sense of people like them who are enthusiastic about Emacs and who use Emacs to do interesting things. Set up a regular Emacs show-and-tell series?

On a related note: what would it take to figure out how to do Emacs coaching properly? I’d want to keep track of people’s progress and set up recurring calls, so probably Org, maybe in Google Drive or Git… I have a little bit of an impostor syndrome around this because I don’t know enough about setting up Emacs as a modern IDE, but I can learn. Clojure, Rails are probably good starting points, and there’s Emacs Lisp itself. On the other hand, if I answer questions in newsgroups and mailing lists, I help more people, and it’s easier (and more reliable) to turn those into blog posts. Plus they’re searchable. But sometimes one-on-one real-time helping is what helps me map or understand things better, and it can really make a difference in someone’s confidence or comfort level. So yes, continue to do these, and continue to nudge people to share.

Do these decisions make sense even considering a scenario where, say, Emacs becomes irrelevant? I’ll have learned more about related programming tools and topics. I’ll be a better writer and teacher. I’ll probably know a whole bunch of people who are happy about what I’ve shared and who can help me make the transition to other things as needed, maybe by sharing information or by taking a chance on me. And then there are all the other skills I’ll build on the way: making sense of technical things, learning more about how things learn, and playing with all sorts of other things along the way.

Payoffs? Tickled brain, happy mastery. Besides, you meet the nicest people using Emacs. =)

The post Reinvesting time and money into Emacs appeared first on sacha chua :: living an awesome life.

-1:-- Reinvesting time and money into Emacs (Post Sacha Chua)--L0--C0--April 23, 2014 12:00 PM

Irreal: Sacha’s Emacs Beginner Resources

Speaking of Sacha Chua—as I did yesterday—she’s got a nice page on beginner resources for Emacs. Chua tasked one of her assistants to seek out resources for learning Emacs and published the results.

She’s got all the sites you’d expect: the Emacs Wiki, Mickey’s Mastering Emacs, Xah Lee’s Tutorial, and others. But there are also some resources that I wasn’t familiar with so even if you’re an experienced Emacser, you might want to take a look. Definitely a useful resource. If you’re just starting this is an excellent place to find useful tutorials.

-1:-- Sacha’s Emacs Beginner Resources (Post jcs)--L0--C0--April 23, 2014 11:55 AM

sachachua: Emacs Chat: Jānis Mancēvičs

Chatting with Jānis Mancēvičs about literate programming, Unity game development, and code folding.

Want just the audio? Get it from MP3

Check out Emacs Chat for more interviews like this. Got a story to tell about how you learned about or how you use Emacs? Get in touch!

The post Emacs Chat: Jānis Mancēvičs appeared first on sacha chua :: living an awesome life.

-1:-- Emacs Chat: Jānis Mancēvičs (Post Sacha Chua)--L0--C0--April 21, 2014 03:55 PM

Grant Rettke: Indenting new curly bracket blocks with smartparens for R

Emacs speaks statistics handle indentation for curly bracket blocks quite well. My preference was to have, after inserting matching opening and closing curly brackets, a newline with the cursor indented one block in. This post in particular describes the solution; it worked fine as of today.

Addendum: 2014-04-17

Here is the code snippet from the above link:

(sp-local-pair 'c++-mode "{" nil :post-handlers '((my-create-newline-and-enter-sexp "RET")))
(defun my-create-newline-and-enter-sexp (&rest _ignored)
  "Open a new brace or bracket expression, with relevant newlines and indent. "
  (forward-line -1)
-1:-- Indenting new curly bracket blocks with smartparens for R (Post Grant)--L0--C0--April 16, 2014 10:00 PM

Got Emacs?: Emacs 24.4 first pretest released

From the emacs-devel list, the first emacs pretest is out for testing.  Please do take it for a spin.  The Win binaries will come in a few days.
-1:-- Emacs 24.4 first pretest released (Post sivaram ( 14, 2014 04:22 PM

Mickey Petersen: Dired Shell Commands: The find & xargs replacement

If you’re a Linux/BSD user you probably do most of your bulk operations on files with the command line tools find ... -exec or find ... | xargs — but there’s a much better way. Dired (M-x dired or C-x d), Emacs’s DIRectory EDitor, can do the same but in a very intuitive way. I’ve talked about Dired before: how to work with files spread out across many directories and editable dired buffers that will persist the changes made to filenames and permissions in the buffer.

Of all the hidden gems in Dired, this is one of my favourites: the ability to run arbitrary shell commands on marked files — and if it’s a file extension known to Dired, it will suggest a default action: untarring .tar.gz files; displaying .pdf files; and much more!

Installing Dired-X

The latter functionality is buried in dired-x, an add-on for Dired that… ships with Emacs but isn’t enabled by default.

To use dired-x you must load it first.

(add-hook 'dired-load-hook
          (lambda ()
            (load "dired-x")))

You can also just (require 'dired-x) somewhere in your init file.

Using Emacs’s Guess Shell Command functionality

To apply a shell command to marked files press !. If you have no marked files Dired will apply the shell command to the file or directory point is on. Dired will suggest a list of defaults (navigate the choices with M-n and M-p) and if Dired-x is loaded it will set a default action so you just press enter to apply it.

Dired-x ships with a fairly large repository of common operations on files and you can add your own by modifying the alist dired-guess-shell-alist-user.

Running Arbitrary Shell Commands

Another little-known feature of Dired’s shell command functionality is that you can write your own one-off commands but run each command per marked file or collect (and separated by whitespace, like in the shell) them all and pass them to a single instance of the command.

Some shell commands accept many files per command and others just one. You can use two wildcard operators (* and ?) in a Dired shell command and that will determine how Dired constructs the external shell command(s).

Let’s say I want to call the external script My shell command can be constructed in two ways. And let’s assume I have two files marked in Dired: hello.txt and world.txt.

If the command only accepts a single file argument I can use ? as the substitution variable. So ? will give us the following expanded commands: hello.txt world.txt

If I had used * in lieu of the ? substitution variable then the entire list of marked files would have been inserted with whitespaces separating each file, like so: hello.txt world.txt

Note: You must separate the substitution variable with spaces or it won’t work right!

If you want your calling shell to expand the * as a globbing wildcard you must type *"" instead.

Finally, you can dictate whether the shell commands should be executed synchronously or asynchronously.

By default the commands are called synchronously unless you append &, ; or ;&. However, they are not all alike. If you are operating on multiple files (that is, you are using the ? substitution variable) then & will make the shell commands execute in parallel as well! If the command ends in ; or ;& then the commands are executed sequentially, one after another but still asynchronously.

Dired’s shell command functionality is particularly powerful if you want to apply the shell commands on files spread out across multiple directories as it eliminates the need for find in all but the most complex searches. My article on how to work with files spread out across many directories shows you how you can find files across directories and display them in a “merged” dired buffer. Combined with the Dired shell command I just talked about and you can replace most external find ... -exec command patterns. If you think find is painful to use simply use Dired’s extremely powerful file marking functionality and off you go.


-1:-- Dired Shell Commands: The find & xargs replacement (Post mickey)--L0--C0--April 10, 2014 04:30 PM

Chen Bin (redguardtoo): popup function your cursor is in

Which Func Mode will display the current function name in the mode line.

But I can’t use it.

It’s because I reduce my mode-line into minimum to make it work with my tiny netbook.

Showing the function in header is also not possible because it conflicts with my color theme.

So I choose to display the function name in a popup.

Insert below code into ~/.emacs,

(autoload 'which-function "which-func")
(autoload 'popup-tip "popup")

(defun copy-yank-str (msg)
  (kill-new msg)
    (insert msg)
    (shell-command-on-region (point-min) (point-max)
                              ((eq system-type 'cygwin) "putclip")
                              ((eq system-type 'darwin) "pbcopy")
                              (t "xsel -ib")

(defun popup-which-function ()
  (let ((msg (which-function)))
    (popup-tip msg)
    (copy-yank-str msg)

The extra bonus is “popup-which-function” will also insert the function name into clipboard and kill ring.

The above code need package “popup.el” to be installed.

Screen shot:

-1:-- popup function your cursor is in (Post chenbin0)--L0--C0--April 08, 2014 12:59 PM

Chen Bin (redguardtoo): paste string from clipboard into minibuffer in Emacs

First, I find “Alt-Y” is easier to press when paste string into minibuffer than old “Shift+Insert”. “Ctrl-V” is not supported in some terminals.

Second, intergrating some command line clipboard tool into Emacs is better than Emacs X clipboard. Command line tool works in any environment. For example, when you log into a remote server with ssh, your local computer could share clipboard with your Emacs in remote shell. Please note in this example, you need using X11 forward over ssh, usually it’s already set up on server.

Here is the code:

(defun paste-from-x-clipboard()
    (*cygwin* "getclip")
    (*is-a-mac* "pbpaste")
    (t "xsel -ob")

(defun my/paste-in-minibuffer ()
  (local-set-key (kbd "M-y") 'paste-from-x-clipboard)

(add-hook 'minibuffer-setup-hook 'my/paste-in-minibuffer)
-1:-- paste string from clipboard into minibuffer in Emacs (Post chenbin0)--L0--C0--April 08, 2014 12:17 PM

Alex Schroeder: Homebrew Problems

I’ve been using Homebrew on our Mac for a while now. I like it very much. I’ve recently run into an issue, though. Sending emails from Emacs stopped working. I was getting was this:

Opening STARTTLS connection to `'...failed
network-stream-get-response: Wrong type argument: processp, nil

The important setting to remember to learn more is this:

(setq smtpmail-debug-info t)

Resent the mail and switch to a buffer called *trace of SMTP session to*.


220 ESMTP Exim 4.71 Mon, 07 Apr 2014 01:00:52 -0400 Hello []
250-SIZE 52428800
250 HELP

Process smtpmail deleted
dyld: Library not loaded: /usr/local/lib/libnettle.4.7.dylib
  Referenced from: /usr/local/bin/gnutls-cli
  Reason: image not found

Process smtpmail trace/BPT trap: 5

Oops, it seems that I uninstalled something that gnutls required!

Time to check things:

alex@Megabombus:/usr/local/bin (master)$ brew update
alex@Megabombus:/usr/local/bin (master)$ brew upgrade nettle
Error: nettle-2.7.1 already installed
alex@Megabombus:/usr/local/bin (master)$ brew upgrade gnutls
Error: gnutls- already installed
alex@Megabombus:/usr/local/bin (master)$ ls /usr/local/lib/libnettle.*
/usr/local/lib/libnettle.4.5.dylib /usr/local/lib/libnettle.a
/usr/local/lib/libnettle.4.dylib   /usr/local/lib/libnettle.dylib
alex@Megabombus:/usr/local/bin (master)$ brew reinstall gnutls
==> Reinstalling gnutls
==> Downloading
Already downloaded: /Library/Caches/Homebrew/gnutls-
==> Pouring gnutls-
🍺  /usr/local/Cellar/gnutls/ 931 files, 8,4M
alex@Megabombus:/usr/local/bin (master)$ brew reinstall nettle
==> Reinstalling nettle
Warning: nettle-2.7.1 already installed, it's just not linked
alex@Megabombus:/usr/local/bin (master)$ brew link  nettle
Linking /usr/local/Cellar/nettle/2.7.1... 16 symlinks created
alex@Megabombus:/usr/local/bin (master)$ gnutls-cli --version
gnutls-cli 3.2.12
Copyright (C) 2000-2014 Free Software Foundation, and others, all rights reserved.
This is free software. It is licensed for use, modification and
redistribution under the terms of the GNU General Public License,
version 3 or later <>

Please send bug reports to:  <>

That seems to have fixed it!

I wonder how this happened in the first place.


-1:-- Homebrew Problems (Post)--L0--C0--April 07, 2014 05:40 AM

Julien Danjou: Doing A/B testing with Apache httpd

When I started to write the landing page for The Hacker's Guide to Python, I wanted to try new things at the same time. I read about A/B testing a while ago, and I figured it was a good opportunity to test it out.

A/B testing

If you do not know what A/B testing is about, take a quick look at the Wikipedia page on that subject. Long story short, the idea is to serve two different version of a page to your visitors and check which one is getting the most success. When you found which version is better, you can definitely switch to it.

In the case of my book, I used that technique on the pre-launch page where people were able to subscribe to the newsletter. I didn't have a lot of things I wanted to test out on that page, so I just used that approach on the subtitle, being either "Learn everything you need to build a successful Python project" or "It's time you make the most out of Python".

Statistically, each version would be served half of the time, so both would get the same number of view. I then would build statistics about which page was attracting the most subscribers. With the results I would be able to switch definitively to that version of the landing page.

Technical design

My Web site, this Web site, is entirely static and served by Apache httpd. I didn't want to use any dynamic page, language or whatever. Mainly because I didn't want to have something else to install and maintain just for that on my server.

It turns out that Apache httpd is powerful enough to implement such a feature. There are different ways to build it, and I'm going to describe my choices here.

The first thing to pick is a way to balance the display of the page. You need to find a way so that if you get 100 visitors, around 50 will see the version A of your page, and around 50 will see the version B of the page.

You could use a random number generator, pick a random number for each visitor, and decides which page he's going to see. But it turns out that I didn't find a way to do that with Apache httpd at first sight.

My second thought was to pick the client IP address. But it's not such a good idea, because if you got visitors from, for example, people behind a company firewall, they are all going to be served the same page, so that kind of kills the statistics.

Finally, I picked time based balancing: if you visit the page on a second that is even, you get version A of the page, and if you visit the page on a second that is odd, you get version B. Simple, and so far nothing proves there are more visitors on even than odd seconds, or vice-versa.

The next thing is to always serve the same page to a returning visitor. I mean that if the visitor comes back later and get a different version, that's cheating. I decided the system should always serve the same page once a visitor "picked" a version. To do that, it's simple enough, you just have to use cookies to store the page the visitor has been attributed, and then use that cookie if he comes back.


To do that in Apache httpd, I used the powerful mod_rewrite that is shipped with it. I put 2 files in the books directory, named either "the-hacker-guide-to-python-a.html" and "the-hacker-guide-to-python-b.html" that got served when you requested "/books/the-hacker-guide-to-python".

RewriteEngine On
RewriteBase /books
# If there's a cookie called thgtp-pre-version set,
# use its value and serve the page
RewriteCond %{HTTP_COOKIE} thgtp-pre-version=([^;])
RewriteRule ^the-hacker-guide-to-python$ %{REQUEST_FILENAME}-%1.html [L]
# No cookie yet and…
RewriteCond %{HTTP_COOKIE} !thgtp-pre-version=([^;]+)
# … the number of seconds of the time right now is even
RewriteCond %{TIME_SEC} [02468]$
# Then serve the page A and store "a" in a cookie
RewriteRule ^the-hacker-guide-to-python$ %{REQUEST_FILENAME}-a.html [,L]
# No cookie yet and…
RewriteCond %{HTTP_COOKIE} !thgtp-pre-version=([^;]+)
# … the number of seconds of the time right now is odd
RewriteCond %{TIME_SEC} [13579]$
# Then serve the page B and store "b" in a cookie
RewriteRule ^the-hacker-guide-to-python$ %{REQUEST_FILENAME}-b.html [,L]

With that few lines, it worked flawlessly.


The results were very good, as it worked perfectly. Combined with Google Analytics, I was able to follow the score of each page. It turns out that testing this particular little piece of content of the page was, as expected, really useless. The final score didn't allow to pick any winner. Which also kind of proves that the system worked perfectly.

But it still was an interesting challenge!

-1:-- Doing A/B testing with Apache httpd (Post Julien Danjou)--L0--C0--April 06, 2014 10:20 PM

Emacs Redux: which-function-mode

Every developer is sometimes in the following situation - you’re inside the definition of something like a class or method, but the name of the class or method is not currently into view, but you’d very much like to know/see it. You can obviously scroll up and see what you need to, but there’s a simpler way to see the name you’re looking for - the built-in mode which-function-mode.

When which-function-mode is active you’ll see in the center of your modeline the name of the definition your cursor is currently in. Here’s the mode in action:

And here’s how to enable it:


That way which-function-mode will be active in all major modes that support it. If you want to enable it only in specific modes you can do so like this:

(add-to-list 'which-func-modes 'ruby-mode)
(add-to-list 'which-func-modes 'emacs-lisp-mode)

By default ??? will be displayed when which-function-mode cannot determine the name (perhaps because you’re not actually in a definition or due to implementation limitations). You can change this to something else like this:

(setq which-func-unknown "n/a")

And what if you don’t like to have the definition name displayed in the mode-line? There’s a solution for you as well (suggested by Sebastian Wiesner). Use the following bit of code:

;; Show the current function name in the header line
(setq-default header-line-format
              '((which-func-mode ("" which-func-format " "))))
(setq mode-line-misc-info
            ;; We remove Which Function Mode from the mode line, because it's mostly
            ;; invisible here anyway.
            (assq-delete-all 'which-func-mode mode-line-misc-info))

And you’ll get the following result:

That’s all for today, folks! Hack Emacs Lisp & prosper!

-1:-- which-function-mode (Post)--L0--C0--April 05, 2014 12:33 PM

Got Emacs?: Some interesting Emacs threads and LaTeX news

C K Kashyap posited some new requirements on code folding and there were a number of interesting responses culminating with a link to HideRegion.  You probably should stick to hide-show or OutlineMode and venture into these solutions only if there is a use case that is not met by hide-show. :)

Did you forget to enable auto-fill while writing text?  No worries, you can fix the written text with a simple C-x h M-q .

Have some file and project management stuff that you want Emacs to handle?  Here's a thread on what one user would like to see as project management that he wants emacs to do some heavy lifting. Might be worth your time to check it out.

BTW, there's a new site for fantastic LaTeX plotting by the LaTeX guru Stefan Kottwitz.  You should check it out and contribute your pgfplots to it.
-1:-- Some interesting Emacs threads and LaTeX news (Post sivaram ( 01, 2014 05:48 PM

Ben Simon: Getting Back In Touch With My E-mail Roots - A Little Gmail Integration With Emacs

For the majority of my e-mail consuming life, I lived in emacs. First RMAIL, then Gnus. I was threading conversations before Gmail was a glint in anyone's eye. These days, though, I live in the Gmail universe (whether it's Google Apps for business or plain old Gmail for personal). And for the most part, life is good. Every once in a while I'll consider switching back to using emacs full time, but it just doesn't seem like the benefits are there (heresy, I know).

Then it hit me: maybe I can get some benefits of e-mail from emacs (mainly, super quick access without having to lift my fingers off the keyboard) without doing a big switch. That is, configure emacs for sending of e-mail and not worry about the reading side of things.

A quick Google search turned up this configuration, and I thought my setup was going only require a few seconds of work. Alas, it wasn't so simple.

I ran into a number of issues: First, Google requires either SSL or TLS encryption for sending of e-mail. I spent a bunch of time trying to get GnuTLS to run on my Windows environment. It seems like all the pieces are there, but I kept running into issues. While I was fiddling with this, I ran into another problem: Verizon FIOS blocks outgoing port 25. Not a huge deal, as you can switch to port 587, but it did cause me to scratch my head as to why my connection was just timing out.

Finally, as I was just about to give up on my dreams of emacs e-mail, I remembered that I've got a second option for encryption: SSL. I went ahead and installed stunnel as a Cygwin package and setup the following configuration:

# Inspired by: 
client = yes
output = stunnel-log.txt
debug = 7
options = NO_SSLv2
options = NO_SSLv3

[SMTP Gmail]
 accept = 465
 connect =

I then kicked off stunnel and set the following up in emacs:

(setq send-mail-function 'smtpmail-send-it)
(setq smtpmail-smtp-server "localhost")
(setq smtpmail-smtp-service 465)
(setq user-mail-address "")

I was then able to hit Control-x m, type a message and hit Control-c Control-c to send it off. Emacs prompted me for my SMTP credentials (which is my gmail login) and to my shock and amazement, it worked.

I can now tap out quick message from emacs, all without messing with my existing e-mail setup. It may not be as exciting as the day I finally got Gnus setup the way I wanted it, but it's a step in the right direction.

-1:-- Getting Back In Touch With My E-mail Roots - A Little Gmail Integration With Emacs (Post Ben Simon)--L0--C0--April 01, 2014 12:18 PM

Dev and Such [Emacs Category]: Emacsagist

I recently released Emacsagist, an Emacs front-end for searching Packagist.

You can download Emacsagist via the MELPA repository with M-x list-packages or Cask. From there, you can run M-x emacsagist-search, type in a search term, and Emacsagist will give you search results. You can press return on any package name to get full details.

Now there's one less reason to leave Emacs for PHP developers.

-1:-- Emacsagist (Post)--L0--C0--March 31, 2014 08:06 PM

Grant Rettke: Org Manual

The org-mode manual lives here.

-1:-- Org Manual (Post Grant)--L0--C0--March 31, 2014 07:25 PM

Chmouel: Announcing the (Paris (Emacs) Meetup) Group

I am lucky to sit in front of Julien Danjou at work and as the sole Emacs users on the side of our office it was come to our attention that we needed as emacsian to unite ourselves to preach the good parole of the church of Emacs and sexy mens.

It was quite obvious that the only way to convince those in the unkown was to find an excuse for drinks good food between good people and set-up a meetup.

And since eNovance have now a very new fancy office with a large room to organise geeky (or not) oriented meetups, it was just a perfect time.

Within three clicks, three steps of dancing and after 10 minutes trying to do that straight from Emacs before coming back to a modern web browser (Emacs users are pragmatic) the Parisian OpenStack User Group

This is with great success, In less than 5 days we had already 50 members and an informal drink-up organised for thursday.

So if you are based in Paris and you have a love for Emacs or just want to discover what’s that all about come join the group.

-1:-- Announcing the (Paris (Emacs) Meetup) Group (Post chmouel)--L0--C0--March 31, 2014 06:22 PM

emacspeak: Emacspeak Webspace: Glancing At Information On The Audio Desktop

A Web News Ticker For Emacs

1 WebSpace: A Web News Ticker For Emacs

Module Emacspeak-Webspace provides a rolling ticker of information that is automatically retrieved, cached and maintained by Emacspeak. Using this functionality, you can set up specific buffers to have interesting tidbits of information displayed automatically in the header-line; Emacspeak speaks these items of information as you switch contexts. This article explains the usage model and underlying design of Emacspeak Webspaces.

1.1 Background

The Emacspeak Webspace module was originally created in early Interaction Free Information Access (2008) because I wanted the audio equivalent of being able to quickly glance at information. Here are some aspects of visual interaction that I wanted to emulate:

  • You can quickly glance at something while switching contexts, and ignore it if it is not important.
  • The object that you glance at while switching contexts does not become an object of attention ie, the casual task remains casual, as opposed to becoming the primary task. Email is the antithesis to this model — where if you start glancing at email, it's a sufficiently strong distraction that you'll start doing email — as opposed to what you were supposed to be doing.
  • If the item you glanced at deserves further attention, you can come back to it later — and the system gives you sufficient confidence in your ability to come back to it later — note that this is essential to ensure the previous requirement.
  • Items are cached but get pushed out by newer items — this makes sure you dont feel pressured to read everything or have to explicitly catch-up — in prior systems including email and Google Reader, I always found the task of hitting catch-up without reading everything a fairly stressful experience.
  • Applied to information updates, think hallway conversations outside your office — you mostly ignore them, but sometime get drawn because you hear some specific keywords and/or concepts that draw your attention.

1.2 Early Implementation In 2009

I used the WebSpace functionality in Emacspeak for news and weather updates starting 2009; at some time in late 2009, I cut it over to get updates from my Google Reader stream. It was extremely effective for my usage pattern — I typically activated the functionality in all shell buffers. In my work style where I switch among the primary tasks of engineering (writing/reviewing code), writing/reviewing design documents, and doing email to facilitate the previous two tasks, the shell buffer is where I switch to while context-switching e.g., launching a build after writing code as an example. Having the Webspace functionality say something interesting at those times was optimal.

1.3 Initial Implementation And Design

The information to be pulled in the rolling header line is pulled from a cache — in 2009, this cache was populated from my Google Reader stream. The cache was maintained in a ring with older items falling off the end. You could optionally switch to a buffer displaying all of the currently cached items — this functionality assured me that I could always later find an item that had caught my attention while I was in the process of context switching amongst tasks. Notice that if I didn't go back and check for that item within a day, it would fall off the ring-buffer cache — and this usually would mean that it likely wasn't that important after all.

1.4 Life After Google Reader

With the passing of Google Reader last year, I started implementing the feed-reading functionality I needed in Emacspeak independent of Google Reader; see the earlier article in this blog titled Managing And Accessing Feeds On The Emacspeak Audio Desktop. Next, I updated the Emacspeak WebSpace functionality to build its cache from the set of feeds in emacspeakfeeds.

1.5 Usage Pattern

This section details my own usage pattern and set-up — this is by no means the only way to use this functionality.

  1. Emacspeak binds Webspace functionality to Hyper Space as a prefix key.
  2. Hyper Space h invokes command emacspeak-webspace-headlines — this command initializes the feed-store cache, and sets up the header-line in the current buffer to display a rolling ticker. Note that you can invoke this command in multiple buffers; those buffers will share a common headlines cache.
  3. The feed-store is updated during Emacs idle-time; I often invoke the elisp form (emacspeak-webspace-headlines-populate) to populate the cache initially. Note that depending on your network, and the number of feeds you have in emacspeak-feeds, this can block emacs for a couple of minutes.
  4. Command emacspeak-webspace-headlines-browse displays an interactive buffer containing the current set of cached headlines — this is where you go to track down a headline you heard in passing. I bind this to Super h by customizing emacspeak-super-keys.
  5. You can set up other types of information in your rolling header — something I initially used it for was weather — see command emacspeak-webspace-weather personally, I 've not found this as useful in CA given how consistently good the weather is here.
  6. For related work in Emacs, see Emacs package newsticker. That package works well with Emacspeak, but in using it earlier, I found that I could not prevent myself from starting to read content i.e., it failed to meet the glance and continue requirement.

Date: <2014-03-24 Mon>

Author: T.V Raman

Created: 2014-03-24 Mon 18:00

Emacs (Org mode 8.2.5c)


-1:-- Emacspeak Webspace: Glancing At Information On The Audio Desktop (Post T. V. Raman ( 26, 2014 02:40 AM

Julien Danjou: The Hacker's Guide to Python released!

And done! It took me just 8 months to do this entire book project around Python. From the first day I started writing to today, where I finally publish and sell – almost entirely – myself this book. I'm really proud of what I've achieved so far, as this was something totally new to me.

Doing all of that has been a great adventure, and I'll promise I'll write something about that later on. A making of.

For now, you can enjoy reading the book and learn a bit more about Python. I really hope it'll help you bring your Python-fu to a new level, and help you build great projects!

Go check it out, and since this is first day of sale, enjoy 20% off by using the offer code THGTP20.

-1:-- The Hacker's Guide to Python released! (Post Julien Danjou)--L0--C0--March 25, 2014 10:20 PM

Timo Geusch: I didn’t realise Emacs has an elisp repl

When it comes to Emacs, I am an amateur at best, but part of the fun is that I keep discovering new useful functionality. Thanks to a post over at Mastering Emacs, I’m now aware of ielm, which came in very handy when I was trying to build an elisp function that would automatically pull […]
-1:-- I didn’t realise Emacs has an elisp repl (Post Timo Geusch)--L0--C0--March 22, 2014 05:25 PM

Emacs Redux: A peek at Emacs 24.4: Variadic Numeric Comparison Functions

In most Lisps numeric comparison functions like =, <, >, <= and >= are variadic - meaning they accept variable number of arguments (as do functions like +, -, *, etc). Here’s an example:

;; let's assume that all those are numeric variables
(= x y z)
(< a b c d)

This is pretty cool and save you from writing code like:

(and (= x y) (= y z))
(and (< a b) (< b c) (< c d))

Prefix function position for the win!

In Emacs Lisp, however, all these comparison functions (unlike +, -, etc) accept just two arguments, which is somewhat unlispy. Luckily this is one of the things that’s going to change with Emacs 24.4. Emacs Lisp takes another small step to becoming a good Lisp dialect!

-1:-- A peek at Emacs 24.4: Variadic Numeric Comparison Functions (Post)--L0--C0--March 22, 2014 02:48 PM

Timo Geusch: Running Emacs from a Windows Explorer context menu

It’s one of those days, thanks to a hard disk going south I ended up having to rebuild the system drive on one of my machines. After putting the important software back on there – “Outlook and Emacs”, as one of my colleagues calls it – I had to reapply some of the usual tweaks […]
-1:-- Running Emacs from a Windows Explorer context menu (Post Timo Geusch)--L0--C0--March 21, 2014 03:16 AM

Johan Andersson: Cask v0.6

It’s time for a new Cask release. I began working on Cask v0.6 around christmas and now, over 200 commits later, it’s finally ready.

To upgrade, run:

$ cask upgrade

This release includes a lot of new features, which I will describe below.

Public API

We want to allow other packages to build upon Cask, such as Pallet. Now Cask has a nice API for that purpose.

See for more information.

Files directive

There is a new directive, called files. It specifies what files should be included when building the packages. For example:

(files "foo.el" "foo-core.el")

If the files directive is not used, it will use the default patterns from the package-build.el package.

This directive is used for two new commands build and package, see more information below.

Help for specific command

Cask has always had a cask help command to list information about each command and option. Now you can do it for a specific command, for example: cask help exec

New commands

Here are the new commands:

Improved and updated documentation

Cask has a new and improved website. See

Fetcher dependencies

This feature allow you to install dependencies from VCS sources. I use this for my yasnippets collection. I want to use a separate repository and I don’t want to release an ELPA package for it. I’ve used a submodule for this previously, but now I simply do:

(depends-on "yasnippets" :git "" :files ("*" (:exclude ".git")))

See for more information.


Linking is a new functionality that allow you to link a Cask dependency to a local directory.

This is useful when you want to test changes to a package. Let’s say I make changes to my f.el package, then I can link that package in another package that use f.el to make sure it really works. For example:

$ cask link f ~/Code/f.el

Run cask help link for more information about linking.

More quiet than before

Emacs is not optimal for CLI programs. It prints a lot of messages when you don’t want it. Cask now uses the shut-up package to be a bit more quiet. Unfortunately, it’s not possible to hide all output. We have reported this as an issue to the Emacs developers and hopefully they will do something about it.

If you want full output, use the --verbose option.

Path and load path pollution

Previously, the path and load-path commands included every directory in the .cask/EMACS-VERSION/elpa directory. Now it only includes package directories.

Loading only packages

Previously, if you removed a package from the Cask-file it would still be loaded when you started Emacs. Now, only the packages specified in the Cask-file are loaded.

Breaking changes

This release adds a lot of functionality, but does not break a lot of old functionality. The only thing breaking, is that the old command called package is now called pkg-file.

That’s it folks, enjoy!

-1:-- Cask v0.6 (Post)--L0--C0--March 19, 2014 07:00 AM

Chris Ball: A Robot for Timo

Here at FlightCar Engineering we’re a very small team, and one of us — Timo Zimmermann — works remotely from Heidelberg, Germany. Timo’s an expert in the web framework we use, Django, and is awesome to work with: mixing together good humour, an enjoyment of teaching and learning, and deep technical expertise.

One day a link to Double Robotics got passed around our internal chat room — it’s an unexpected use of Segway technology, putting an iPad on top of a mobile robot and letting a remote participant drive the robot around while video chatting. We keep a video chat with Timo open while at work, so we were pretty interested in this.

There wouldn’t be much point in FlightCar buying one of these robots; our local developers fit around a single desk. Still, it would be useful to be able to video chat with Timo and have him be able to choose which of us to “look” at, as well as being able to join in with office conversations in general. Could we come up with something much simpler that still has most of the advantages of the Double robot in our situation?

I have a little electronics experience (from my time at One Laptop Per Child, as well as a previous fun personal project) and recently received a Kickstarter backer RFduino. Alex Fringes and I decided to go ahead and build a basic, stable/unmoving telepresence device as a present for Timo. Here’s what we did:

Parts list

$140 Bescor MP-101 pan head with power supply and remote control
$68 RFduino “teaser kit” + prototyping shield + single AAA battery shield
$29 Rosco 8″ Snake Arm
$13 Rotolight Male 1/4″ to 1/4″ adapter
$15 Grifiti Nootle iPad mini Tripod Mount

Total: $265 USD

I’m not counting the cost of the iPad (the Double Robotics robot costs $2500 and doesn’t include an iPad either), or the tripod we’re putting the Bescor pan head on top of (I had a monopod already, and basic tripods are very cheap), but everything else we used is listed above. Here’s the final result:

How it works

The pan head is easy to control programmatically. It has a 7-pin port on the back, and four of the pins correspond directly to up/down/left/right — to move in a direction, you just apply voltage to that pin until you want to stop. This is a perfect match for an Arduino-style microcontroller; Arduino is a hobbyist electronics platform that makes it easy to cheaply prototype new hardware creations, by giving you I/O pins you can attach wires to and a simple programming interface. Local electronics hacker and Tiny Museum-cofounder Steve Pomeroy helped out by determining the pinout and soldering between the remote control port’s pins and our RFduino’s prototyping board, and Alex set to work writing the code that would run on the RFduino and iPads. We ended up with an architecture like this:

So, to expand on the diagram: Timo moves his iPhone, the orientation is sensed and passed on to our local iPad via the nodejs bridge (which exists just to proxy through NAT), which converts it into a single letter “r”, “l”, “u”, “d”, or “s” (for stop) and then the RFduino reads a character at a time over Bluetooth Low Energy and sends a voltage pulse to the appropriate pin. We chose iPhone orientation sensing as the control mechanism at Timo’s end, but you could also use explicit direction buttons, or even something like face detection.

We decided to hide the fact that we were building this from Timo and introduced it to him as a surprise, coincidentally on Valentine’s Day. We love you Timo!

Finally, we’ve put all of the code we wrote — for the RFduino, the nodejs bridge, and the local and remote iOS apps — under an open source license on GitHub, so we’ve shared everything we know about how to build these devices. We’d be very happy if other people can help improve the features we’ve started on and find a cheaper way to build more of these!

(By the way, we’re hiring for a Lead Front End Engineer in Cambridge, MA at the moment!)

-1:-- A Robot for Timo (Post cjb)--L0--C0--March 18, 2014 01:52 AM

Ivan Kanis: Messing with xterm

I spent all morning messing with xterm. It started with an innocent question that I sent to the vim mailing list. When I pressed mf in the netrw buffer I was not getting any cue that the file was marked.

Charles told me it was turning the file bold on his setup. I realized I turned off bold font in xterm because I find them ugly. In Emacs I display bold as yellow. Wouldn't it be nice if xterm did the same?

Here is how I did it:

% mkdir .terminfo
% cd .terminfo
% infocmp -I screen-256color > screen-ivan

No I can hack the escape sequence of the terminal. I replaced the bold sequence \E[1m with \E[0;33m. Vim is displaying underline in the netrw and it's not pretty. For fun I display purple instead of underline by setting smul to \E[0;35m and rmul to \E[0;37m.

Next I compile my terminfo and set my terminal:

tic screen-ivan
export TERM=screen-ivan

And here is the result on man page:

Now that I could see bold font I was surprised that vim open a plain text all in bold. Well it's due to the following setting:

hi Normal ctermfg=white

It seems straightforward but it implies that the bold font will be used. The default white in xterm is grey (color7). That is so you can see a 'bold' white with color15. Xterm implies that bold font are brighter. Since I don't care for the dull color I have set the color I want by editing ~/.Xresources like so:

XTerm*color0: black
XTerm*color1: red
XTerm*color2: green
XTerm*color3: yellow
XTerm*color4: blue
XTerm*color5: magenta
XTerm*color6: cyan
XTerm*color7: white
Xterm*colorMode: false

Now I have to redo how I specify colors in ~/.vimrc:

" colors

" (black 0) (red 1) (green 2) (yellow 3) (blue 4) (magenta 5) (cyan 6)
" (white 7) (orange 220)

" Tone down the fruit salad
hi Normal ctermfg=7
hi Comment ctermfg=2
hi Function ctermfg=6
hi Statement ctermfg=5
hi Identifier ctermfg=7
hi Number ctermfg=7
hi Operator ctermfg=7
hi PreProc ctermfg=7
hi Statement ctermfg=5
hi Special ctermfg=7
hi String ctermfg=220
hi Type ctermfg=7

Note that I am using 220 for strings. This gives me the color orange for strings. I had to compile strings with 256 colors:

./configure --prefix=/home/ivan/local --enable-colors256
make install

There is a script called that will display all the available colors. I modified it a tiny bit to display the number of the color:

And I finally fixed the highlighting of the netrw directory file with the following line in ~./vimrc

hi TabLineSel ctermfg=3
-1:-- Messing with xterm (Post Ivan Kanis)--L0--C0--March 17, 2014 12:00 AM

Jorgen Schäfer: Elpy moves to its own ELPA

Due to a long-standing bug in the Marmalade software, I was unable to upload the 1.3.0 release of Elpy to that repository in the last two weeks. For a discussion of this problem, see issue #196. To solve this problem, I have created a package archive specific to Elpy with the required packages that are not on GNU ELPA. To use this archive, add the following to your .emacs:

(require 'package)                                                              
(add-to-list 'package-archives
'("elpy" . ""))

This is intended as a temporary solution, but I am not sure when I have the time to work on a longer-term one. I am sorry for the inconvenience in the last weeks.

-1:-- Elpy moves to its own ELPA (Post Jorgen Schäfer ( 16, 2014 08:26 AM

Chmouel: How do I manage my copyright headers in Emacs

My day to day being work or personal is to create OpenSource code. As an habit I have taken lately I am adding licenses to all new files I am creating.

I have historically used the `auto-insert-mode with a default template. For example for my newly created python files I would have this for configration :

(auto-insert-mode 't)
(setq auto-insert-alist '((python-mode . "")))

and in my `auto-insert-directory directory there would be a template with my license files.

But that’s not so smart, since I wanted to find a mechanism to switch between work email and personal emails for my copyright I needed those templates to be more dynamic.

Things with auto-insert templates taken from a directory they are not so dynamics and reading through the always excellent emacswiki page it seems that you need to `define-auto-insert the templates to get dynamic variables.

I didn’t want to go to the define-auto-insert because I am always using the yasnippet package for my snippets which has a great expansion support and a nice templating language.

As it’s mostly always the case if you have a problem you can be sure it’s already resolved by others, so a quick search on the internet leaded me to a gist file written by a guy three years ago that does exactly what I wanted :

So now that I had my header loaded from yasnippet I could add some smartness into it. I have first written this function :

(defun yas--magit-email-or-default ()
  "Get email from GIT or use default"
  (if (magit-get-top-dir ".")
      (magit-get "")

this function would check if we are in a git directory and get the git configuration, if we are not it would just reply by the standard emacs variable `user-mail-address.

I have just to plug that in my template like this :

# -*- mode: snippet -*-
# name: header
# --
# -*- coding: utf-8 -*-
# Author: Chmouel Boudjnah < `(yas--magit-email-or-default)`>

and depending of my local configuration of my git repo it will add my license email according to that.

If I really needed to override the user-mail-address without using git I could always just drop a .dir-locals.el with something like this :

((nil . ((user-mail-address . ""))))

which would override the default user-mail-address to whatever I want.

-1:-- How do I manage my copyright headers in Emacs (Post chmouel)--L0--C0--March 14, 2014 07:07 AM

John Sullivan: Drupal UI win

Cancel button next to Cancel link

-1:-- Drupal UI win (Post)--L0--C0--March 11, 2014 11:11 PM

Ivan Kanis: Gnus simple split unexpected feature

I used to use the fancy split. Some months ago I reduced my inboxes a lot and felt fancy split wasn't needed anymore. I ended up with something like this:

(setq nnmail-split-methods
     '(("linux-nantes" "\\([tT]o\\|[cC]c\\):.*linux-nantes@univ-nantes\\.fr")
       ("bbdb" "\\([tT]o\\|[cC]c\\):.*bbdb-info@lists\\.sourceforge\\.net")
       ("stumpwm" "\\([tT]o\\|[cC]c\\):.*stumpwm-devel@nongnu\\.org")
       ("interesting" private-is-email-in-bbdb)
       ("spam" "X-Spam-Flag: YES")
       ("boring" "")))

The idea is to put each mailing list in its separate boxes. Interesting e-mail are based on my bbdb database queried by the function private-is-email-in-bbbd.

It worked as I expected except when they were more than one positives. For example, I had someone I know in my bbdb post to the Linux Nantes mailing list. What happened is that Gnus will create an e-mail on each inbox! Clearly that's not what I want.

So I am using again the fancy splitter which does exactly what I expect. The (| statement indicates to stop a the first positive.

(setq nnmail-split-methods 'nnmail-split-fancy
      '(| (to "linux-nantes@univ-nantes\\.fr" "linux-nantes")
          (to "bbdb-info@lists\\.sourceforge\\.net" "bbdb")
          (to "stumpwm-devel@nongnu\\.org" "stumpwm")
          (: private-is-email-in-bbdb)
          ("X-Spam-Flag" "YES" "spam")

Note that the syntax is much easier to read. There is no hairy regexp to match To and Cc, all that is handled by the to symbol. I had to modify private-is-email-in-bbdb to return "interesting" instead of t on success.

-1:-- Gnus simple split unexpected feature (Post Ivan Kanis)--L0--C0--March 09, 2014 12:00 AM

Raimon Grau: smart-browser

Since I discovered conkeror, I'm not using w3m that much, because conkeror works great :)

The issue is that doing any kind of web dev in conkeror is suboptimal. Its support for firebug is quite basic. One option is opening different browsers depending on the url. That makes sense, and I used this technique when I was using w3m.

But I wanted to explore a different approach. My problem is the following. Usually I want to open a url in conkeror, but if chromium is already opened, it's probably that I'm using some of the devtools, and I want to keep using it during this 'session'.

What I don't want is to have 2 browsers opened.Unless I open them manually, then, follow the preferences. Although being complex to explain, it just feels right when I use it.

So I hacked some elisp to give priorities to browsers, and use a default one when there's nothing opened.

The idea is quite simple: Just look for the browsers in order of preferences, and open the first one that is already opened. The last one is a hack, to open conkeror by default.

It's an ugly hack, but hopefully you'll learn some elisp API you didn't know :)

-1:-- smart-browser (Post Raimon Grau ( 05, 2014 06:06 PM