Keyboard Macros: A Reason to Use Emacs

Bill over at ATMakers has a short video on Why I Use Emacs. He’s a long term user and the reasons are many, he says, but the video is just one example showing how Emacs can make repetitive tasks easier.

The problem is that he has a list of two columns that he wants to mark up with HTML. The video shows how to do this using keyboard macros. It’s a natural solution and the video shows how easy it is. To be sure, it’s an elementary application of keyboard macros so the video is most suited for someone asking “Why do you use Emacs?” Still, even more experienced folks may enjoy it.

The video is only 6 minutes and 15 seconds so it should be easy to find time to view it if you’re interested.

Posted in General | Tagged | Leave a comment

Solving 10 Common Git Problems

Michael Kohl has a post on 10 Common Git Problems and How to Fix Them that new or casual Git users may find useful. There’s a lot of useful information in the post so it’s definitely worth reading.

Unfortunately, for technical reasons all his examples are links to gists. Each example is typically 2 or 3 lines so it would have been easy to just to copy and paste them directly into the post. But that’s just a nit. Unless you’re a seasoned Git user, you’re apt to learn something from the posts even if you have to follow links to see the examples.

Posted in General | Tagged , | Leave a comment

Using Emacs at School

Over at the Emacs reddit, shackra asks if people use or used Emacs at school. By “school” he appears to mean “at college or university” so this isn’t about whether we should teach 8th graders to use Emacs. So far, there have been only a few (eight as of this writing) answers but the discussion is already interesting.

The thing that struck (and delighted) me the most was that all but one of the commenters were from disciplines other than computer science. The one developer was Mickey from Matering Emacs so, of course, his answer is interesting too. There was also a physics major and a civil engineer representing the technical fields.

The other respondents were from History and English. It’s not news that people from the liberal arts use Emacs too, of course, but even though I know better I’m always surprised. Of course, I shouldn’t be. Folks in fields like English and History do a lot of writing and probably wrangle just as much or more text than we engineers do. Why wouldn’t they want to use the best possible tool to do that? There are plenty of people in those fields—just as there are in ours—who are too lazy or unconscious of the possibilities to look beyond the default answer of Microsoft Word but the wiser of them invest a bit of their time in learning a tool that will pay dividends throughout their career rather than frustrate them at every turn.

The nice thing about using a tool like Emacs is that although the gatekeepers at journals and professional organizations insist of Word documents, you can still use a decent editor and export to the desired format with Pandoc. Of course Pandoc doesn’t convert between every possible format but it does accept Org Markup, Markdown, and LaTeX and will happily output docx formatted documents, which is probably the only target that non-STEM people need to worry about.

So the answer to shackra’s question is: Yes, Emacs is used by people at school all the time and some of their uses may surprise you.

Posted in General | Tagged | Leave a comment

Diceware Video

The idea of choosing a list of common words as a password is fairly common and can lead to very secure passwords if the selection process is done randomly. The idea entered popular culture with the famous XKCD correct horse battery staple cartoon but is really much older. One of the first systematic ways of choosing the words is Diceware, a method that uses a die and a list of 1776 words. Each word takes 5 rolls of the die (or a single roll of 5 dice) but even a 5 or 6 word password can be chosen reasonably quickly.

I’ve written about Diceware many times in the past and have even provided two computer implementations, one in C and another in Lisp. Both use cryptographically secure random number generation and should be at least as secure as rolling a die.

Over at <Computerphile>, Mike Pound has a video that explains and demonstrates Diceware. He shows how a password is picked and explains why the result is secure. That security remains intact even if an attacker knows you are using a Diceware-like scheme and has a list of the candidate words.

The video is just short of 11 minutes so you’ll probably have to schedule some time or fit it into a coffee break.

Posted in General | Tagged | Leave a comment

Now: Open Offices; Next: No Offices

Over at Second Nexus there’s an article that discusses the Harvard Study on open office spaces that I wrote about previously. If you missed that post, the TL;DR is that the study showed that far from improving collaboration, open offices actually decrease employee communication and effectiveness. The Second Nexus article covers those details and further notes that besides being significantly cheaper, open offices also enable continuous surveillance of employees. It’s no wonder management loves them.

The most interesting part of the piece, though, is their judgment of what’s coming next. They believe that the open spaces are merely a transition phase until offices all but disappear. Some employers are already trying to “bring nature into the workplace” but that’s expensive and out of the reach of most employers. Rather, the authors believe that virtually everyone will become a digital nomad. You should read the article for the details.

Doing away with offices seems attractive to me and even employers should like it because it will be even cheaper than open spaces. Of course, that will make employee surveillance much harder but aside from those addicted to micromanagement, ROWE should prove to be a better alternative.

There’s been a spate of articles on open offices lately and they all make the point that they’re not delivering their promised benefits. Those who suffer in the environment can only hope that those articles presage the end of this deplorable trend.

Posted in General | Tagged | Leave a comment

A GTD Workflow with Emacs and Org Mode

I’ve never bought in to the GTD (Getting Things Done) movement although my own system of scheduling, tracking, and recording tasks probably has a lot in common with the methodology. One often sees the claim that Org mode makes an ideal GTD platform and it’s easy to see why that would be true. Lots of people use it for that (and only that) purpose.

Michael Fogelman does like the GTD paradigm and has produced a video on how he uses Emacs, Org mode, and Google Calendar to plan his day and keep track of his progress on tasks. If you don’t mind using Google Calendar, you might find his workflow attractive.

