Pragmatic Emacs: Org-mode basics V: Exporting your notes

In this final post of my short series on using org-mode to write rich, structured notes, we will look at exporting the notes as a web page or pdf document. The previous posts covered structuring your notes and adding tables and links and images, and formatting text and source code.

If you have been following along, you should have an org file containing all of the notes on org-mode from the previous posts. We’ll now look at exporting that file.

One strength of org-mode is the ability to export to multiple formats. Probably the most useful to begin with are web pages and pdf (via latex) but more are available; to quote the org manual

ASCII export produces a readable and simple version of an Org file for printing and sharing notes. HTML export allows you to easily publish notes on the web, or to build full-fledged websites. LaTeX export lets you use Org mode and its structured editing functions to create arbitrarily complex LaTeX files for any kind of document. OpenDocument Text (ODT) export allows seamless collaboration across organizational boundaries. Markdown export lets you seamlessly collaborate with other developers. Finally, iCal export can extract entries with deadlines or appointments to produce a file in the iCalendar format.

To export your org file to a web page, type C-c C-e to start the exporter and then press h to select html and o to select open. A new web page should now open in your browser.

Similarly, typing l and o in the exporter will convert the org file to latex and then compile it to produce a pdf and display that. Try both of these.

It is possible to add many customisations to the export process. For example, go to the top of the buffer (using M-<) and use C-c C-e and then # to insert an export template. You can then choose to add html or latex (or other) templates (press TAB to see the list).

As an example, add the following to the top of your org file to tweak the appearance of the exported documents.

#+LaTeX_CLASS: bjmarticle
#+TITLE:     Org-mode Basics
#+AUTHOR: Ben Maughan
#+OPTIONS: html-link-use-abs-url:nil html-postamble:auto
#+OPTIONS: html-preamble:t html-scripts:t html-style:t
#+OPTIONS: html5-fancy:nil tex:t
#+HTML_DOCTYPE: xhtml-strict
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="" />
#+CREATOR: <a href="">Emacs</a> 24.4.1 (<a href="">Org</a> mode 8.3.2)

This is the default html export template with a couple of tweaks.

  • I have added a link to a style sheet to style the html
  • I have added a latex class bjmarticle to control the appearance of the generated pdf

The latex class is defined in my emacs config file with the following

