Monday, October 27, 2014

Aquamacs for Writers

I was getting so tired of Emacs crashing on my Macbook Pro that I had decided to sell it in order to raise enough cash to buy parts to update my desktop, whose board and CPU combo are five or six years old. I am running Xubuntu on my desktop, and Emacs has not faltered or crashed in forever on Xubuntu. My Mac is a fancy deal: I7 quad, OWC SSD Extreme, and 16G of RAM. I thought the cash I raised selling the Macbook might be enough to build a decent workstation/server, which I have wanted for a long time. Then a friend on the web suggested I give Aquamacs a try. He thought I'd have less problems, which has proved to be true. I have been using Aquamacs for a couple of weeks now and no crashes to speak of, one sort of, maybe, my fingers got tangled up and I hit a bunch of keys at once. I have been encouraged to move out of the stripped Aquamacs into a more expansive model. Also, just downloaded Aquamacs-3a this morn, which is the latest thing. I have been on it all day. No crashes. Maybe I won't sell the Mac after all.

October 27, 2014

First of all I can assure Emacsen who are having trouble with Emacs but love their Macs like the girl in the first row in grade school, Aquamacs is not that much different than Emacs. Master the one and you've pretty much got the other one mastered. On either Emacs or Aquamacs a beginner who has done the tutorial and mastered the function keys can very soon begin to pound out text. All the rest is gravy; I admit there is a world of gravy. But Emacs and Aquamacs are similar enough that if you can't afford the Mac Pro any more, you can load up Xubuntu on your junker, and set up Emacs, and after awhile it will seem something like the Mac did. You won't get that crazy, erotic feeling like you used to with the Mac, but think of the thousands of dollars you'll be able to keep in your pocket. An old Emacsen, on the other hand, progressing out of their worn out Dell or Thinkpad into a Mac retina, might be more aggravated switching to Aquamacs. But if they are smart,— as I'm not —they might be able to get round the lack of cooperation that seems to be going on between Emacs and Apple OS.

I found the interval between auto saves in Emacs to be quite long, 300 characters, but when I shortened it to 100 the frequency of the crashes seemed to increase so I changed it back. At first I copied over the .emacs and the .emacs.d I had been running so successfully on Xubuntu onto the Mac. But soon I gave up on that and I deleted everything and downloaded a new copy of Emacs and built it from scratch. That didn't seem to make any difference. Since I have switched to Aquamacs I have loaded most of my favorite extensions, yassnippet, sublimity mode, ido, deft and writeroom. Recently, I loaded wordsmith-mode, pandoc-mode and zoom-frm, and I have not had any crashes.

A few times I have had missing letters, and some garbage showing up on the screen. It can be quite worrisome when there is a lot of writing to do and no time to fuss. But M-X redraw-display seems to resolve the issue. It has not happened very often. One time I resized the frame and the problem went away. It has not happened at all lately.

One feature on Aquamacs, besides the beautiful Apple colors and fonts, is sessions. I was attracted to that feature right away. I don't think there is anything similar in GNU Emacs. (Please comment if there is!) One complaint I have always had with Emacs is that you often have to do quite a bit of setting up before you get the frames all organized the way you'd like before starting work. I'm settling in to write well before dawn, still half asleep, so fiddling around is not what I want to do. First thing, when you get your basic files set up, create and name a session file, then after you launch each morning go to File>Load session. A browser will open up. Go to your session file, click on it, and click on "open". It takes a few seconds, but suddenly all your big morning files will be framed appropriately and most of the fiddling done. It is then off to work. I have a novel session and a blog session. I may be working on three or four blogs at a time. Or I might have three or four chapters of my novel Jimmy Freeman plus a notes file all in buffers for me to get at instantly. It is a time and effort saving feature that I'm excited about.

You may think these two frames above could easily be matched by other word processors. Think again. They are both from a file in raw LATEX. Press a few buttons and you'll have a PDF to read. Or a .txt file or a few more buttons and you'll have an HTML file to edit. Colors, both background and foreground can be changed in a few seconds with a left click. Changing colors every so often gives the poor eyes a nice rest. Much more about these beautiful, distraction inhibiting full screen modes in a future blog.

