I’ve reached a very nice resting point in the ongoing effort to develop a very useful, powerful, stable, and cool computer setup.
This started a while back when I built a computer. In particular, this computer. There are several advantages to building a computer. You can save money or get more bang for your buck even if you don’t pay less. On the saving money side, maybe you have components on hand that you don’t have to buy. I did, mainly mass storage. The case I had, thinking I’d save money there, ended up not working out. You get more bang for the buck because the parts you buy will be better than the ones in the equivilant off the line but cheaper computer, and you’ll have more control over what happens in future upgrades. Continue reading A really good computer setup→
When I first became a regular user of Linux, several years ago, I tried out different text editors and quickly discovered that emacs was my best choice. By coincidence, about that time I ran into an old emacs manual written by Richard Stallman in the dollar section of a used booksore. In that edition, near the end of the book, was a section on “Mail Amusements.” This documented the command “M-x spook” which adds “a line of randomly chosen keywords to an outgoing mail message. The keywords are chosen from a list of words that suggest you are discussing something subversive.” (I note that the term “spook” in those days meant “spy.”) Stallman notes in the current edition of the manual,
The idea behind this feature is the suspicion that the NSA and other intelligence agencies snoop on all electronic mail messages that contain keywords suggesting they might find them interesting. (The agencies say that they don’t, but that’s what they would say.) The idea is that if lots of people add suspicious words to their messages, the agencies will get so busy with spurious input that they will have to give up reading it all. Whether or not this is true, it at least amuses some people.
It is amazing to see how things change over time. But this, unfortunately, is not a good example of change over time. As I’m sure every Linux user knows by now, the National Security Agency has included “Linux Journal” (the journal and the site, apparently) as an indicator for potential extremist activity. If you subscribe to the journal, visit the site, mention it in an email, or anything like that, your internet traffic will be subject to additional special attention.
Apparently the NSA captures all, or very nearly all, of the Internet traffic for just long enough to sort through it for key indicators, which they use to pull out a subset of traffic for longer term storage and possible investigation. If you visit Linux Journal’s web site, your internet traffic, apparently, is subject to this treatment.
Well, this should be obvious. Linux users are extreme. Linux is extreme. If I was the NSA I’d be keeping a close eye on the Linux community because that is where a major national intelligence agency is most likely to find useful, and extremely good, security related ideas. GNU/Linux, FOSS, OpenSource – these are all keywords I’d be watching because this is where the cutting edge is. LAMP systems are the most secure servers used on the Internet, by and large. Linux-like operating systems are the preferred systems for devices that need both reliability and security. I’m sure the NSA itself uses Linux as its primary operating system because it is the most adaptable and secure one they can get. If not, they probably use a cousin or hybrid of some sort.
Also, penguins. Penguins are known to be extreme. They wear tuxedos, who does that anymore? They live on the Antarctic Continent. I can’t think of anything more extreme than this. The adoption of Tux the Penguin as the symbolic mascot of GNU/Linux is a huge red flag for the entire intelligence community.
I do find it amusing that people are a bit up in arms over this. Did anyone ever seriously consider the idea that the Linux community and their Penguin friends would not be the subject of special NSA attention? It would be rather disappointing were it not. Stallman added M-x spook to emacs decades ago. We’ve known for years that the NSA snoops on everything and everyone. Linux is a widely used extremely important operating system. Linux Journal is a key publication used by a wide range of Linux extremists, er, users and developers. Of course the NSA is watching.
Kyle Rankin at Linux Journal who is a known Linux user notes that there is a more specific reason the NSA would view the Linux community as a hotbed of potential extremism. This is where things like Tor and Tails exist as projects and are mostly used. These are, of course, technologies to be more anonymous on the internet. Tor comes form a project originally funded by the US Naval Research Laboratory and DARPA with early work on it supported by the radical Electronic Frontier Foundation. It has also been funded by the US State Department and the National Science Foundation. The original idea was to allow communications over the internet to be untraceable so sailors (or others) could write home and keep their lips tight (loose lips sink ships and all that). With subversive beginnings and evil intent such as this, naturally the NSA would want to keep an eye on it.
I’m sorry to tell that if you’ve been reading this blog post you are probably on the NSA list of extremists. I use the terms “Linux Journal,” “Linux,” and “Penguin” several times in this blog post. And you are looking at this blog post in your browser. You are so screwed.
I would like to challenge the OpenSource/FOSS/GNU/Linux community to take up Stallman’s initiative and bring it to the next level. Let us M-x spook the spooks. Apps, browser add-ins, cron scripts, and other small scale technologies could be used to add subversive terms such as Linux Journal and Penguin to all of our Internet traffic, all the time. The NSA would quickly run out of disk space and someone would tell them to get back to work and do something useful. Real extremists just made a radical extremist Caliphate in the Middle East forchristakes. I would think the NSA would be more focused on such things than on Linux Journal, or Linux. I can see keeping an eye on the Penguins, though.
UPDATE: Charles Johnson send me THIS and THIS. This whole thing could be fake. Go have a look and tell me what you think.
Or, at least, I’m surprised that this earlier implemented solution has not been mentioned in all the discussion about NSA spying.
Richard Stallman invented an approach to obviating the NSA’s attempts to spy on email. He included it in emacs, the world’s greatest text editor. Here how it works, from the manual. The “M” is the “alt” key (for all practical purposes) and “M-x followed by a word implements the command attached to that word.
32.6 Mail Amusements
M-x spook adds a line of randomly chosen keywords to an outgoing mail message. The keywords are chosen from a list of words that suggest you are discussing something subversive.
The idea behind this feature is the suspicion that the NSA1 and other intelligence agencies snoop on all electronic mail messages that contain keywords suggesting they might find them interesting. (The agencies say that they don’t, but that’s what they would say.) The idea is that if lots of people add suspicious words to their messages, the agencies will get so busy with spurious input that they will have to give up reading it all. Whether or not this is true, it at least amuses some people.
You can use the fortune program to put a “fortune cookie” message into outgoing mail. To do this, add fortune-to-signature to mail-setup-hook:
(add-hook ‘mail-setup-hook ‘fortune-to-signature)
You will probably need to set the variable fortune-file before using this.
 The US National Security Agency.
