Superword- and Subword-Mode in Emacs 24.4

If you like—or are forced to use—camelCaseWords, Emacs has subword-mode that will cause word-based cursor movements to stop at each of the individual words. This can sometimes be useful when you repeatedly need to move to one of the constituent words of a series of compound words.

I rarely have a need to edit camel case words so I never need subword-mode but often have a related problem. In Emacs, when the cursor is in front (or behind) of compound-word or compound_word, moving by word will stop at each constituent word. That’s seldom what you want. You’d like to jump over the whole thing because you’re normally thinking of it as a single word.

As Xah Lee tells us, Emacs 24.4 will have superword-mode that will treat things like compound-word as a single word. That will be handy for programmers who often deal with compound-words or other_compound_words. Lee’s post has the details but notice how the two modes achieve a unification: with subword-mode you always move by word constituents; with superword-mode you always move by the entire compound word, no matter how it’s formed. That’s why the two modes are mutually exclusive.

Posted in General | Tagged | 2 Comments

Writing Books with Org Mode

Oscar Perpiñán Lamigueiro is writing a book. Lots of people do that, of course, but Lamigueiro is doing it with Org Mode. Just the other day, I wrote that Emacs is multifaceted and Lamigueiro demonstrates another of those facets and a pretty high powered one at that.

If you’ve wondered how one might go about producing camera ready copy for a technical book, give Lamigueiro’s post a read. You should also take a look at the Memoir Class documentation that he mentions in the post. I don’t know about you but I love reading things like this. It’s always great to see how people are using Emacs, especially if it’s in ways I haven’t thought of.

Posted in General | Tagged , | Leave a comment

Why Use Org Mode?

Regular Irreal readers know that I’m always talking up Org Mode and urging people to try it out. Many Org Mode users say they switched to Emacs just to get Org Mode. One of the things about Org Mode is that it has so many facets different folks can use it for non-overlapping purposes. I use it to manage my agenda, organize various projects, and for writing and posting my blog posts.

Gregor Riegler has his own answer to the question of what is Org Mode’s killer app? You’ll have to read his post to find out what that answer is but suffice to say, it allows him to replace 20 other apps with Org Mode.

So run on over to Riegler’s blog and read yet another reason you should be using Org Mode. If you’re already using Emacs you really have no excuse not to try it out. If you’re not already using Emacs, Org Mode might give you just the nudge you need.

Posted in General | Tagged , | 1 Comment

Git Flow

Recently I’ve seen a lot of articles about git-flow but it was sort of hard to understand exactly how to integrate into your work flow. Happily Kevin Basarab has come to the rescue with a video that shows you how to use git-flow in a typical development environment. As Basarab says, git-flow just automates certain sequences of standard git commands so you could do everything it does “by hand” but git-flow makes it easy and prevents the errors that always seem to occur when performing a fiddly sequence of commands.

The video uses the command line for all it’s demonstrations but there is a magit interface. Sadly, it doesn’t seem to have been integrated into the magit release yet. I think developers will find git-flow so useful that it will be integrated into magit soon.

The video is about 31 minutes so you’ll need to set aside a bit of time but it’s well worth the half hour.

Posted in Programming | Tagged , | Leave a comment

The Wages of Sin

The U.S. Government in the guise of the NSA believed that they were beyond reproach for their spying on innocent citizens all over the world. Everyone expects governments to spy on their enemies and perhaps on the government of even their allies. Spying on random citizens, domestic and foreign, is beyond the pale and everyone but the NSA and its apologists know this.

It turns out that there is a price to be paid. The European Union is expressing its disapproval in a dramatic and unmistakable fashion. They are threatening to suspend TTIP negotiations, something dear to the those lobbying—and donating to—the government for stronger copyright protections.

They are also calling for an end to the safe harbor provisions of data transferred to U.S. corporations and the termination of the SWIFT program that helps track bank transactions. In addition, the EU is calling for an EU only Internet structure to help keep the NSA out.

The NSA, of course, cares about none of this. They’ll just keep on doing what they’re doing. But the tech community in the U.S. is already feeling the blowback from these programs and will be sure to make their displeasure known to the government. The government can and will ignore this in the short term, but at the end of the day there’s too much money and influence from the business community to ignore. When that day comes, I hope those who believe in their impunity are called to answer for their actions.