(add-to-list 'org-latex-classes
\\geometry{a4paper,left=2.5cm,top=2cm,right=2.5cm,bottom=2cm,marginparsep=7pt, marginparwidth=.6in}"
               ("\\section{%s}" . "\\section*{%s}")
               ("\\subsection{%s}" . "\\subsection*{%s}")
               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
               ("\\paragraph{%s}" . "\\paragraph*{%s}")
               ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

You’ll need some experience of LaTeX to make significant changes here, but the sky is the limit.

I have compiled the series of posts on org-mode basics into a single org file, and exported it with this set of export options.

  • The org file is here
  • The exported web page is here
  • The exported pdf is here

The wrapping of the example and code blocks in the pdf needs to be fixed, but overall we get some pretty nice looking documents with minimal effort.

-1:-- Org-mode basics V: Exporting your notes (Post Ben Maughan)--L0--C0--October 09, 2015 03:51 PM

Irreal: Video on Using Org Mode for Your Init File

Daniel Mai has a nice video on how he uses Org mode to organize his Emacs init file. I've written about this before but some of you may prefer, or at least enjoy, watching a video on the subject.

This appears to be the first of several videos on the subject so Mai restricts himself to showing how he organizes the Org file and how he uses the use-package package to install and configure his packages. He promises to go into some of the details in future videos.

If you've reached the point where you're thinking, “I really should refactor my init file” you should consider organizing it as an Org file. Doing that makes it easy to add commentary on why your doing things a particular way or what a custom function is for. One of the big benefits, I think, is that Org mode's outline paradigm makes it natural to organize your init file in a reasonable way. That, in turn, makes it easy to find things either by just looking at the headings or using one of the excellent Org mode search functions.

In any event, the video is enjoyable and only 12 minutes long so it should be easy to fit it into your schedule.

-1:-- Video on Using Org Mode for Your Init File (Post jcs)--L0--C0--October 09, 2015 11:47 AM

Irreal: Some Org Agenda Tips

Marcin Borkowski (mbork), who's been posting several great articles lately, has a nice offering with A few org-agenda hacks. It's a short list of some of the ways he's tweaked Org's agenda view to better suit his needs.

As Borkowski says, all of this is in the documentation but may be a bit hard to dig out. If you use even one of his tips it will have been worth reading this short but pithy post.

-1:-- Some Org Agenda Tips (Post jcs)--L0--C0--October 08, 2015 01:06 PM

Ben Simon: More Linux-on-Android success: emacs, racket and git

Shira often cringes when I join her at the craps table. Will I drop some forbidden statement like wow, nobody's rolled a 7 in forever!, thereby guaranteeing the next roll to be a 7? In general, I just don't respect the juju that goes with gambling; that underlying assumption that through external means you can control random events. Turns out, this is a studied phenomena, known as the Hot Hand Fallacy. When ProgrammingPraxis took up the topic, I knew I had to jump in and implement the exercise.

I was writing this on fresh Linux system, so the first order of business was to pull in tools. I did something along the lines of:

  apt-get install emacs racket git

The plan was to code the solution in emacs, execute it in racket and publish my work using git. Once the above command finished, I fired up emacs, kicked off a Scheme buffer powered by racket and started coding away. The ProgrammingPraxis exercise called for the implementation of an experiment mentioned in the Wall Street Journal that showed how the Hot Handy fallacy could be experienced. Here's my implementation:


(define (flip)
  (if (= (random 2) 1) 'H 'T))

(define (sample)
  (list (flip) (flip) (flip) (flip)))

(define (hot? s)
  (cond ((null? s) (void))
 ((null? (cdr s)) (void))
 ((eq? 'H (car s)) (eq? 'H (cadr s)))
 (else (void))))

(define (collect fn sample)
  (if (null? sample)
      (let ((v (fn sample)))
 (if (void? v)
     (collect fn (cdr sample))
     (cons v (collect fn (cdr sample)))))))

(define (only-true items)
  (filter (lambda (t) t) items))

(define (percentify items)
  (if (null? items) 0
      (exact-gt;inexact (/ (length (only-true items))
    (length items)))))

(define (try count thunk)
  (let loop ((avg (thunk)) (count (- count 1)))
    (if (= 0 count)
 (loop (/ (+ (thunk) avg) 2) (- count 1)))))

(define (experiment)
  (percentify (collect hot? (sample))))

Each experiment consisted of flipping a coin 4 times and reviewing the outcome. I then kicked off 2,000,000 of these experiments:

 (try 2000000 experiment)

Here's a screenshot of the results:

If you squint, you'll see that I did occasionally get close the 40% behavior mentioned in the article, though I got plenty of other behavior, too. Chances are, the implementation above is buggy.

The little Android icon in the screenshot above reveals the truly remarkable part of this exercise: the above was all executed on my Galaxy Note5 using Gnuroot. I was amazed at how nearly flawless emacs and racket performed. It was just like I was on any old Linux environment. And when I was finished with my solution, I pushed the code to github using the command line version of git.

I was disappointed to see that Gambit Scheme is no longer available on Google Play. But having access to racket and other standard Linux tools makes up for this and then some.

I did note above that the tools were nearly flawless. There were some gotchas, including:

  • emacs: The arrow keys can become undefined. A fix is shown here
  • emacs: my standard desktop configuration loaded up properly, but I did get a warning message about being "past 95% of memory limit." I don't know what that means, but it sounds scary.
  • gnuroot: I don't have a good way to swatch back and forth between a Gnuroot terminal and other Android apps. I can bring up the Gnuroot launcher, but that means having to kick off another terminal session.

But these issues were all minor when compared to how much Gnuroot Just Works.

I see that the next ProgrammingPraxis exercise also covers a gambling related topic. Time to bust out my keyboard and get to work!

-1:-- More Linux-on-Android success: emacs, racket and git (Post Ben Simon ( 07, 2015 06:10 PM

Alex Schroeder: Pink Bliss

Pink Bliss has improved somewhat. Mostly, I just added some magit faces.

You know you want it! Download from GitHub!

Emacs, in it’s maximized glory:

Tags: RSS

-1:-- Pink Bliss (Post)--L0--C0--October 06, 2015 04:14 PM

Pragmatic Emacs: Transpose characters

You can use C-t to run transpose-chars to switch the character at the cursor position with the previous character. Repeated uses have the effect of dragging the character behind the point to the right.

I have found that I prefer the behaviour to be that the previous two characters before the point are switched, as I usually want to do this if I spot I have just made a typo. This is what transpose-chars does if you are at the end of a line, but not if you are somewhere in the middle of the line. To modify the behaviour in this way, I use

;; adjust transpose-chars to switch previous two characters
(global-set-key (kbd "C-t")
                (lambda () (interactive)
                  (transpose-chars 1)))

As an example, with the modified behaviour, using C-t with the point at the end of the string teh changes it to the, while the original behaviour gives you te h (unless you are at the end of a line, in which case you get the). Repeated use of the modified version simply toggles back and forth.

-1:-- Transpose characters (Post Ben Maughan)--L0--C0--October 06, 2015 11:58 AM

Julien Danjou: Gnocchi talk at OpenStack Paris Meetup #16

Last week, I've been invited to the OpenStack Paris meetup #16, whose subject was about metrics in OpenStack. Last time I spoke at this meetup was back in 2012, during the OpenStack Paris meetup #2. A very long time ago!

I talked for half an hour about Gnocchi, the OpenStack project I've been running for 18 months now. I started by explaining the story behind the project and why we needed to build it. Ceilometer has an interesting history and had a curious roadmap these last year, and I summarized that briefly. Then I talk about how Gnocchi works and what it offers to users and operators. The slides where full of JSON, but I imagine it offered a interesting view of what the API looks like and how easy it is to operate. This also allowed me to emphasize how many use cases are actually really covered and solved, contrary to what Ceilometer did so far. The talk has been well received and I got a few interesting questions at the end.

The video of the talk (in French) and my slides are available on my talk page and below. I hope you'll enjoy it.

-1:-- Gnocchi talk at OpenStack Paris Meetup #16 (Post Julien Danjou)--L0--C0--October 05, 2015 10:00 AM

Endless Parentheses: Better time-stamps in org-export

org-mode has a very useful command, org-time-stamp, which helps you insert dates from a calendar. So you can quickly type C-c . RET to insert <2015-10-05 Mon>, for instance. These time-stamps are used by Org in a variety of ways, so they are wrapped in <> to make them easy to parse. The downside being that they look less than optimal when exported.

I was bit by this again today while updating the post on donations, and I finally decided to look for a way to fix it. Of course, org-mode is nothing if not configurable, so the answer wasn’t very far away.

(add-to-list 'org-export-filter-timestamp-functions
(defun endless/filter-timestamp (trans back _comm)
  "Remove <> around time-stamps."
  (pcase back
    ((or `jekyll `html)
     (replace-regexp-in-string "&[lg]t;" "" trans))
     (replace-regexp-in-string "[<>]" "" trans))))

The loyal readers might notice how similar this is to the second lambda we used for exporting Youtube links. Org is quite consistent in its use of export filters.

The above is enough to remove the surrounding <>, but we can still make it better. The YYYY-MM-DD weekday format isn’t commonly used in prose, so let’s switch that as well.

(setq-default org-display-custom-times t)
;;; Before you ask: No, removing the <> here doesn't work.
(setq org-time-stamp-custom-formats
      '("<%d %b %Y>" . "<%d/%m/%y %a %H:%M>"))

As a bonus, this format will also be used to display time-stamps in your org-mode buffers. If don’t want that, you can let-bind the org-display-custom-times variable when calling the export function, instead of setting it globally.

If any of this doesn’t work for you, you might need to update your Org package. Fortunately, Org is on GElpa, so anyone can do that with M-x list-packages.

Comment on this.

-1:-- Better time-stamps in org-export (Post)--L0--C0--October 05, 2015 12:00 AM

(or emacs: Swiper and visual-line-mode

In case you encounter files with very long lines, the built-in M-x visual-line-mode might come in handy. Although 1MB long one-line files are a disaster for Emacs, there's no problem handling smaller files with long lines that result from bad markdown renderers (notably Github). They way visual-line-mode works, is it inserts virtual newlines in appropriate positions, so that no line is truncated. The advantage is that these newlines aren't written to the file when the buffer is saved (otherwise, a simple M-q (fill-paragraph) would work too).

Today I've added visual-line-mode support to swiper, so handling these files should be even easier now. The change was surprisingly simple: just two checks for visual-line-mode variable and these basic replacements:

  • forward-line -> line-move,
  • line-beginning-position -> beginning-of-visual-line,
  • line-end-position -> end-of-visual-line.

By the way, visual-line-mode is one of the small number of commands that I call by name instead of by key chord. But thanks to counsel-M-x and smex calling this command by name is as short as C-t v RET. To explain a bit more, here's my setup:

;; make sure to install smex
(global-set-key (kbd "C-t") 'counsel-M-x)

The default command bound to C-t is transpose-chars - a highly situational and ultimately counter-productive command (M-DEL and re-typing the word is faster than surgically navigating to the transpose point and calling transpose-chars, plus it trains the hands to type the word correctly next time). Anyway, C-t is a prime binding for launching interactive commands. And since smex is installed it remembers that my most used command that starts with "v" is visual-line-mode - so it's the first one that gets selected after C-t v. This means that I can just press RET and be done with it.


Finally, related to visual-line-mode, here's a command I use to negate M-q (fill-paragraph) (source):

(global-set-key (kbd "C-M-q") 'ora-unfill-paragraph)

(defun ora-unfill-paragraph ()
  "Transform a paragraph into a single line."
  (let ((fill-column (point-max)))
    (fill-paragraph nil t)))

Thanks to @joostkremers for the suggestion in #227.

-1:-- Swiper and visual-line-mode (Post)--L0--C0--October 01, 2015 10:00 PM

(or emacs: More tweaks to Ivy minibuffer faces

This is a continuation of the thought that I started in the last post a few weeks ago. I don't fancy myself a graphical designer, but I kind of have a feeling of what I like - I certainly know it when I see it.

I wasn't quite happy with the color of the current selection in the minibuffer. Then it hit me that I like the way the Firefox address bar does it: invert the selected text foreground to white and add a flashy background. After that, it was only a matter of going though a few random color permutations in the GIMP color selector to arrive to a nice state:


I did add something similar for dark background themes, although I rarely use them myself, since they contrast too much with Firefox, with most websites having a light background:

(defface ivy-current-match
  '((((class color) (background light))
     :background "#1a4b77" :foreground "white")
    (((class color) (background dark))
     :background "#65a7e2" :foreground "black"))
  "Face used by Ivy for highlighting first match.")

Of course, the standard recommendation follows to use rainbow-mode in buffers that deal with colors - it's great.

Finally, counsel-git-grep and counsel-ag now also add the proper minibuffer coloring if you have it turned on:

(setq ivy-display-style 'fancy)


If you're interested in how the face backgrounds are combined, you can read my older article on color blending in Elisp.

-1:-- More tweaks to Ivy minibuffer faces (Post)--L0--C0--September 28, 2015 10:00 PM

Endless Parentheses: Predicting the future with M-n

This is one of those small functionalities that makes your life considerably easier, and yet a surprising number of people don’t know about it. When Emacs prompts you for something in the minibuffer, you might be aware that you can navigate back and forth in the prompt’s history with M-p and M-n, but did you know you can even step into the future?

Well, sort of… At least that’s the spirit. If you type M-p at the prompt, Emacs fills the prompt with previous items from the history. On the other hand, if you type M-n, Emacs will try to guess from context what your next input is going to be. The meaning of this depends on the command (some of these require Emacs 24.5).

  • In file prompts, hitting M-n fills in the name of the current file. This is very useful with write-file or with dired commands like copy or move.
  • M-x tries to find a command name under point.
  • In query-replace-regexp it fills in the symbol at point, which is usually a pretty good guess of what you want to replace. And you can hit M-n a second time to get \_<symbol-delimiters\_> around the symbol.
  • As Marco points out in the comments, if you have two dired windows open, file or directory prompts in one window fill in the directory name of the other window.

These are the ones I use most often, but I’m sure there are more commands that support this feature, and it’s always worth trying it out with your favorite ones.

Comment on this.

-1:-- Predicting the future with M-n (Post)--L0--C0--September 28, 2015 12:00 AM

Jorgen Schäfer: Buttercup 1.2 released

I just released version 1.2 of Buttercup, the Behavior-Driven Emacs Lisp Testing framework.

Buttercup is a behavior-driven development framework for testing Emacs Lisp code. It is heavily inspired by Jasmine.

Installation and Use

Buttercup is available from MELPA Stable.

Example test suite:

(describe "A suite"
(it "contains a spec with an expectation"
(expect t :to-be t)))

Suites group tests, and suites can be nested. Contrary to ERT, suites can share set-up and tear-down code for tests, and Buttercup comes with built-in support for mocks in the form of spies. See the package homepage above for a full description of the syntax for test suites and specs.

Buttercup comes with a shell script to run the default discover runner. If used together with cask, cask exec buttercupwill find, load and run test suites in your project.

Changes Since 1.1

  • The :to-have-been-called-with matcher now shows the actual call arguments in addition to the expected ones to make it easier to figure out what went wrong.
  • Interactive test calls now show the end of the output buffer to make it easier to see results, and do not change the selected window in case of errors anymore.
  • Test discovery now does not accidentally load non-Lisp files anymore, and excludes dotfiles more reliably.

Many thanks to Matus Goljer for testing and bugfixes!

-1:-- Buttercup 1.2 released (Post Jorgen Schäfer ( 27, 2015 10:14 AM

Mark Hepburn: Emacs and filenotify

Here’s another Emacs quickie. Some time ago I wrote about parsing ssh agent variables in elisp. To recap, the issue was that in windows Emacs is started separately from git-bash, so it doesn’t inherit the environment variables to make it seemlessly use your ssh keys. My quick and dirty solution was to write a function to parse a file containing those variables.

That works fine, but it does mean you have to manually invoke that function. You could run the function on load, but then you have to remember to start git-bash first.

It’s not an ideal situation, and the other day I finally wondered if Emacs had any file-watching library… of course it does.

(defvar ssh-file-watcher nil)

(when (require 'filenotify nil t)
  ;; We're loading up, slurp SSH envs in case in they're already
  ;; correct:
  ;; Clear any existing watcher:
  (if ssh-file-watcher
      (file-notify-rm-watch ssh-file-watcher))
  ;; Create the new watcher:
  (setq ssh-file-watcher
        (file-notify-add-watch (expand-file-name "~/.ssh/agent.env")
                               '(change attribute-change)

In other words, another 5 minutes of hacking and now we simply load the variables just in case, clear any existing watcher, and start watching the file for changes — when it does, we simply slurp again. If you follow this verbatim, the only addition you’ll need to make is to ensure that your callback function accepts the arguments filenotify will give it; I just ignored them: (defun mh/parse-sshagent-env (&rest ignored)...

Much more painless!

-1:-- Emacs and filenotify (Post)--L0--C0--September 27, 2015 12:00 AM

sachachua: Update on Emacs Conf 2015 videos; Org Mode tables and time calculations

I spent the day cutting up the rest of the videos from the Emacs Conference 2015 stream into individual talks. I’d already cut the set of talks before lunch, but there were quite a few more after. As it turned out, keeping the video data in .ts format instead of converting it to .mp4 is actually better for Youtube processing.

Since Camtasia Studio and Movie Maker were both having problems with the large videos, I used VLC to play the video and find the timestamps at which I needed to cut the segments. I made an Org Mode table with the start and end times, and then I used the ;T flag in a table function to get the duration. A little bit of Emacs Lisp code later, and I had my ffmpeg commands. Here’s the source from my Org file:

#+NAME: emacsconf-c.ts
| Notes                                            |      Start |        End | Duration |
| Emacs configuration                              | 4:02:25.37 | 4:27:09.30 | 00:24:44 |
| Hearing from Emacs Beginners                     |    4:27:27 |    5:01:00 | 00:33:33 |
| Lightning talk: Emacs Club                       | 5:03:19.30 | 5:19:37.83 | 00:16:18 |
| Starting an Emacs Meetup - Harry Schwartz part 1 | 5:31:52.03 |    6:01:20 | 00:29:28 |
#+TBLFM: $4=$3-$2;T

#+NAME: emacsconf-a.ts
| Notes                                                    |   Start |     End | Duration |
| Starting an Emacs Meetup - Harry Schwartz part 2         |  0:0:00 | 0:20:04 | 00:20:04 |
| Literate Devops - Howard Abrams                          | 1:28:20 | 2:08:15 | 00:39:55 |
| Lightning talk: Wanderlust and other mail clients        | 2:15:04 | 2:26:55 | 00:11:51 |
| Making Emacs a Better Tool for Scholars - Erik Hetzner   | 2:27:00 | 2:57:38 | 00:30:38 |
| Wrapping up and going forward                            | 2:58:09 | 2:59:44 | 00:01:35 |
| Lightning talk: Collaborative coding with tmux and tmate | 3:00:20 | 3:05:53 | 00:05:33 |
| Lightning talk: Cask and Pellet                          | 3:05:56 | 3:09:04 | 00:03:08 |
| Lightning talk: File sharing with Git and save hooks     | 3:09:34 | 3:17:50 | 00:08:16 |
| Lightning talk: Calc                                     | 3:18:42 | 3:33:20 | 00:14:38 |
| Lightning talk: Magit                                    | 3:35:15 | 3:49:42 | 00:14:27 |
| Lightning talk: gist.el                                  | 3:53:50 | 4:01:58 | 00:08:08 |
| Lightning talk: Go                                       | 4:02:45 | 4:16:37 | 00:13:52 |
| Question: Emacs Lisp backtraces                          | 4:16:50 | 4:20:09 | 00:03:19 |
#+TBLFM: $4=$3-$2;T

#+begin_src emacs-lisp :var data=emacsconf-a.ts :var data2=emacsconf-c.ts :colnames t :results output
(let ((format-str "ffmpeg -i %s -ss %s -t %s -c:v copy -c:a copy \"EmacsConf 2015 - %s.ts\"\n"))
  (mapc (lambda (file)
    (mapc (lambda (row) 
      (princ (format format-str (car file) (elt row 1) (elt row 3) (my/convert-sketch-title-to-filename (elt row 0))))) 
     (cdr file)))
    `(("emacsconf-c.ts" . ,data2)
      ("emacsconf-a.ts" . ,data))))

and the output:

ffmpeg -i emacsconf-c.ts -ss 4:02:25.37 -t 00:24:44 -c:v copy -c:a copy "EmacsConf 2015 - Emacs configuration.ts"
ffmpeg -i emacsconf-c.ts -ss 4:27:27 -t 00:33:33 -c:v copy -c:a copy "EmacsConf 2015 - Hearing from Emacs Beginners.ts"
ffmpeg -i emacsconf-c.ts -ss 5:03:19.30 -t 00:16:18 -c:v copy -c:a copy "EmacsConf 2015 - Lightning talk - Emacs Club.ts"
ffmpeg -i emacsconf-c.ts -ss 5:31:52.03 -t 00:29:28 -c:v copy -c:a copy "EmacsConf 2015 - Starting an Emacs Meetup - Harry Schwartz part 1.ts"
ffmpeg -i emacsconf-a.ts -ss 0:0:00 -t 00:20:04 -c:v copy -c:a copy "EmacsConf 2015 - Starting an Emacs Meetup - Harry Schwartz part 2.ts"
ffmpeg -i emacsconf-a.ts -ss 1:28:20 -t 00:39:55 -c:v copy -c:a copy "EmacsConf 2015 - Literate Devops - Howard Abrams.ts"
ffmpeg -i emacsconf-a.ts -ss 2:15:04 -t 00:11:51 -c:v copy -c:a copy "EmacsConf 2015 - Lightning talk - Wanderlust and other mail clients.ts"
ffmpeg -i emacsconf-a.ts -ss 2:27:00 -t 00:30:38 -c:v copy -c:a copy "EmacsConf 2015 - Making Emacs a Better Tool for Scholars - Erik Hetzner.ts"
ffmpeg -i emacsconf-a.ts -ss 2:58:09 -t 00:01:35 -c:v copy -c:a copy "EmacsConf 2015 - Wrapping up and going forward.ts"
ffmpeg -i emacsconf-a.ts -ss 3:00:20 -t 00:05:33 -c:v copy -c:a copy "EmacsConf 2015 - Lightning talk - Collaborative coding with tmux and tmate.ts"
ffmpeg -i emacsconf-a.ts -ss 3:05:56 -t 00:03:08 -c:v copy -c:a copy "EmacsConf 2015 - Lightning talk - Cask and Pellet.ts"
ffmpeg -i emacsconf-a.ts -ss 3:09:34 -t 00:08:16 -c:v copy -c:a copy "EmacsConf 2015 - Lightning talk - File sharing with Git and save hooks.ts"
ffmpeg -i emacsconf-a.ts -ss 3:18:42 -t 00:14:38 -c:v copy -c:a copy "EmacsConf 2015 - Lightning talk - Calc.ts"
ffmpeg -i emacsconf-a.ts -ss 3:35:15 -t 00:14:27 -c:v copy -c:a copy "EmacsConf 2015 - Lightning talk - Magit.ts"
ffmpeg -i emacsconf-a.ts -ss 3:53:50 -t 00:08:08 -c:v copy -c:a copy "EmacsConf 2015 - Lightning talk - gist.el.ts"
ffmpeg -i emacsconf-a.ts -ss 4:02:45 -t 00:13:52 -c:v copy -c:a copy "EmacsConf 2015 - Lightning talk - Go.ts"
ffmpeg -i emacsconf-a.ts -ss 4:16:50 -t 00:03:19 -c:v copy -c:a copy "EmacsConf 2015 - Question - Emacs Lisp backtraces.ts"

You can watch the Emacs Conference 2015 playlist on YouTube. At some point, each talk will probably have individual wiki pages and IRC logs at . =) Enjoy!

Related tech notes: Emacs Conf video tech notes:,, livestreamer, ffmpeg

The post Update on Emacs Conf 2015 videos; Org Mode tables and time calculations appeared first on sacha chua :: living an awesome life.

-1:-- Update on Emacs Conf 2015 videos; Org Mode tables and time calculations (Post Sacha Chua)--L0--C0--September 25, 2015 09:47 PM

emacspeak: Emacspeak: An Overview Of Voice-Lock Over The Years

Emacspeak: An Overview Of Voice-Lock Over The Years

1 Executive Summary

Audio formatted output is provided via voice-lock in Emacspeak.
The feature was originally implemented in 1994 and significantly
overhauled in 2002 (with no change in functionality). Now, in 2015,
the implementation has been reworked to be once again simpler — but
with the same functionality.

2 1994: Original Implementation

Font-lock was a new feature in Emacs 19 — it was introduced right
around the time the Emacspeak project was started.
At the time, there were multiple font-lock packages in
Emacs. Emacspeak implemented voice-lock via a stand-alone module
that attached property personality to buffer contents. The
dtk-speak Text-To-Speech module treated strings annotated with
property personality as an aural display list when producing
spoken output.

In the winter of 1995, I implemented Aural CSS in emacspeak, and
this resulted in module acss.el — that module provides a clean
abstraction for defining values that can be assigned to property
personality. Next, the rest of emacspeak was overhauled to
express all voice-lock features via the ACSS abstraction.

3 2002 Overhaul

With feature font-lock now mature, Emacs itself converged on a
single font-lock module with jit-lock.el providing just-in-time font
locking. This meant that Emacspeak's voice-lock feature could now be
more easily implemented by attaching appropriate advice to lisp
functions put-text-property and friends — this led to the deletion
of module voice-lock.el and the creation of module

That module provided multiple options for how faces were mapped to

  • Cumulative where property personality was either appended or
    prepended to the list of personalities at any given position.
  • Simple: where the new personality directly replaced any previously
    applied personality property.
  • None: Where faces were not mapped to personalities.

4 2015 Overhaul

And now, in 2015, the code in module dtk-speak.el that implements
audio-formatting has been overhauled to directly map faces to
personalities. This implementation can be enabled by setting the
option emacspeak-personality-voiceify-faces provided in module
emacspeak-personality.el to All. This means that the new
implementation can co-exist (at least for a while) with the earlier
advice-based implementation from module emacspeak-personality.el.

once deemed to be stable, the new implementation will become the
default — by changing the default value of
emacspeak-personality-voiceify-faces to none.

5 Summary

From an end-user's perspective, nothing has changed in 21 years. From
the perspective of implementing voice-lock for Emacs modules, nothing
has changed — all that an Emacspeak extension for a specific package
needs to do to enable voice-lock is to set up a face->personality
mapping as before via function voice-setup-add-map. Note that
property personality will continue to have higher precedence than
property face with respect to the audio formatting that gets applied
i.e. Emacspeak first consults value of property personality, and if
that is not set, but there is a face property set, then that
face->personality mapping (if defined) is used as the aural style.

Date: <2015-08-18 Tue>

Author: T.V Raman

Created: 2015-08-21 Fri 10:18


-1:-- Emacspeak: An Overview Of Voice-Lock Over The Years (Post T. V. Raman ( 21, 2015 09:21 PM

emacspeak: Announcing Emacspeak-Muggles: Keyboard Conveniences For Emacspeak

Announcing Emacspeak-Muggles: Keyboard Conveniences For Emacspeak

1 Announcing Emacspeak-Muggles: Keyboard Conveniences For Emacspeak

1.1 Executive Summary:

new module emacspeak-muggles uses package hydra to provide keyboard conveniences.

1.2 Overview:

Package hydra allows convenient grouping of keyboard commands, see that package's description for details. It can be installed by executing

M-x package-install hydra

Module emacspeak-muggles implements a set of convenience hydras that make invoking groups of related commands easy. Here are the Muggles currently implemented:

Control laptop display brightness using xbacklight.
Access view-mode functionality without invoking view-mode explicitly.
Access Emacspeak Table UI functionality for org-mode tables.
And a lot more to come.

1.3 Blogger Note:

Going forward, these articles will be published via GitHub – rather than Blogspot — the new Blogspot API requires browser-based authentication that is beyond Emacs.

Date: <2015-07-13 Mon>

Author: raman

Created: 2015-07-13 Mon 09:17

Emacs (Org mode 8.2.10)


-1:-- Announcing Emacspeak-Muggles: Keyboard Conveniences For Emacspeak (Post T. V. Raman ( 21, 2015 09:18 PM

Grant Rettke: A Book Produced Using Org


I am happy to share with fellow Orgers my recent book — Ending Malnutrition: from commitment to action — published by the Food and Agriculture Organisation of the United Nations, Rome and Tulika Books, New Delhi (, The book was written and produced entirely in Org.

This would not have been possible without the terrific support provided by this community. Over the last few months, I have come to this mailing list with several queries about how to do something or the other, and people have very patiently provided solutions and suggestions.

I would like to thank everyone for their patience and their support.


From acknowledgements of the book:

In addition, for all the statistical work and writing, the authors relied on R (, org (, and LaTeX. All three are open source projects, freely made available by very vibrant communities of developers. During the course of the work, we often drew on support from these communities.

ADDEUNDUM: <2015-09-21 Mon>

The author just released the source code for the book!

-1:-- A Book Produced Using Org (Post Grant)--L0--C0--September 20, 2015 09:09 PM

Grant Rettke: Choosing the Right Diff Tool for You

By my idiosyncratic measures:

For small changes git diff and vc-diff are perfect.

For medium changes magit is perfect.

For large changes DeltaWalker is perfect.

-1:-- Choosing the Right Diff Tool for You (Post Grant)--L0--C0--September 20, 2015 08:04 PM

Ben Simon: Linux on your Android phone, easier and more powerful than you think

I had a really good thing going with Terminal IDE on my Android phone. It gave me a basic Unix Environment, which when combined with a Bluetooth keyboard, made accomplishing certain dev tasks a breeze.

Then I got upgraded to Android 5.x and the party stopped. TerminalIDE was rendered useless through the OS change.

A week back I picked up a new phone, a Galaxy Note 5. I hope to do a full review once I've logged sufficient hours. As this was a new phone, I figured I should check on Terminal IDE, maybe there was a work around. Alas, still broken. But it did lead me to GNURoot which promised an install of Linux without rooting your phone. And from there, I made my way to the newer GNURoot Debian.

I kicked off the app and blindly followed the prompts. Sure, I'll make a rootfs. Whatever. Lo and behold, when it was all said and done I was dropped at a bash prompt.

The most basic commands (ls, for example) worked. But anything slightly trickier (vi or ping) came back with a command not found. Was this some sort of toy system? Not at all. I just wasn't thinking big enough. I typed:

  apt-get install vim less

and the result was:

To my amazement, apt-get did its thing and when I was done, I had vim and less at my disposal!

I grabbed more of my favorite utilities: ssh, netcat, curl and subversion. For bonus points I grabbed scsh, the Scheme Shell. Everything pulled down just fine and more importantly, appeared to run just fine:

This isn't like having a Unix Environment on my phone, this is a Unix Environment on my phone.

And I'm apparently still thinking small, folks have gotten LibreOffice and other GUI apps running in this non-root environment. Amazing.

The system isn't without it's glitches. I'm not able to make certain soft links like I'd hoped. And while you can install ping, you don't have the needed permissions to run it. But still, these are minor compared to what actually works and how little effort went into setting this up.

I've not got a shiny new power tool in the toolbox, and boy is it awesome! Let's hope I don't lose a virtual arm to it.

-1:-- Linux on your  Android phone, easier and more powerful than you think (Post Ben Simon)--L0--C0--September 18, 2015 08:24 AM

Alex Schroeder: Emacs and TTY

I’m connecting to Kallobombus via SSH. It runs Debian 7.9 aka Wheezy. Recently a new problem appeared. I can no longer use Emacs unless I’m root.

alex@kallobombus:~$ emacs
emacs: Could not open file: /dev/tty
alex@kallobombus:~$ sudo emacs
alex@kallobombus:~$ ls -l /dev/tty
crw------- 1 root root 5, 0 Sep 18 08:28 /dev/tty
alex@kallobombus:~$ cat /etc/debian_version 
alex@kallobombus:~$ which emacs

What’s the problem?

On a different server, running Ubuntu 14.04.1 LTS:

kensanata@po6:~$ cat /etc/debian_version 
kensanata@po6:~$ ls -l /dev/tty
crw-rw-rw- 1 root tty 5, 0 Sep 15 11:42 /dev/tty
kensanata@po6:~$ emacs

So, is the solution to chmod o+rw /dev/tty?

Oh well, I ran sudo chmod go+rw /dev/tty and that seemed to fix the problem. I just hope it didn’t create any security issues.

Tags: RSS

-1:-- Emacs and TTY (Post)--L0--C0--September 18, 2015 06:34 AM

Julien Danjou: My interview in le Journal du Hacker

A few days ago, the French equivalent of Hacker News, called "Le Journal du Hacker", interviewed me about my work on OpenStack, my job at Red Hat and my self-published book The Hacker's Guide to Python. I've spent some time translating it into English so you can read it if you don't understand French! I hope you'll enjoy it.

Hi Julien, and thanks for participating in this interview for the Journal du Hacker. For our readers who don't know you, can you introduce you briefly?

You're welcome! My name is Julien, I'm 31 years old, and I live in Paris. I now have been developing free software for around fifteen years. I had the pleasure to work (among other things) on Debian, Emacs and awesome these last years, and more recently on OpenStack. Since a few months now, I work at Red Hat, as a Principal Software Engineer on OpenStack. I am in charge of doing upstream development for that cloud-computing platform, mainly around the Ceilometer, Aodh and Gnocchi projects.

Being myself a system architect, I follow your work in OpenStack since a while. It's uncommon to have the point of view of someone as implied as you are. Can you give us a summary of the state of the project, and then detail your activities in this project?

The OpenStack project has grown and changed a lot since I started 4 years ago. It started as a few projects providing the basics, like Nova (compute), Swift (object storage), Cinder (volume), Keystone (identity) or even Neutron (network) who are basis for a cloud-computing platform, and finally became composed of a lot more projects.

For a while, the inclusion of projects was the subject of a strict review from the technical committee. But since a few months, the rules have been relaxed, and we see a lot more projects connected to cloud-computing joining us.

As far as I'm concerned, I've started with a few others people the Ceilometer project in 2012, devoted to handling metrics of OpenStack platforms. Our goal is to be able to collect all the metrics and record them to analyze them later. We also have a module providing the ability to trigger actions on threshold crossing (alarm).

The project grew in a monolithic way, and in a linear way for the number of contributors, during the first two years. I was the PTL (Project Technical Leader) for a year. This leader position asks for a lot of time for bureaucratic things and people management, so I decided to leave my spot in order to be able to spend more time solving the technical challenges that Ceilometer offered.

I've started the Gnocchi project in 2014. The first stable version (1.0.0) was released a few months ago. It's a timeseries database offering a REST API and a strong ability to scale. It was a necessary development to solve the problems tied to the large amount of metrics created by a cloud-computing platform, where tens of thousands of virtual machines have to be metered as often as possible. This project works as a standalone deployment or with the rest of OpenStack.

More recently, I've started Aodh, the result of moving out the code and features of Ceilometer related to threshold action triggering (alarming). That's the logical suite to what we started with Gnocchi. It means Ceilometer is to be split into independent modules that can work together – with or without OpenStack. It seems to me that the features provided by Ceilometer, Aodh and Gnocchi can also be interesting for operators running more classical infrastructures. That's why I've pushed the projects into that direction, and also to have a more service-oriented architecture (SOA)

I'd like to stop for a moment on Ceilometer. I think that this solution was very expected, especially by the cloud-computing providers using OpenStack for billing resources sold to their customers. I remember reading a blog post where you were talking about the high-speed construction of this brick, and features that were not supposed to be there. Nowadays, with Gnocchi and Aodh, what is the quality of the brick Ceilometer and the programs it relies on?

Indeed, one of the first use-case for Ceilometer was tied to the ability to get metrics to feed a billing tool. That's now a reached goal since we have billing tools for OpenStack using Ceilometer, such as CloudKitty.

However, other use-cases appeared rapidly, such as the ability to trigger alarms. This feature was necessary, for example, to implement the auto-scaling feature that Heat needed. At the time, for technical and political reasons, it was not possible to implement this feature in a new project, and the functionality ended up in Ceilometer, since it was using the metrics collected and stored by Ceilometer itself.

Though, like I said, this feature is now in its own project, Aodh. The alarm feature is used since a few cycles in production, and the Aodh project brings new features on the table. It allows to trigger threshold actions and is one of the few solutions able to work at high scale with several thousands of alarms. It's impossible to make Nagios run with millions of instances to fetch metrics and triggers alarms. Ceilometer and Aodh can do that easily on a few tens of nodes automatically.

On the other side, Ceilometer has been for a long time painted as slow and complicated to use, because its metrics storage system was by default using MongoDB. Clearly, the data structure model picked was not optimal for what the users were doing with the data.

That's why I started Gnocchi last year, which is perfectly designed for this use case. It allows linear access time to metrics (O(1) complexity) and fast access time to the resources data via an index.

Today, with 3 projects having their own perimeter of features defined – and which can work together – Ceilometer, Aodh and Gnocchi finally erased the biggest problems and defects of the initial project.

To end with OpenStack, one last question. You're a Python developer for a long time and a fervent user of software testing and test-driven development. Several of your blogs posts point how important their usage are. Can you tell us more about the usage of tests in OpenStack, and the test prerequisites to contribute to OpenStack?

I don't know any project that is as tested on every layer as OpenStack is. At the start of the project, there was a vague test coverage, made of a few unit tests. For each release, a bunch of new features were provided, and you had to keep your fingers crossed to have them working. That's already almost unacceptable. But the big issue was that there was also a lot of regressions, et things that were working were not anymore. It was often corner cases that developers forgot about that stopped working.

Then the project decided to change its policy and started to refuse all patches – new features or bug fix – that would not implement a minimal set of unit tests, proving the patch would work. Quickly, regressions were history, and the number of bugs largely reduced months after months.

Then came the functional tests, with the Tempest project, which runs a test battery on a complete OpenStack deployment.

OpenStack now possesses a complete test infrastructure, with operators hired full-time to maintain them. The developers have to write the test, and the operators maintain an architecture based on Gerrit, Zuul, and Jenkins, which runs the test battery of each project for each patch sent.

Indeed, for each version of a patch sent, a full OpenStack is deployed into a virtual machine, and a battery of thousands of unit and functional tests is run to check that no regressions are possible.

To contribute to OpenStack, you need to know how to write a unit test – the policy on functional tests is laxer. The tools used are standard Python tools, unittest for the framework and tox to run a virtual environment (venv) and run them.

It's also possible to use DevStack to deploy an OpenStack platform on a virtual machine and run functional tests. However, since the project infrastructure also do that when a patch is submitted, it's not mandatory to do that yourself locally.

The tools and tests you write for OpenStack are written in Python, a language which is very popular today. You seem to like it more than you have to, since you wrote a book about it, The Hacker's Guide to Python, that I really enjoyed. Can you explain what brought you to Python, the main strong points you attribute to this language (quickly) and how you went from developer to author?

I stumbled upon Python by chance, around 2005. I don't remember how I hear about it, but I bought a first book to discover it and started toying with that language. At that time, I didn't find any project to contribute to or to start. My first project with Python was rebuildd for Debian in 2007, a bit later.

I like Python for its simplicity, its object orientation rather clean, its easiness to be deployed and its rich open source ecosystem. Once you get the basics, it's very easy to evolve and to use it for anything, because the ecosystem makes it easy to find libraries to solve any kind of problem.

I became an author by chance, writing blog posts from time to time about Python. I finally realized that after a few years studying Python internals (CPython), I learned a lot of things. While writing a post about the differences between method types in Python – which is still one of the most read post on my blog – I realized that a lot of things that seemed obvious to me where not for other developers.

I wrote that initial post after thousands of hours spent doing code reviews on OpenStack. I, therefore, decided to note all the developers pain points and to write a book about that. A compilation of what years of experience taught me and taught to the other developers I decided to interview in the book.

I've been very interested by the publication of your book, for the subject itself, but also the process you chose. You self-published the book, which seems very relevant nowadays. Is that a choice from the start? Did you look for an editor? Can you tell use more about that?

I've been lucky to find out about others self-published authors, such as Nathan Barry – who even wrote a book on that subject, called Authority. That's what convinced me it was possible and gave me hints for that project.

I've started to write in August 2013, and I ran the firs interviews with other developers at that time. I started to write the table of contents and then filled the pages with what I knew and what I wanted to share. I manage to finish the book around January 2014. The proof-reading took more time than I expected, so the book was only released in March 2014. I wrote a complete report on that on my blog, where I explain the full process in detail, from writing to launching.

I did not look for editors though I've been proposed some. The idea of self-publishing really convince me, so I decided to go on my own, and I have no regret. It's true that you have to wear two hats at the same time and handle a lot more things, but with a minimal audience and some help from the Internet, anything's possible!

I've been reached by two editors since then, a Chinese and Korean one. I gave them rights to translate and publish the books in their countries, so you can buy the Chinese and Korean version of the first edition of the book out there.

Seeing how successful it was, I decided to launch a second edition in Mai 2015, and it's likely that a third edition will be released in 2016.

Nowadays, you work for Red Hat, a company that represents the success of using Free Software as a commercial business model. This company fascinates a lot in our community. What can you say about your employer from your point of view?

It only has been a year since I joined Red Hat (when they bought eNovance), so my experience is quite recent.

Though, Red Hat is really a special company on every level. It's hard to see from the outside how open it is, and how it works. It's really close to and it really looks like an open source project. For more details, you should read The Open Organization, a book wrote by Jim Whitehurst (CEO of Red Hat), which he just published. It describes perfectly how Red Hat works. To summarize, meritocracy and the lack of organization in silos is what makes Red Hat a strong organization and puts them as one of the most innovative company.

In the end, I'm lucky enough to be autonomous for the project I work on with my team around OpenStack, and I can spend 100% working upstream and enhance the Python ecosystem.

-1:-- My interview in le Journal du Hacker (Post Julien Danjou)--L0--C0--September 17, 2015 05:15 PM

Tassilo Horn: Improving avy-goto-char-timer

Until recently, the avy command avy-goto-char-timer read one char or two chars if the latter was typed within avy-timeout-seconds.  This command is the one I use most frequently of all avy commands (you can say, it’s basically the only one I use except for avy-goto-line), so I’ve improved it with this commit and this pull request which I guess will be accepted anytime soon.

What these two commits implement:

  1. Now avy-goto-char-timer may read one or as many chars as you want given that the respective next char is typed within avy-timeout-seconds.
  2. DEL deletes the last character from the input, so that you can fix typos easily without having to abort and invoke avy-goto-char-timer once again.
  3. RET immediately stops reading more chars without waiting for another avy-timeout-seconds.
  4. Most importantly: the matches of the current input chars are immediately highlighted to give you direct visual feedback.

Here’s a screencast of the new behavior.


BTW, thanks a lot for camcorder.el, Artur!

UPDATE: The PR has already been merged, so you can now use this feature by updating your avy copy from MELPA.

-1:-- Improving avy-goto-char-timer (Post tsdh)--L0--C0--September 17, 2015 06:25 AM

Eric James Michael Ritz: Recent Emacs Packages as of September 2015

Today I want to talk briefly about some packages for GNU Emacs which I have recently installed and integrated into my daily work-flow. Consider this a series of short mini-reviews.


Eno is conceptually similar to AceJump and avy, in that it allows you to quickly jump to any word, symbol, line, parenthesis, string, and so on. However, it does more than simply move the point within a buffer. For each eno-*-goto command there additional commands to copy, cut, and paste. For example, I could use eno-line-goto followed by C-k to kill a line. Or I could simply use eno-line-cut, which accomplishes the same thing in a single command.

Eno comes with a lot of commands which you must bind yourself. Hydra would be useful for simplifying that process along with making it easier to remember which command you have bound to which key. Personally, however, I use guide-key in conjunction with eno. My long list of bindings for eno looks like this:

(use-package eno
    ("C-s-n a". eno-word-goto)
    ("C-s-n b". eno-word-copy)
    ("C-s-n c". eno-word-cut)
    ("C-s-n d". eno-word-paste)
    ("C-s-n e". eno-symbol-goto)
    ("C-s-n f". eno-symbol-copy)
    ;; 30 lines omitted…

    ("M-s-n q". eno-word-cut-to-inline)
    ("M-s-n r". eno-word-paste-to-inline)
    ("M-s-n s". eno-url-open)
    ("M-s-n t". eno-clear-overlay)))

I haven’t memorized all of those bindings, nor do I intend to. Instead I use guide-key like so:

(use-package guide-key
  (setq guide-key/recursive-key-sequence-flag t)
  (setq guide-key/guide-key-sequence
  (guide-key-mode 1))

Update: Joost recommend in a comment below that I try which-key instead of guide-key. After using which-key for about sixty seconds I decided it was superior to guide-key, and strongly recommend it. Thanks Joost!

This way whenever I press C-s-n or M-s-n I get a nice menu bar on the right side of my screen that shows the rest of the bindings. I recommend eno for quickly navigating and editing ‘things’ simulatenously in a buffer, but I strongly recommend using eno together with a package like guide-key or Hydra or helm-descbinds to help you remember what keys you have bound to the eno commands.


I mentioned avy in the previous section. Like eno it allows you to quickly and easily jump to things within a buffer, like a line, word, character, and so on. When all I want to do is navigate to a specific point I have found avy to be more useful than eno. This is because avy is better when it comes to narrowing down your search. For example, avy-goto-word-1 lets you enter the first character of a word you’re searching for; it will then highlight all words that begining with that character, assigning each a single character you can press to choose the word to which you wish to jump. I find this to be faster, more effective, and straight-up easier to use than the eno’s corresponding eno-goto-word command.

If all you want is fast movement to words, lines, etc., then I recommend avy over eno.


Modalka is ‘Yet Another Package’ which provides modal editing for Emacs. However, what distinguishes Modalka from similar packages is that it gives you fine control over exactly when and where you want to use modal editing. For example, Modalka binds no keys by default. That means it does nothing right out of the box, but the great benefit to that is Modalka allows you to integrate just the right amount of modal functionality you want. Basically it works like this:

  1. Bind a key to modalka-mode or (in my case) modalka-global-mode so that you can toggle modal editing as needed.

  2. Then use functions like modalka-define-kbd to create key-bindings for when you’re doing modal editing.

Here’s an excerpt from my own configuration:

(modalka-define-kbd "a" "C-a")
(modalka-define-kbd "e" "C-e")
(modalka-define-kbd "p" "C-p")
(modalka-define-kbd "n" "C-n")
(modalka-define-kbd "v" "C-v")
(modalka-define-kbd "V" "M-v")
(modalka-define-kbd "w" "C-w")
(modalka-define-kbd "y" "C-y")
(modalka-define-kbd "W" "M-w")
(modalka-define-kbd "Y" "M-y")
(modalka-define-kbd "SPC" "C-SPC")
(modalka-define-kbd "q" "M-q")
(modalka-define-kbd ";" "M-;")
(modalka-define-kbd "/" "C-/")
(modalka-define-kbd "=" "C-=")
(modalka-define-kbd "o" "C-o")
(modalka-define-kbd "x b" "C-x C-b")
(modalka-define-kbd "x f" "C-x C-f")
(modalka-define-kbd "x s" "C-x C-s")
(modalka-define-kbd "x 0" "C-x 0")
(modalka-define-kbd "x 1" "C-x 1")
(modalka-define-kbd "x 2" "C-x 2")
(modalka-define-kbd "x o" "C-x o")

Whenever Modalka is active I can press v and V to scroll up and down as if using C-v and M-v, respectively. And note how I can use two character sequences to x 2 and x o for fast window management.

If you’ve wanted to try modal editing in Emacs but don’t want to use packages that come with pre-defined bindings then Modalka is a terrific way to get your feet wet and ease into modal editing at your own pace.


Nameless hides the package namespace in Emacs Lisp code. Instead of trying to explain it you should just read this great article on nameless by Artur Malabarba.


Finally I want to mention highlight-thing, a minor mode that highlights whatever thing is under the point, where ‘thing’ in this context refers to the builtin thingatpt package. Personally I find highlight-thing useful in programming because if my cursor is over, say, a variable, then it quickly highlights all other uses of that variable throughout the code; you can even restrict the highlighting to the current function if you like. It’s a minor thing, no doubt, but something which I’ve found to help me more easily read the code I work on.

-1:-- Recent Emacs Packages as of September 2015 (Post ericjmritz)--L0--C0--September 16, 2015 02:59 AM

Timo Geusch: Using the Hack 2.0 font in Emacs on OS X

The Hack 2.0 font got a lot of attention recently as a font specifically designed for use with source code. So of course I had to try it out in Emacs. I decided to install the font on my Mac, so I downloaded the TTF version of the font from the link above. Installing a… Read More »

The post Using the Hack 2.0 font in Emacs on OS X appeared first on The Lone C++ Coder's Blog.

-1:-- Using the Hack 2.0 font in Emacs on OS X (Post Timo Geusch)--L0--C0--September 15, 2015 06:20 AM

Ryan Rix: Body Computing System: A Redux, and a Dream

Back before the dawn of mankind, in the month of April, I wrote about my struggles with the body computing system and what I was going to do to build a system that actually worked for me; since then, I've gone back to just using my Thinkpad full time, and carrying it in a backpack with my smallbag.
-1:-- Body Computing System: A Redux, and a Dream (Post)--L0--C0--September 13, 2015 12:00 AM

Ryan Rix: Screencasting FSEM?

More and more, people have been asking me to show more of the setups I've been working on, between FSEM and my Body Computing Systems; With that in mind, would people be interested in weekly screencasts or something? I'd be tempted to start up a Patreon if so.
-1:-- Screencasting FSEM? (Post)--L0--C0--September 13, 2015 12:00 AM

Sebastian Wiesner: Quoting emacs-devel

I just came across this tweet by Artur Malabarba:

The issue of using curly quotes (‘foo’) in docstrings and other places where Emacs has of old used ASCII quotes (`foo'), that is.

I’m furious that they apparently did not seriously consider the use of Taiwanese quotation marks (『foo』)1. In the end, though, the depth and complexity of this matter might just warrant new Unicode codepoints. I propose HALF-NOT-SO-CURLY OPENING EMACS QUOTE and ALMOST BUT NOT QUITE ENTIRELY UNCURLY CLOSING EMACS QUOTE.

I hope that they escalate the matter timely to the Unicode committee, before they add the fourth PhD thesis to the discussion2.

  1. The Wikipedia page on quotation marks makes me sad. Quotation marks are disappointingly standardised. Every language uses more or the less the same. C’mon, is that really all you can offer?

  2. In a related development, I propose “units of PhD thesis” as a new international SI unit for the amount of words wasted in entirely irrelevant nit-picking.

-1:-- Quoting emacs-devel (Post)--L0--C0--September 09, 2015 12:00 AM

sachachua: Emacs Conf video tech notes:,, livestreamer, ffmpeg

Last week’s Emacs Conf was fantastic. There were lots of people at the in-person event in San Francisco, and people could also watch the stream through and ask questions through IRC. There were remote speakers and in-person speakers, and that mix even worked for the impromptu lightning talks sprinkled throughout the day.

This is how the tech worked:

  • Before the conference started, the organizers set up a laptop for streaming on This was hooked up to the main display (a large television with speakers). They also configured the account to record and archive videos. In the free account, recorded videos are available for 14 days.
  • Remote speakers were brought in using the Jitsi open source video conferencing system, using the public servers at This was on the same computer that did the streaming, so people watching the stream could see whatever was shared through Jitsi. Organizers read out questions from the in-person audience and from the IRC channel. The audio from Jitsi wasn’t directly available through, though. Instead, the audio came in as a recording from the laptop’s microphone.
  • Local speakers either used the streaming laptop to go to a specific webpage they wanted to talk about, or joined the Jitsi web conference using Google Chrome or Chromium so that they could share their screen. The organizers muted the second Jitsi client to avoid audio feedback loops.

That worked out really well. There were more than a hundred remote viewers. As one of them, I can definitely rate the experience as surprisingly smooth.

All that’s left now is to figure out how to make a more lasting archive of the Emacs Conf videos. As it turns out, or online tools don’t make it easy to download stream recordings that are longer than three hours. Fortunately, livestreamer can handle the job. Here’s what I did to download the timestream data from one of the recordings of EmacsConf:

livestreamer -o emacsconf-1.ts --hls-segment-threads 4 best
ffmpeg -i emacsconf-1.ts -acodec copy -absf aac_adtstoasc -vcodec copy emacsconf-1.mp4

I normally use Camtasia Studio to edit videos, but for some reason, it kept flaking out on me today. After the umpteenth crash, I decided to keep things simple by using ffmpeg to extract the relevant part of the video. To extract a segment, you can use -ss to specify the start time and t to specify the duration. Here’s a sample command:

ffmpeg -i emacsconf-1.mp4 -ss 1:18:06.11 -t 0:03:32.29 -c:v copy -c:a copy emacsconf-engine-mode.mp4

Your version of ffmpeg might have a -to option, which would let you specify the end time instead of using -t to specify duration.

I’m coordinating with the other organizers to see if there’s a better way to process the videos, so that’s why we haven’t released them publicly yet. (Soon!) It would be nice to improve the audio, especially for some of the talks, and maybe it would be good to add overlays or zoom in as well. The on-site organizers captured backup videos and screen recordings, too, so we might want to edit some of those clips into the streamed recording. One of the organizers has access to better video editing tools, so we’ll try that out.

Anyway, those were the commands that helped me get started with command-line conversion and editing of recorded videos. Hope they come in handy for other people too.

For more info about EmacsConf 2015, check out There’ll probably be an announcement there once the videos are up. =)

Hat tip to Reddit and for tips.

The post Emacs Conf video tech notes:,, livestreamer, ffmpeg appeared first on sacha chua :: living an awesome life.

-1:-- Emacs Conf video tech notes:,, livestreamer, ffmpeg (Post Sacha Chua)--L0--C0--September 06, 2015 12:00 PM

Jorgen Schäfer: Elpy 1.9.0 released

I just released version 1.9.0 of Elpy, the Emacs Python Development Environment. This is a feature release.

Elpy is an Emacs package to bring powerful Python editing to Emacs. It combines a number of other packages, both written in Emacs Lisp as well as Python.

Quick Installation

Evaluate this:

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

Then run M-x package-install RET elpy RET.

Finally, run the following (and add them to your .emacs):


Changes in 1.9.0

  • Elpy now supports the autopep8 library for automatically formatting Python code. All refactoring-related code is now grouped under C-c C-r. Use C-c C-r i to fix up imports using importmagic, C-c C-r p to fix up Python code with autopep8, and C-c C-r r to bring up the old Rope refactoring menu.
  • C-c C-b will now select a region containing surrounding lines of the current indentation or more.
  • C-c C-z in a Python shell will now switch back to the last Python buffer, allowing to use the key to cycle back and forth between the Python buffer and shell.
  • The pattern used for C-c C-s is now customizeable in elpy-rgrep-file-pattern.
  • <C-return> now can be used to send the current statement to the Python shell. Be careful, this can break with nested statements.
  • The Elpy minor mode now also works in modes derived from python-mode, not just in the mode itself.

Thanks to ChillarAnand, raylu and Chedi for their contributions!

-1:-- Elpy 1.9.0 released (Post Jorgen Schäfer ( 03, 2015 07:46 AM

Eric James Michael Ritz: Using Page-Breaks in GNU Emacs

Today I want to talk about the concept of pages in GNU Emacs, how I use them, and why I use them. In my experience pages are often overlooked by Emacs users, most likely because they look ugly, but I will show you a package to deal with that. And along the way I will show you a package that I use to make it easier to navigate between pages.

A Crash Course Introduction to Pages

‘Pages’ in Emacs refers to text separated by the form-feed character, i.e. the ^L character, meaning Ctrl+L. We can type this character by pressing C-q C-l. Using C-q tells Emacs to directly insert whatever key you press next. Normally C-l runs the recenter-top-bottom command. And so we cannot simply type C-l to get the form-feed character. But C-q C-l tells Emacs to ignore any command bound to C-l and thus inserts a literal ^L, the character we need to separate text into pages.

We use C-x [ and C-x ] to move backward and forward through pages, respectively. Those keys, by default, invoke the backward-page and forward-page commands. By pressing C-x C-p we can mark whatever page we are on.

And that’s pretty much it. Later I will come back to talk about some packages to help us navigate pages. But this is all we need to know in order to get started with pages.

Why Use Pages?

I like to use pages, particularly in programming, as a means to divide content into sections. For our game, my studio has recently created the Chance library. The source code has page-breaks dividing each section, although you won’t seem them on GitHub; they will appear as blank lines, e.g. line 228. But in Emacs that page-break line looks like this.

What turns those ugly ^L characters into those pretty horizontal lines? Steve Purcell’s terrific page-break-lines package.

The Chance library uses LDoc for generating its documentation—a form of Javadoc for Lua. In LDoc one can use the @section markup to group the code into related chunks. I have a page-break directly above each comment block that creates a new @section. Doing so divides the source code itself into the same sections by treating each section as a page in Emacs.

The result is that I can easily navigate through the source code per-section by using pages. I could use the aforementioned C-x [ and C-x ] commands for this navigation, but instead….

A Nicer Way to Navigate Pages

I like to use helm-pages to move between pages in a file. When I invoke helm-pages in the Chance source code this is what I see. Since it shows the first line on each page this results in an easy, and in my opinion pretty, way to quickly move between sections of the code base. The test suite for Chance uses page-breaks in the same way, and again helm-pages works well since the first line on each page is a call to describe() which indicates what part of the library that section tests—I use Busted for the unit tests.


A short article, I know, but honestly there’s nothing else to really say. Hopefully this demonstrates how using pages in Emacs can be a useful way to divide-up source code (or any kind of file) and easily navigate to those divisions as needed. If you have never used pages in Emacs then give it a try sometime because, like me, you may find it to be a useful tool for organizing a single file into nice, logical chunks which you can jump between quickly and easily.

Update (15 September 2015): I highly recommend reading info by Artur Balabarba on page-breaks.

-1:-- Using Page-Breaks in GNU Emacs (Post ericjmritz)--L0--C0--August 29, 2015 10:19 PM