Gnus on Windows

As most Emacers know, two of the most difficult things involving Emacs are

  1. Getting it to work well on Windows, and
  2. Configuring and using Gnus.

So, of course, Sacha Chua decided to do both at the same time.

In the above post, Chua goes through the configuration she used to get it all working. Since she keeps her Emacs configuration as an Org file, she just cut the Gnus part right out of the configuration file and pasted it into her post. Yet another benefit of keeping your configuration as an Org file.

If you're working on Windows and want to try out Gnus, take a look at Chua's post. She uses Gmail so you can also see how to get that working with Gnus. Like all of her posts, there's a lot of meat in it so it's worth taking a look even if you aren't interested in Gnus at the moment.


Posted in General | Tagged | 2 Comments

Asynchronous Python in Org Mode

John Kitchin is so busy turning out little Emacs jewels it's a wonder he has any time to do Chemical Engineering. Of course, most of those jewels are in the service of solving problems with his research and his latest is no different. The problem is he has some long running Python is an Org file and would like to continue his work in the file while it's running.

He has a post and a video that detail his solutions. That's plural because he provides three ways of doing it. The first two involve tangling the source out to a temporary file, calling Python, and capturing the result. His final and preferred method avoids the tangling to a temporary file and lets you see the results as they are generated instead of all at once at the end.

You may or may not have a need for asynchronous Babel code but like all of Kitchin's work, you're sure to learn a bit from seeing how he approaches and solves the problem. The video is just short of 9 minutes so it should be easy to schedule. I recommend watching the video first and then using the post to study the code at a more leisurely pace.

Posted in General | Tagged , | Leave a comment

Chris Wellons on Emacs and RSA

Chris Wellons likes to make Emacs do unexpected things (see 1, 2, and 3 for instance). His latest example is an implementation of the RSA public key algorithm in Emacs Calc.

It's only a toy implementation, of course, but the wonder is that you can do it at all in an editor. Of course if your editor is named something besides Emacs, you can't but, as I've said many times before, Emacs is more of a Lisp environment with a library optimized for text editing. That still wouldn't be enough because Emacs Lisp doesn't have a full numeric tower. In particular, it doesn't implement large integers.

Fortunately, Elisp is powerful enough to support the Calc library, which does support large integers. I've written about the wonders of Calc before and use it pretty much every day. What Wellons demonstrates is how to use the Calc functionality programmatically. You probably won't have a need for an Emacs implementation of RSA but if you want to make use of the Calc functionality in your own Elisp code, Wellons' post has a lot to teach you.

Posted in General | Tagged , | Leave a comment

Moving Through Edits

Ben Maughan over at Pragmatic Emacs points to a useful package that lets you move back and forwards through editing changes. It's implemented in the Goto Chg package. The easiest way of thinking about it is that it behaves like undo/redo without actually making any changes. It merely goes to the place where the change would be made.

That may not seem to useful at first blush but, in fact, I often find myself wanting to do just that. Sometimes it's just that the buffer is dirty but I don't remember making a change and this package makes it easy to see what that last change is. Of course, undo followed by redo does the same thing but it doesn't allow you to easily scroll back and forth among all the changes.

The goto-chg package is available on Melpa and Marmalade.

Posted in General | Tagged | Leave a comment

John Wiegley on Haskell

Almost every serious Emacser knows by now that John Wiegley has taken over as the Emacs maintainer. Everyone appears united in their belief that this is a good thing and that Wiegley will be a great maintainer.

As you'd expect, Wiegley is an Emacs Lisp export (see this video with Sacha on Elisp development, for example). What you might not be aware of is that Wiegley works primarily in Haskell. There's a wonderful video of Wiegley discussing the benefits of Haskell and his experience with it. He says that the big strength of Haskell is that it's hard to write incorrect code that compiles. If you can get the compiler to accept your code then it will likely work as intended.

Haskell isn't a silver bullet, of course, but according to Wiegley, it does make it easier to write good code. The video is 26 and a half minutes long but worth watching, especially if you're considering trying out the language. After watching the video, I'm considering trying it out myself. There are a number of open source compilers available. The Glascow Haskell Compiler appears to be the favorite but there are others.

Posted in Programming | Tagged | 1 Comment

PDF Tools for Emacs

Over at Thoughts on Code and History, Matt Price has a nice post on Note Taking with PDF Tools and Emacs. PDF Tools is a replacement for DocView but with extended capabilities. Rather than build the PDF image in the file systems, as DocView does, PDF Tools builds it in memory and then allows you to interact with the PDF in various way.

You can get an idea of some of it's capabilities from Price's post and from the PDF README at GitHub. There's also a video that gives an idea of some of it's capabilities.

Sadly for those of us in the Cult, PDF Tools is supported only on Linux systems but the README does say that it has been successfully compiled under OS X. The README gives a couple of hints on how to do this. A Stack Exchange question indicates that it's pretty easy to compile and use under OS X so if you're interested it may be worthwhile giving it a try.

I haven't used it yet but will probably try to install it shortly. I don't use Homebrew—the recommended way of installing the tools—so I'll either have to try compiling it by hand or install Homebrew. If anyone has installed it by hand, drop a comment and let me know of any problems or, better yet, lack of any problems.

Posted in General | Tagged , | 1 Comment

Capture Web Pages as an Org Structure

The other day, I wrote about using lynx to capture a Web page as text. Later, No Thanks had another, better, suggestion

This bit of Elisp leverages org-protocol to capture a Web page and insert it into an Emacs buffer as an Org structure.

This is, I think, a specialized use case but if it's something you need to do, this could be a real time saver.

Posted in General | Tagged , | Leave a comment

Who Could Have Imagined...

this would happen?

Posted in General | Tagged | Leave a comment

The Publishing Workflow for ProGit v.2

As most of you know, I'm fascinated by publishing workflows. These days, my preferred scheme is write in Emacs/Org-mode and export to whatever final format I need. This strikes me as ideal.

Not everyone agrees, of course. Scott Chacon, one of the original GitHub developers and coauthor of Pro Git v. 2 has a different workflow. Unsurprisingly, he uses the Atom editor so he doesn't write in Org markup. Instead, he uses Asciidoc, which is similar to Org but independent of any editor. Of course, these are just details. What makes his workflow different is how he leverages GitHub and the O'Reilly Atlas publishing toolchain.

Most of us won't have access to Atlas but we can all use GitHub and leverage the methods that Chacon describes for collaboration and working with technical editors. I've written before about working as a technical editor and dealing with Word documents. I would much rather use the methods Chacon describes.

If you're planning on writing a book—especially with one or more collaborators—be sure to check out Chacon's post. He's got a lot of good ideas. His workflow could easily be adjusted to work with Emacs and Org.

Posted in General | Tagged | Leave a comment

Org Ellipsis

It's a bit silly, I suppose, but I really like this. It really does make things less cluttered.

Posted in General | Tagged , | Leave a comment