That is from the current, on-line emacs manual but it also appears in my hard copy of the manual which I believe dates to the last quarter of the 20th century.
I just reconfigured my laptop with a new system (a form of Linux) and, almost as important, a new power brick. That second item may be more interesting than it sounds for some of you; I’ll write that up later. This change also meant trashing my emacs configuration file. I didn’t have to trash it, of course, but it made sense to do so. I don’t use my laptop in any way that requires that I pay attention to data saved on it. It is a data-free appliance. Sort of. Or, at least, if I took the hard drive out of it and put it in a blender, I would not lose anything important other than a blender which would surely break. In order to achieve this state, I manage certain data not by backing it up but by ignoring it. If I toss the hard drive and put in a new one and install a new system, my emacs configuration file(s) can be gotten off of another computer. Or, preferably, just recreated from scratch.
Why would I want to recreate my emacs configuration files from scratch? Because a) it is fun and b) with the newest version of emacs, a number of things that required excessive messing around with before have become normal. Thus, the configuration files are less cumbersome and easier to manage.
In case you are still reading this post about emacs (good for you!) but don’t know much about it let me explain a few things. If you are already an emacs expert, you may want to skip down to my .emacs file and get right into ridiculing it.
emacs is the best text editor in the world for a number of reasons, but mainly because pretty nearly everything is configurable, and it is very cleanly associated with a very powerful programming language that you can write programs in to make your emacs text editor do amazing things like manage your email, carry out sophisticated statistical analyses on data, make coffee, or stand in for an operating system. Or, you can do like I do; find where other people have written these things and graciously made them available for others to use.
But emacs also suffers from a logical conundrum I call The emacs Paradox. Here is how it goes:
emacs is wonderful because you can configure it any way you want.
emacs keybindings (what happens when you press certain keys) are the most efficient possible therefore you must not change emacs keybindings.
We know this is an interesting paradox because right after hearing all about how emacs keybindings are wonderful, the first thing you will be told to do if you read the introductory material on emacs is to swap the caps lock and control keys, and the second thing you will be told to do is to replace the alt key with any one of a number of alternatives “so you won’t have to squish up your fingers” while executing “meta” commands. This duality (’emacs is perfect ’emacs is flawed) is part of what makes emacs a religion.
That’s the guy who invented emacs.
OK, back to the point. emacs out off the box is probably pefect for some people. emacs with two or three hundred lines of elisp code in various files, some compiled, is perfect for others. But I use emacs to write, not program, so my needs are met by the out of the box version with a hadnful of changes.
My emacs file is below, and it is annotated to make it clear what each step does. This is all hand-codedd. Many of these changes can be made by selecting configuration options from the emacs menu.
Included in the file are a few comments of possible additional changes I may or may not make. I’m agnostic as to whether these changes are worthwhile; I go back and forth. The comments are in there as reminders.
The file is called .emacs and resides in the home directory on a Linux computer with all the other “dot” files, which are by default hidden from view in many file managers (unless you specify otherwise).
And here is mine (UPDATED to make CUA work better within emacs and between apps:
; This is a text editing-focused .emacs file
; a ";" means "comment" if it is in the first position
;---Reload the .emacs file after messing with with alt-x reload-dotemacs
"Reload .emacs file"
; do not display the annoying startup screen
(setq inhibit-splash-screen t)
; get rid of annoying box cursor
; replace it with a nice bar cursor
(set-default 'cursor-type 'bar)
; type face size needs to be bigger on this laptop
; number (190)/10 = point size
(set-face-attribute 'default nil :height 190)
; scroll bar on right where all other scroll bars
; in the universe ever are
; make Visual Line Mode work in text mode all the time
; (this means, make the text wrap as in a normal
; text editor)
(setq text-mode t)
; Make sure ctrl-a selects all
(global-set-key (kbd "C-a") 'mark-whole-buffer)
; turn automatic spell checking on more or less universally
(defun turn-spell-checking-on ()
"Turn flyspell-mode on."
(add-hook 'text-mode-hook 'turn-spell-checking-on)
; turn on "CUA mode" ... so control -c, -v, -x, -z and
; a few other things work as they do in virtually all
; other software ever
(setq cua-auto-tabify-rectangles nil) ;; Don't tabify after rectangle commands
(transient-mark-mode 1) ;; No region when it is not highlighted
(setq cua-keep-region-after-copy t) ;; Standard Windows behaviour
; Make the keys work even if CUA does not:
(global-set-key (kbd "C-c") 'copy)
(global-set-key (kbd "C-v") 'paste)
; Make emacs use the system clipboard even if CUA does not:
(setq x-select-enable-clipboard t)
; add later some minor modes for certain kinds of files
; add later some handy markdown and html macros and functions
; make ctrl f cause forward "search"
(global-set-key (kbd "C-f") 'isearch-forward)
; make ctrl s save the current document
(global-set-key (kbd "C-s") 'save-buffer)
; some other time make the escape key stop commands in process
; Don't make the files with the #'s in the names
; a default emacs behavior we don't want
(setq auto-save-default nil) ; stop creating those #auto-save# files
; make a hidden backup to a directory mirroring the full path
; of files edited
(defun my-backup-file-name (fpath)
"Return a new file path of a given file path.
If the new path's directories does not exist, create them."
(filePath (replace-regexp-in-string "[A-Za-z]:" "" fpath )) ; remove Windows driver letter in path, e.g. “C:”
(backupFilePath (replace-regexp-in-string "//" "/" (concat backupRootDir filePath "~") ))
(make-directory (file-name-directory backupFilePath) (file-name-directory backupFilePath))
(setq make-backup-file-name-function 'my-backup-file-name)
; make the titlebar (window frame top) show the name of the file in the buffer.
(setq frame-title-format "%b")
; Line by line scrolling. By default, Emacs scrolls off the visible buffer by several lines. This is annoying
; This causes the scroll set to be whatever you want, in this ase, 1
(setq scroll-step 1)
; also, make the middle mouse wheel scroll only one line at a time
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1)))
; make home and end buttons work better
; figure out how to make emacs work better with markdown
; Tabs, fast tab switching
`M-x spook’ adds a line of randomly chosen keywords to an outgoing mail
message. The keywords are chosen from a list of words that suggest you
are discussing something subversive.
The idea behind this feature is the suspicion that the NSA(1) and
other intelligence agencies snoop on all electronic mail messages that
contain keywords suggesting they might find them interesting. (The
agencies say that they don’t, but that’s what they _would_ say.) The
idea is that if lots of people add suspicious words to their messages,
the agencies will get so busy with spurious input that they will have
to give up reading it all. Whether or not this is true, it at least
amuses some people.
You can use the `fortune’ program to put a “fortune cookie” message
into outgoing mail. To do this, add `fortune-to-signature’ to
(add-hook ‘mail-setup-hook ‘fortune-to-signature)
You will probably need to set the variable `fortune-file’ before using
I have a small laptop that I carry to the coffee shop for writing. It is a bit shaky in the hardware department, very small, and has no functioning wireless. The hard drive is encrypted. These attributes together make it the perfect laptop to carry around between, say, the gym, the coffee shop, the grocery store, Huxley’s daycare, etc. I have a small number of files synced on it via a hard wired network connection at home so there is quasi-real time work to do with it, but only a subset of the larger number of files and folders I regularly use. The lack of an Internet connection means that I am not distracted while writing, the low value of the hardware means it won’t matter if it gets dropped, crushed or even stolen, and having the hard drive encrypted with a killer password and such means that the very valuable data (as if) that is on it can’t fall into the wrong hands. Continue reading Emulating The Terminal Emulators For Fun (with emacs color-theme)→
After a little messing around with interesting emacs goodies, we might as well get right on to the good stuff.
emacs uses a concept called “modes.” You’ll learn about that if you use emacs. For now, what you need to know is that there are “major modes” and “minor modes” and we’re only interested in major modes at this moment. There are several major modes that make emacs highly useful for specific purposes, and some of those modes are designed with writing in mind, such as the text-mode the outline-mode and what is known as muse-mode. But writers really want to use org-mode and not much else.