Since everything seems to be going pretty well, deft was working, sublimity and ido and yassnippet, and my .tex files seemed to be compiling without a hitch out of the box (!), —a big surprise —, the issue came up the other morning about whether I should download the latest Aquamacs-3a, which is built on Emacs 24.4. I usually take a pass on updates because I'm too busy writing, especially now when I'm in the middle of a novel, to put up with the glitches. But for some reason, for this one, I couldn't resist. It was advertised to have a browser in it: EWW. For years now I have dreamed of a relatively modern browser that I could keep open in an Emacs buffer. Then I could have Internet references at hand and all Emacs key bindings. Took me awhile to get an emailer in order to respond to emails from my comrades within Emacs, as always for the comfort of having a huge variety of key bindings. I theorize that emails always seem so klutzy and poorly written because the clients and browsers have such poor word processors. Anyway, EWW in Aquamacs proved to be too rudimentary at the present time to be useful. At least in Aquamacs, Apple OS. Also, turned out numerous of the normal useful elpa packages, such as smex and zoom-frm do not load in 3a. So that means Elpa is buggy. No time to fuss, so I will be doing without a few things for awhile. I'm sure that will get fixed in no time. (Later on in the afternoon I got zoom-frm installed with no problem.)

While I'm on the subject of bugs, tabbar mode seems doubtful, but with many other options for file switching in Aquamacs, I shut it off in Options and prefer ido mode. I may have twenty or so files open at any one time anyway. If they were all in tabs that would take up a lot of space in the frame.

As you go along working in the app, very interesting things happen. The echo area just informed me that I did not close one of my heads. Sure enough, a two head had been closed with a three head call. (Does that sound slightly unbelievable? I am not kidding.) Also, try "m-x bs-show" call and see what you think of it for switching files. Bookmarks of course will open up a file where you left the cursor — just key C-x r-m. Speedbar is available. Recentf mode will present a buffer with all of your most recent files. If you like to point and click, check out Window above. All of these methods bring up a file much faster than Finder.

So far so good. I'll be looking at EWW in Xubuntu soon. Wouldn't it be nice to have 24 or so buffers open, a browser in Emacs, and Firefox and Safari open at once ten tabs in each on a 40 inch UHD TV! If I sell my Mac, then one of the new Mac Pros would be only another two thousand dollars! I am slowly breaking in my wife. But maybe a used "Cheese Grater" would do the job. Who has time to fuss with a Hackintosh?

Tuesday, October 21, 2014


We all have our good and bad relationships with dogs. Sometimes the dogs belong to us, other times they belong to someone else. Sometimes dogs belong to themselves. It is fun when they are friendly, and yours and theirs and themselves get along with friendship and well being. Otherwise it may not be fun. But dog lovers are as different as breeds of dog. I personally will never understand why anybody would want to risk their neck for any length of time with a pitbull, but pitbull owners don't understand me either. We just naturally don't get along. Instead, I prefer the owners of little brown hotdogs.

September 20, 2014

There is a small brown dog that belongs to a neighbor on Tueltown Road. He is as short as he is long. His tiny legs move along with the enthusiasm of a centipede. He appeared initially as a boyfriend for my old comrade Sunshine. Sunshine took to the little critter affectionately. They played together: they forgot the problems of the real world together. Then as soon as Cricket, my other dog, we have two, who is a Rat terrier, began to get into heat, oh-no. Cricket is ten, and a litter would kill her. The business of getting litters from a small dog that you'd like to keep alive any length of time has to start young. When they are four or five, they are too old. And that's not promising anything. So now Cricket has to stay in, while Hotdog has taken over the porch. He makes forays against our chickens as if he owns the place. He has become a youthful terrorist. I see him smiling behind the brass of his swagger. He has taken over my favorite porch chair. You know the type, toothy grin, AK-47 butt on knee, barrel waving upright. They'd take over the world if you let them, while believing the world has suddenly run into some good luck. Possession means everything unless someone else possesses it then it means nothing. Like Hemingway's Pablo or Babel's cossacks, their stolen horses acquired a new ownership worth fighting over surprisingly swiftly, as soon as the next day, the next sunrise.