Even if you aren’t a Gcal user, you can still adapt his workflow to whatever you do use. For example, his exact process could be used with the Apple calendar app with a different plugin to move entries between the agenda and the calendar.

If you enjoy seeing other people’s workflows or you’re looking for some ideas for your own, you might find Fogelman’s video useful. The video is 13 minutes, 19 seconds long so you might have to schedule it for some free time. If you’re using a system like Fogelman’s, that should be easy.

Posted in General | Tagged , | Leave a comment

When Advertising Is Not Advertising

Nicholas Rempel has an excellent rant on what passes for advertising these days with the post What We Have Now Is Not Advertising. His thesis is that while things like billboards, TV ads, and magazine ads are advertising, much of what is called advertising today is just spying and tracking in the service of showing targeted ads to people. This is, of course, what adtech is all about: vacuuming up as much information about users as possible so that they can be served targeted ads. Even leaving aside the seedier aspects of the whole enterprise—such as providing a platform for malware and other illegal activities—building huge databases of information about a significant portion of the population should give anyone pause.

As creepy as that collection is, what’s worse is that sooner or later the information will prove to be too tempting to the usual suspects and the iron law of data collection assures us that it will be abused. It wouldn’t surprise me in the least if the government is already subpoenaing information from the data brokers who collect it.

Rempel has some suggestions:

  • Get off social media as much as you can. Facebook and the like exist solely to collect your private information. Twitter is a giant time-sink that has been taken over by trolls and ideologues. You’ll be much happier and safer without them.
  • Be aggressive about blocking ads. The advertisers will try to guilt you and say it’s stealing. Tell them to get back to you when they clean up their own act. As I’ve said many times, I don’t object to ads and will happily allow them but I won’t tolerate being tracked or having arbitrary scripts run on my machines.
  • Be careful about “smart devices” you allow in your home. Don’t install anything that’s going to collect information. And for goodness sake, stay away from things like Alexa and Google home.

Rempel’s post is short and worth reading. It should remind us, once again, that the perpetrators of adtech are not our friends, their “services” are for their benefit, not ours and they should be resisted by any means possible.

Posted in General | Tagged , | Leave a comment

Eshell Aliases

I try to use Eshell for all my shell work. I’m not 100% successful but I mostly am so Eshell is an important part of my workflow. One of the things that makes using Eshell easier is aliases, just as it is in, say, a Bash shell. The thing is, I can never remember how to get them set up.

That turns out to be pretty simple. Marcin Borkowski (mbork) has a short post that makes me wonder why I even had a problem with it. It’s as simple as set it and forget it. Once you set an alias, Emacs will remember it for you. There’s a slight syntax variation between the Eshell alias command and the familiar Bash variant but once you’re aware of that, everything else is simple. Simpler, really, than in Bash where you have to set the aliases in a configuration file.

If you’re an Eshell user, be sure to take a look at mbork’s post. It really can make your life easier.

Posted in General | Tagged | Leave a comment

Multiple Mu4e Signature Blocks

Rob Stewart has a blog post that serves as a handy tip on implementing multiple signatures in Mu4e. For those who don’t know, Mu4e is an email client that runs inside Emacs. I use it and love it. It helps keep me inside Emacs almost all the time I’m not otherwise engaged in the browser.

The problem the post addresses is how to have one (informal) email signature block for friends and another (formal) one for more professional occasions. Follow the link and you’ll see that the problem is solved with just a tiny bit of Elisp. The code is easily expandable to have more than two signatures if you need them.

I love tips like this. They show how easy it is to make Emacs exactly the editor you want, usually with very little effort.

Posted in General | Tagged , | Leave a comment

Aggregate Tables

Thierry Banel and Michael Brand have a really nifty package, orgaggregate, for those who work with data and want to produce a summary or aggregate table from their primary table.

Here’s a simple example from their GitHub repository:

#+NAME: original
| Day       | Color | Level | Quantity |
|-----------+-------+-------+----------|
| Monday    | Red   |    30 |       11 |
| Monday    | Blue  |    25 |        3 |
| Tuesday   | Red   |    51 |       12 |
| Tuesday   | Red   |    45 |       15 |
| Tuesday   | Blue  |    33 |       18 |
| Wednesday | Red   |    27 |       23 |
| Wednesday | Blue  |    12 |       16 |
| Wednesday | Blue  |    15 |       15 |
| Thursday  | Red   |    39 |       24 |
| Thursday  | Red   |    41 |       29 |
| Thursday  | Red   |    49 |       30 |
| Friday    | Blue  |     7 |        5 |
| Friday    | Blue  |     6 |        8 |
| Friday    | Blue  |    11 |        9 |

#+BEGIN: aggregate :table "original" :cols "Color count()"
| Color | count() |
|-------+---------|
| Red   |       7 |
| Blue  |       7 |
#+END:

The second table produces a summary of the number of each color that appears in the primary table.

This is only the beginning. The package is quite powerful and can use just about any Emacs Calc function to calculate the summary. To really appreciate what you can do with the package, you should look through the README at the repository. It has many more examples that show the types of things that you can do with orgaggregate.

I just stumbled across a reference to this package so I haven’t yet had a chance to use it but I’ll be giving it a try the first time an opportunity presents itself.

Posted in General | Tagged , | Leave a comment