Posted in General | Tagged | Leave a comment

All Those Pesky Commas

Posted in Programming | Tagged | Leave a comment

Some Useful Emacs Packages

Torstein Johansen has a nice post on useful Emacs packages. As it happens, I use all of those packages except auto-complete so I’m certainly in agreement with his list. The post includes animated gifs so you can see the packages in action.

His list is mostly concerned with ways to speed up【Meta+x】 and with word completion. If you aren’t using these packages, you aren’t getting the most performance out of Emacs. But what about auto-complete? I haven’t run across it before but I’m going to give it a try. Why not? The rest of those packages are very useful and I wouldn’t want to live without them.

Posted in General | Tagged | 5 Comments

Configuring Emacs as a C/C++ IDE

Baris Yuksel has a nice set of videos (Part 1, Part 2) that show you how to configure Emacs to be a reasonable IDE for C and C++. In the first video Yuksel talks about auto-complete, auto-complete-c-headers, and yasnippet. Adding these three packages allow a programmer to autocomplete many of the common C/C++ objects.

The second video discusses iedit, flymake-google-cpplint, google-c-style, and flymake-cursor-mode. Together with the packages from the first video, they make a very nice C/C++ environment. The flymake-google-cpplint and google-c-style packages help enforce Google coding standards. You may or may not subscribe to Google’s standards but there are also generic C++ checkers as well as checkers for many other languages. The flymake-cursor-mode puts a message in the minibuffer telling you what error the other flymake packages are complaining about for the line at the cursor.

Finally, iedit is sort of like Magnor Sveen’s multiple cursors. If you’re already using multiple cursors, you probably don’t need it.

Together the two videos are less than 15 minutes so it’s easy to fit them into your schedule. If you’re hacking C or C++ in Emacs, you should give them a look.

Posted in Programming | Tagged | Leave a comment

Senator Feinstein in High Dudgeon

I know I mentioned it before, but this is just too hilarious to let pass unremarked. Senator Dianne Feinstein who has consistently dismissed objections to our government spying on its citizens is up in arms about the Government spying on Senate Intelligence Committee staffers. What’s particularly amusing is that she uses the same words that those of us upset about NSA spying used. Somehow, when her ox is getting gored it’s a serious Fourth Amendment issue that needs to be referred to the Justice Department.

I sympathize with Feinstein. It is outrageous and does need to be stopped just as the spying on ordinary citizens does. One would hope that Feinstein will have second thoughts about her support of these programs but of course she won’t. She’ll just make sure that they aren’t used against her and then go right on explaining how if we don’t have anything to hide we shouldn’t be concerned. It’s no wonder that the favorability rating of Congress is at a record low.

Update:
Adding to the hilarity, Sen. Feinstein is particularly upset that the CIA accused her staff of removing classified documents from the secure facility in which the staff works. This after screaming for Edward Snowden’s blood. You can’t make this stuff up.

Posted in General | Tagged | Leave a comment

The Security of the Apple Keychain

TidBITS has a great post on how Apple secures the iCloud keychain. An Apple device will remember passwords to sites you visit, WiFi nodes you join, and many other things. If you don’t do anything special, these credentials will be stored only on your local device. But it is also possible to sync them across all you Apple devices or even back them up on iCloud.

If you’re like me, you’re paranoid about this. Why would you ever trust the crown jewels to a third party? As the TidBITS article makes clear, Apple has gone to great lengths to ensure that trusting Apple with your passwords is, in fact, safe. If Apple is doing what they claim—and as TidBITS points out they’d face serious legal liabilities otherwise—then it appears that it actually is safe to trust your credentials to them. Read the article and see if you don’t agree.

The article even tells you how to make your keychain safe from government snooping. If you believe your end device is secure, then you can probably depend on Apple to keep your passwords safe. If, like most people, you’re off the NSA radar, then your concern is a criminal getting your credentials. Absent physical access to your device, Apple’s security should keep you safe. They’ve done a really good job securing your information and even, if you don’t think they’re in cahoots with the NSA, keeping it safe from government snooping.

Not all Irreal readers are Apple users, of course, but if you are you’ll want to read this article. Whatever you think of Apple, they seem to have this particular area under control. Again, read the article and see if you don’t agree.

Posted in General | Tagged | Leave a comment