But now, doesn't he look silly? Already a fat cat. I'd like to explain to him his situation. He is sitting in his grandeur atop the cat food bowl regularly visited by a gang of ten wild cats any one of which is apt to become in an instant agitated. Frankly, I doubt he'd stand a chance. Here they come now. Not a break in stride they hustle forward. I wish these terrorists would understand that in the grand scheme of things, they are not much. Well, that didn't take long. He is off to somewhere, leaving the wildcats to their chow. But that is not the end of him. I see him in the trees, having switched to gorilla operations. Now the wildcats will have their way. No matter, time for Sunshine and I to take our walk.

So on the walk Hotdog followed Sunshine and me down Tueltown Road to his house. I asked one of the kids, a fair haired, spectacled boy, to tell his mother I wanted to talk to her. Kids and dogs poured out the front door and strong shouldered, round faced Mom and bearded hubby. I explained the situation, that we thought the colorful little dog was fun, but my ten year old rat terrier was gonna get impregnated if this continued. I assumed the little dog had not been fixed. "No," the mother said. So I hope that solved the problem, though with that many kids, I imagine we'll see him around again soon. Kids have a way of losing track of things.

He is a fearless little dog, but not friendly. He won't come up to be petted even if you turn round, cluck and smile pretty. He wanders all over the neighborhood. He followed Sunshine and me back to his house I thought rather proudly, as if he had captured us, and was returning us as prisoners to headquarters. When someone opened the door he rushed in without being called. I think if it was not for Cricket, I'd have not bothered. It is funny watching the little brown squirt chasing the banties. He barks and runs like hell, but he is nowhere near quick enough, and the banties toy with him. Still he chases undaunted, as if Jason hell for leather in quest of the golden fleece. He is a brown, insignificant lump of nature chasing what nature would never be so stupid as to let him have. But try telling him that.

Next day Hotdog reappeared around supper. This time he was acting so obnoxious that when I took Sunshine out, he followed along snapping at his heels. Sunshine turned around becoming irate. He barked loudly, while little Hotdog, the brown turd, bounded around with rebellious pleasure. Now Sunshine became increasingly stubborn and would not move. I had to bring her back in to the house. I jumped into my Oldsmobile and drove down to Hotdog's headquarters. The flock of children reappeared, Mom following, two turtle doves and a partridge in a pear tree. Did I see rabbits bounding past the front door? I was becoming increasingly fond of these people.

"I'm still worried about my ten year old rat terrier," I said. "I don't think it would work out if she had a litter right now."

"No, it wouldn't work out."

"He's over at my house. I can't get near him."

"Alright, I'm coming."

She was barefoot. One of the kids brought out her slippers so she could drive the car up Tueltown and down Kittridge Brook to my driveway. I was a little worried Hotdog may have vacated the premises. But no, he was sitting on the porch still in my favorite chair. Tail wagging, entire rear end wagging in fact for his tail was hardly more than a small stump, he came off the porch to greet his master. But he wouldn't get close. She called to him. Nothing doing.

"When he is inside he comes and he'll look to snuggle, but when he is outside, he is a brat. But he will follow me in the car."

"Well, with all the kids you've got, I'm glad we aren't dealing with the two legged kind."

"That's for sure," she laughed.

She said that she hadn't counted recently how many there were, between animals and children.

So she backed out of my long driveway, and little brown hotdog chased her beside the car. I have expected to see him back, but I haven't, don't know what she did. I should stop by some time to find out. Cricket is not in heat any longer. I miss not seeing him around. I hope he is still okay, though maybe not being such a brat.

Tuesday, October 14, 2014

Advice to Aquamacsen

I have had to give up on Emacs in OS X (Mountain Lion), which has been crashing all the time, way too much, almost every hour, unclear why. I tried the nightly, since the download here is sort of old. Then I littered up my Mac with Homebrew, and that version was no better. So I took the advice of somebody on the net and I went back to Aquamacs. After setting it up, I abused it all day, and so far no crashes. This blog post is for the few who are between the rock and the hard place, who love to write with Emacs as much as they love their Macs. My Macbook is to me a sickness like heroin addiction. There are the fonts, the colors, subtleties in the OS that you almost don't notice, but the latest versions have not been stable with Emacs the way anyone would like. Instead of looking for love and beauty in the real world I am holed up like a rat in a closet with my Mac writing about anything I can think of to write about, doesn't matter what. This is how I set up Aquamacs.

October 14, 2014

If you have a little bit of experience with Emacs, though you are not a programmer, you will notice that Aquamacs seems uninterested in dot files. I don't think they are "deprecated" exactly, it's just that you don't have to use them. This is a good thing you should take advantage of because finder is uncooperative with dot files, a real problem at times to non-programmers who are unversed in the rituals of the terminal. Of course, if you are a non-programmer who has ruined her life by obsessing over configuration files, try *NIX and give up on Mac. Your Mac will limp along on something else. Some say Slackware, others Fedora. In so doing you leave behind Apple fonts and colors. When I switch over to Ubuntu, which runs on my desktop, although fonts and colors are much better in Linux than they used to be, the general washed out appearance drains all the blood out of my forehead. Back I go to suck on the nipple of my crashing Mac. And in my case Aquamacs instead of Emacs. (I haven't saved for awhile, and I just had a terrible thought that Aquamacs was about to crash on me.) It is a sickness. Emacs never crashes in Ubuntu. Not once in an entire year.

Since the Aquamacs experts have decided to make it possible to run Aquamacs without dot files you can do everything, at least everything that I know how to do, in finder. Here are the two places to go to. (Forget .emacs and .emacs.d. Just don't use them.) When you install the Aquamacs DMG, Aquamacs will create in ~/Library/Preferences/Aquamacs Emacs/ a file called Preferences.el. No more .emacs. You can use finder to get to it, open it up with Aquamacs or Textedit, if you like, and you can load in whatever you have a mind to. I have my Preferences.el (notice the cap P, I don't know why they did that, but I wouldn't recommend changing it) in Bookmarks so I can get to it any time. It's about the only file a non-programmer can play around in on Mac OS. It makes for some comic relief. There is another file called customizations.el. I highly recommend, at least for the finer things in life, that you use custom as much as you can figure out how to. But avoid this file like the plague. When you open it it looks like somebody dropped a pot of spaghetti on the floor. If you take it upon yourself to edit something in the fonts section, for instance, and end up with an error message "won't load customizations file", don't say I didn't warn you. You can just delete it and start from scratch; the more often you blow it, the more you'll learn how to avoid blowing it. Also, be aware of the Options tab in the thingy up above there. Lots of good things to click on, as you get into it and want to change appearance or font. If you write like I do, and you're staring at the monitor all day, you are gonna want to change up the looks of things. Incidentally, the ugly drooping tool-bar can be gotten rid of just by clicking on it and picking the "hide toolbar" option. One other thing, Aquamacs has tabs by default, which is in my opinion a good thing.

Also, Aquamacs has spelling that actually works. And it is by default. In Emacs, spelling can be a hassle, but not Aquamacs. Spelling is NOT in Tools (the thingy up above), as it is in Emacs, it is in Edit. It is all there, spelling just works out of the box. If you are the worst possible speller, then you might want Aquamacs to check spelling as you go along. If not, you might want an occasional spell check. Just leave the cursor at the end of the word and key C-$ (that is control-shift-4). If you are working on an older Mac, then key the spellings, if you have a quad-core, 16G of RAM and an OWC SSD extreme, then nothing you do matters very much. If you want completions I have set up a function key for it on F2.

(global-set-key [f2] 'ispell-complete-word)  
Just drop it in your Preferences.el, and restart. But I admit, being into text 99% of the time, I have dis-functioned all of the default Mac function keys. To do this go into System Preferences > keyboard > keyboard shortcuts and every place you see an f, uncheck it. I have a keybinding for everything I do more than twice a day. But nobody would be interested in my keybindings. I just put out the one above as an example. There are many experts on the web, among them ErgoEmacs—to utilize this fine and fanatical man on this subject and many others go here. Once you get into making your own keybindings, things will speed up real fast.

I admit that what I have here on my Mac is a stripper. This is because I fear crashes. On the other hand, the Emacs I have on Xubuntu is very expansive. It is set up for AucTeX, which runs very well, except for a few discussable downfalls, I also have a complete set of yassnippets, zoom-frm, sublimity mode, deft, writeroom, and numerous color themes, too numerous to mention. But Emacs on Xubuntu never crashes. Anyway, I can't remember the last time I had to deal with a crash. On Mountain Lion Emacs crashes all the time, as I have said, and I CANNOT AFFORD TO LOSE ANY TEXT. Therefore the stripper. Though Aquamacs, they are close relatives. But since I am most often writing in raw HTML, as I am now, or raw LaTeX, I really don't need a lot of stuff. Org mode and Muse mode are occasionally useful. Markdown mode is also occasionally useful. As it is I rarely publish in both HTML and LaTeX, and on those occasions that I do, a search and replace or two usually does it, with the help of yassnippets of course.

I believe that AucTeX is most often the principle reason why Emacs crashes in OS X. I don't have much proof except the personal kind, which is: every time I go near AucTeX, shit starts to happen. You can write .tex files all day, but I have no idea how anybody can run AucTeX in Emacs on OS X and not suffer multiple frustrating crashes. (No, there is nothing wrong with my machine. I believe there is one hell of a lot of loyalty to the cause going on in Emacs. Also, most people don't get too annoyed with crashes because they really don't do that much on their machines. Maybe a report every now and then or a school theme.) When I finish a .tex file and I am ready to make the PDF, I just open up TeXshop, make the PDF and launch it, usually in Skim, and start my correction rounds. On Xubuntu I might peek at whizzy-tex, just to prove to myself that the coding here and there is right, then I'll open a DVI and start my correction rounds. You can write notes on Skim and save them and make corrections once the reading is over, which makes the correction process slightly easier.

What you really need, and there is no reason to use Emacs or Aquamacs without it, is yassnippet. And you also need the tab key to expand your snippets with. Otherwise, in my opinion, pack it in. Try something else. The rumor is that yassnippet does not work in Aquamacs, and the tab expand is buggy. But here are the facts. Yas does work in Aquamacs and the tab expand works fine, too. You can get the folder from Elpa or you can steal the folder from a friend. If you steal the folder, or get it from Git or anywhere else, the folder goes into /Library/Application Support/Aquamacs Emacs/Elpa. If you don't have an Elpa folder, make one, or, I guess, you can call it site_lisp if you like, the traditional name. You may have to add a few lisp phrases to your Preferences.el.

(add-to-list 'load-path
     "~/Library/Application Support/Aquamacs Emacs/
elpa/yasnippet-20141005.124") (require 'yasnippet) (yas-global-mode 1)
Remember your Preferences.el is in /Library/Preferences/Aquamacs Emacs/. And as I have said, there are no dot files, so you can find the file in Finder, open the file and paste it in. That's as simple as it gets. Restart Aquamacs and yas will work. If it doesn't work, send me a dirty email. One other thing I'd like to point out which has been very helpful. This I borrowed from ErgoEmacs. Everything I have ever gotten from him has always worked1.
(when (>= emacs-major-version 24)
  (require 'package)
  (add-to-list 'package-archives' 
("melpa" . "") t) )

Add this above to your Preferences.el. Melpa packages usually work out of the box. If there is anything that needs to be added to Preferences.el, they will tell you about it in the notes. By the way you get to Melpa by keying M-X list-packages.

So far so good. No screens of garbage, no crashes. More to come on the differences between Emacs and Aquamacs.

1. He is one of those weird, strange characters who being completely without greed make it possible for shit bums like myself to write books and self-publish efficiently without ending up in the clutches of such behemoths as Adobe who want every drop of blood they can get out of you so their executives can all become billionaires.

Saturday, October 11, 2014


For some reason I have been running into rants lately. I don't dare speculate why. So far as I can tell they are normal, hard working people, taking care of themselves day-to-day in the real world. Maybe they are having a bad day. I don't care what their motivation is. I wish I had a tape recorder so that I could listen to these explanations over and over. But, of course, the spontaneity would suffer. Obviously, they wanted to explain something. I write them down immediately after they happen so they are probably fairly accurate in phraseology, and do not represent any personal slant of my own.

Business Owner:

"... in fact everything that is wrong with this world comes from the computer."

(This is the opinion of many rural people, not just this business owner, and some of them are quite well educated.)

"The kids these days can't add and subtract. A young fellow the other day came in wanted to buy a rifle to go hunting with. It just so happened he had the cash. I don't know where he got the cash. I can guarantee he didn't work for it. It took him forever to count $350 from the cash he had. Eventually I had to help him. And they don't see the bills as being real things having value. It is like a computer game. Once those bills are gone you press a button and the bills reappear and spending them is a game you can start all over again. Besides that, they don't want to work. You talk to small business owners, they'll tell you how hard it is to get help. Why is that? And if you do find somebody, they don't care about the job, they don't care about anything you tell them to do ..."

(Another very common opinion: the young are completely ignorant about the boss/worker arrangement.)

"In fact, they are almost happy when you have to let them go. They seem unable to concentrate on any one thing for more than a few minutes. I can't tell you how many ten, twelve hour shifts I have worked. These kids, five hours maximum. If you get them to do anything for say an hour, and then time for a break, a smoke, a drink whatever, and you point out to them that work lasts till five, there is plenty to do to keep busy, they have absolutely no idea what you are talking about. I can't have a guy toking medicinal or not for lunch with all these guns and machines around! I'd be crazy. I believe they learn all these things in school..."

(Another common opinion: that in school they teach that it is okay to smoke dope all day, that it won't hurt you and it won't lead to a negative influence on your life, and they teach that most people don't work more than a couple hours a day, if they do, they become stressed out. Work related stress is a big motivator for smoking marijuana, whether medicinal or otherwise. In fact, the schools teach that nothing is so important that you should get stressed out about it, even the every day business of taking care of yourself. Remember: they don't have tests any more, they don't have report cards, and so on. Kids graduate from high school and they can not read. These above in parens are impressions he conveyed to me without going into detail. I admit that if I had pushed he might have branched off.)

"Anyway," back to the small successful business owner, "I don't have anything to do with computers. I don't even have a debit card. Basic math skills aren't there any more. They think if they punch up certain buttons, even if they have made a mistake and punch the wrong button, what shows up on the monitor is the right number, and you can stand around all day trying to explain that the number is wrong because it doesn't add up."

(He made a big point of this. The computer is not supposed to be capable of making a mistake. The thought that human beings are capable of making a mistake is stressful, therefore the above.)

His last point, I assume, came from a direct, recent personal experience. "I hired a guy, a young fellow, he appeared qualified. But he didn't have a car. Just so happened he lives not too far nearby me, so I went by to pick him up. I have to stay late a lot of times, one of the other fellows was taking him home. Anyway, on the drive to work, he chain smoked. While he was chain smoking, I was pointing out cars in the lots and in front of houses up for sale. 'Don't you want a car?' 'No money,' he says. So I explained to him the notion of saving money to buy things. 'For instance,' I says, 'if you quit smoking. How many packs of cigarettes do you smoke per day? He said rather proudly, I thought, that between him and his old lady probably three packs a day. So figure fifteen dollars a day go up in smoke. That's conservative. Seven times fifteen is over a hundred dollars a week. That's four or five hundred a month. You could buy a hellova used truck for that kind of money.' But of course it was all useless. The idea of not spending money to save up to buy an important item in order to stop making a fool of himself was incomprehensible to him."

"I bet he still doesn't have a vehicle," I said.

"He doesn't have a job either."