Prosthetic Conscience
Jason McBrayer's weblog; occasional personal notes and commentary
Sun, 12 Oct 2008
Wrapper script for emacs using –daemon
For quite a while, I’ve used a variety of scripts for starting emacs, starting with dtemacs from gnuclient, which I modified in various ways to work the way I wanted it with Gnome and from the command line. The new daemon-mode in CVS emacs, combined with multi-tty, makes it a bit simpler to write a script that you can use to edit files from your desktop environment, from a command-line with or without X available, or as an external editor from a mailer, VCS or web-browser. I’ve re-written the latest version of my emacs wrapper in terms of daemon-mode, and present it here. It’s rather shorter than my pre-daemon-mode script, and does rather more. Apologies for my bad shell-scripting style.
#!/bin/sh
# em: a script for starting emacs as needed.
EMACSCLIENT=emacsclient
EMACS=emacs
if [ -z "$DISPLAY" ]
then
CLIENTARGS='-t'
CLIENTNEWARGS='-t'
else
CLIENTNEWARGS='-c -n'
fi
function start_daemon() {
echo -n "Starting emacs in the background…"
$EMACS –daemon
while ! $EMACSCLIENT –eval t >/dev/null 2>&1
do
sleep 1
done
echo "ok."
}
if [ -z "$@" ]
then
if $EMACSCLIENT $CLIENTNEWARGS >/dev/null 2>&1
then
exit 0
else
start_daemon
$EMACSCLIENT $CLIENTNEWARGS
fi
else
if ! $EMACSCLIENT $CLIENTARGS "$@" >/dev/null 2>&1
then
start_daemon
$EMACSCLIENT $CLIENTARGS "$@"
fi
fi
[ Posted: 19:00] | [ Category: computing] | Permalink | Comments: 0 ]
Wed, 08 Oct 2008
Underappreciated emacs function: just-one-space
I want to very briefly praise the probably-underappreciated emacs command just-one-space. It is on M-SPC by default, and what it does is replace all the spaces and tabs around point with one space (or prefix-arg number of spaces). That’s nothing terribly fancy, but it’s one of those little things that can let you save so many keystrokes when you’re reformatting text. That and transpose-chars are among the little touches that make emacs so much more convenient than a bog-standard text editing control.
[ Posted: 06:10] | [ Category: computing] | Permalink | Comments: 1 ]
Tue, 07 Oct 2008
Links for 2008-10-07
- Shaving Horse Plans
- Portable Shaving Horse
- Alexander Cockburn: Creatures of Capital
- Squatter bobcats of doom! | nostate.com
Anarchist discussion of property rights, with extra bobcats.
- Fuck the troops! | nostate.com
A very challenging article. I prefer the motto: “We support our troops when they refuse to deploy.”
- Main Page - Open Source Ecology
A radical outline of a sustainable, decentralized, high-tech village economy. - The Raw Story | Denver cops get T-shirts that mock DNC protesters
Denver Cops: We get up early to beat the crowds.
- The Partial Observer - Standard of Living vs. Quality of Life
A fictional treatment of an optimistic future outcome of the changes we are living through today.
- Sad Sack Artists: Neil Strauss’s The Game and Tony Clink’s The Layguide
A book review discussing how pathetic the members of the “pickup community” are.
- Virtue Ethics (Stanford Encyclopedia of Philosophy)
An alternative approach to ethics besides the deontological and consequentialist approaches. I’m still not sure I buy this one, either. I find the justification problem very significant. On the other hand, it seems to lack at least one problem of the others, which is that they can be used to provide moral justification for coercing others to behave in desired ways, whereas it seems much harder to argue this from a virtue ethics standpoint.
[ Posted: 18:30] | [ Category: web] | Permalink | Comments: 0 ]
Sat, 04 Oct 2008
Links for 2008/10/04
Some of these are a little out of date given the unfortunate passage of the bailout act, but never mind.
- Commentary: Bankruptcy, not bailout, is the right answer - CNN.com
An article from an academic economist opposing the bailout.
- The Outbreak
A fun interactive zombie movie.
- The Wall Street bailout and the threat of dictatorship
Excellent analysis in the WSWS of a very revealing article in the Unquotable Rag (Washington Post) by a member of the CFR. Basically, this guy considers the failure of the Wall Street bailout as showing that “American political elites have lost the ability to quickly respond to a national challenge by imposing their collective will.” And he considers that a bad thing.
The writer of the analysis does engage in a little Constitutionolatry (unusual for a Commie) in saying that the Constitution did not replace the Articles in order to allow political elites to quickly impose their collective will. Of course it did! Isn’t he aware of the Anti-Federalists‘ objections to the Constitution?
But it’s nevertheless an important analysis. The conflict over the bailout is the first time in recent memory that the elite media has outright failed in manufacturing the consent of the American people to the consensus of American elites. Representative democracy is pretty weak tea, but we haven’t even properly had that in years; it’s bracing to see what it actually looks like.
[ Posted: 18:00] | [ Category: web] | Permalink | Comments: 0 ]
Thu, 02 Oct 2008
Cheap fountain pen review: Aldo Domain Two Tone fp
Aldo Domani Two Tone fountain pen w/mini ballpoint set
I found this at Office Depot for $16, a bit cheaper than the $22 their website lists it as. I was considering getting a new inexpensive fountain pen, as the clip on my Waterman Phileas is sprung, and I was thinking of the Foray Focus fountain pen in black. However, I happened to see this pen set, and my cheap side jumped out and made my try out the Aldo Domani.
- What it includes:
- the fountain pen, which I’ll describe in detail below.
- a rollerball converter for the fountain pen, consisting of a rollerball ink cartridge and point assembly, and a housing for the head end of that which replaces the fountain pen’s section & nib.
- A mini ballpoint pen with a stylus point on the end.
- A short standard ink cartridge.
I haven’t tested the rollerball point, nor the mini ballpoint; I bought this only for the fountain pen. If I had a device that used a stylus, I might carry the mini ballpoint for that, but I don’t, and I don’t really have any reason to carry a ballpoint otherwise.
- The fountain pen
The fountain pen, like the rest of the set, is actually made by Yafa, who I’ve noticed before make some cheap fountain pens for calligraphy sets and such. This pen is, according to the packaging, made of brass, covered with lacquer, and with chrome accents. It’s actually a fairly nice-looking pen, with a silver-gray barrel, a glossy black cap, and glossy black ends that look rather like cufflinks. It uses standard ink cartridges, and comes with a short standard cartridge. Note that it does not come with a converter (the Foray Focus I was also considering does).
On opening the package, I loaded the pen up with a Waterman long standard cartridge, rather than the short standard cartridge it came with. The pen is a very nice substantial weight, much more solid feeling than my Phileas, about the same as my stainless Sheaffer Triumph Imperial. The cap posts very smoothly and solidly, and stays put. The nib is a medium, and is marked with “Aldo Domani” and “Iridium point, Germany”. The clip has a nice shape when looked at head-on, but is not very well constructed – the tip of it is folded metal like you’d see in a decent disposable gel pen, and it is very tight. It would not clip well to thicker fabric.
One nice feature of this pen, which is not often found in very cheap fountain pens, is that the cap screws on and off. This makes it much more secure for carrying in a pocket or the pen loop of a notebook.
My first impressions writing with this pen were that it is a very poor starter, but not a bad writer once it got started. On first using it, I had to shake it a bit and press down to get any ink to flow, but after that, it wrote okay, giving a wet line that was slightly wider than I like. After using it for a while, I found that it tended to be slow to start the first time it was used each day. This slow starting made the line quality slightly inconsistent, as it was rather dry starting, then tended toward being fairly wet. Even with these problems, I’ve enjoyed using it over the past couple of weeks as the pen-that-goes-in-my-notebook. The nib is reasonably smooth, and not at all flexible.
I ordered a standard cartridge converter from PenCity; I had thought I had a spare from somewhere before, but apparently not. I cleaned the nib by soaking in cold water, dryed it on a paper towel, attached the converter, and filled it with Noodler’s Bulletproof Black. I don’t know whether it’s the ink itself, the act of drawing ink in through the feed, or whether I should have cleaned the nib in the first place, but the pen no longer shows the tendency towards slow starting that it did on the cartridge ink.
- Summary
I give this pen a B+. It’s an excellent value for the very low price, assuming you can get it as cheaply as I did. Except for the cheap clip, the body of the pen is as nice or nicer than pens I have in the $30-$50 range. The nib is not great (not as good as even the Waterman Phileas, say), but it’s about as good as decent school pens like the Parker Reflex or Vector. The real appeal to me of it is that for hardly any more than a Reflex, I get an all-metal pen that will stand up to a bit more daily abuse than the somewhat flimsy Reflex.
[ Posted: 12:00] | [ Category: productivity] | Permalink | Comments: 0 ]
Tue, 30 Sep 2008
Links for 2008-09-30 Tue
- A brilliant comment at Charlie’s Diary
This is a rant, but it’s a brilliant, fact-filled, linkified rant on everything that is wrong with the remains of the country we are living in. - Got Medieval: The myth of pre-literacy
Medieval blogging.
[ Posted: 21:25] | [ Category: web] | Permalink | Comments: 0 ]
Fri, 26 Sep 2008
Links for 2008-09-26 Fri
- Schneier on Security: The Two Classes of Airport Contraband
If it’s dangerous, treat it, and the person trying to bring it onboard, as dangerous. If it’s not dangerous enough to do that, stop trying to keep it off the plane.
- Rad Geek People’s Daily How Portland Police Bureau Officers Joseph Cook and Judy McFarlane used a “welfare check” to throw Contia Orsby out on the streets
- Daily Kos: The Way Forward {Updated: Obama announces opposition to a blank check.}
I hate to link to the Great Orange Satan, but this article is pretty insightful. Essentially, we are seeing the Shock Doctrine (disaster capitalism) used to consolidate even more power in the Executive than was granted to it after the September 2001 crimes.
- Naomi Wolf: The Battle Plan II: Sarah “Evita” Palin, the Muse of the Coming Police State
- Rant: The Day the Earth Stood Still Remake Is Pure Sucky Evil
I finally saw the original for the first time last night.
- BuyMyShitPile.com: Hey Washington, can you buy my bad investments too?
Use the form below to submit bad assets you’d like the government to take off your hands. And remember, when estimating the value of your 1997 limited edition Hanson single CD “MMMbop”, it’s not what you can sell these items for that matters, it’s what you think they are worth. The fact that you think they are worth more than anyone will buy them for is what makes them bad assets.
- Kansas City - Plog - Pirates duel with Phelps family
God hates shrimp and poly-cotton blends!
- Charlie’s Diary: Straws in the Wind
I don’t think it will come to that, but it certainly looks bad. - HARDCORE ZEN: BIG FART CIRCLE
Taking the piss out of a spiritual con-man.
- Why is a U.S. Army brigade being assigned to the “Homeland”? - Glenn Greenwald - Salon.com
This article actually goes a little more into the rules they will be operating under.
- “Jonathan Lee Riches” tagged Cases and Lawsuits :: Justia News
Master of the prisoner lawsuit.
[ Posted: 17:45] | [ Category: web] | Permalink | Comments: 0 ]
Thu, 25 Sep 2008
Using Windows Search with anything.el
In a previous post, I said that I wished there were a command-line client for Windows Desktop Search (or Windows Search, or whatever M$ is calling it this week) that would give back filenames in a way useful to anything.el. Well, that comment was not entirely ingenuous, because in the time between when I wrote that article and when I posted it, I wrote one. It’s written in Python, and uses the win32com module, so you’ll need regular w32 Python installed (not Cygwin python).
The script itself is here. I recommend that you install it somewhere on your PYTHONPATH. This is because command-line argument handling is very dodgy on w32, particularly when the program is interpreted, the interpreter is a native w32 program (not cygwin), and you may be calling it from a cygwin program (such as cygwin bash). More details on installing it and its limitations on its own page.
Integrating it into anything: use the following elisp code:
(defvar w32-windows-search-program
"python.exe -m DesktopSearch"
"Command to pass a search string to Windows Search.
Will be split on spaces to pass to start-process.")
(defvar anything-c-source-w32-windows-search
'((name . "Windows Search")
(candidates . (lambda ()
(apply 'start-process "w32-windows-search-process" nil
(append
(split-string w32-windows-search-program)
(list anything-pattern)))))
(type . file)
(requires-pattern . 3)
(delayed))
"Source for retrieving files matching the current input pattern
with windows desktop search.")
The given value for w32-windows-search-program depends on DesktopSearch.py being in your PYTHONPATH. With the above in your .emacs, you can add the source it provides (anything-c-source-w32-windows-search) to anything-sources just like any other anything source.
This generally works well enough for my needs. Hopefully it will be useful to other people using emacs on w32.
[ Posted: 20:00] | [ Category: computing] | Permalink | Comments: 0 ]
Mon, 22 Sep 2008
- National Journal Magazine - John McCain. Youth You Can Believe In.
The Law of the Excluded Middle is not in the Constitution! No one voted for it!
- Newsvine - The New Left?
A really fascinating article using the “Mitchell Chart” from 8 Ways to Run the Country to explain political changes between the New Deal, the 1960s, and the 2000s. Does a lot to explain the rising prominence of libertarians on the Left.
- Lost middle-class tribe’s ‘secret’ eco-village in Wales spotted in aerial photograph taken by plane | Mail Online
- MIT OpenCourseWare | History | 21H.001 How to Stage a Revolution, Fall 2007 | Home
- The Anti-Federalist Papers
Letters arguing against the adoption of the US Constitution, and for the limited amendment of the Articles of Confederation.
- Nader, Barr & Paul: ‘Told you so’ - Ben Adler - Politico.com
- So here’s the plan…
Writer Ken MacLeod explains the US financial industry bailout with pictures.
- cryptogon.com:» U.S. Army 3rd Infantry Division’s 1st Brigade Combat Team Assigned to NORTHCOM Beginning October 1st
For those keeping score at home, NORTHCOM would be the US.
- Interventions: Science Fiction reflects on the contemporary period%u2026 « The Cedar Lounge Revolution
- Why is American liberalism bankrupt? A history lesson for New York Times columnist Bob Herbert
[ Posted: 19:20] | [ Category: web] | Permalink | Comments: 0 ]
Fri, 19 Sep 2008
anything.el and “open with default tool” on w32
My job doesn’t often offer the opportunity to “hack the good hack.” A little while ago during toolsmithing time, I got to make a neat little hack to ‘anything’, an emacs package for locating files (or buffers, or info pages, or … anything) and acting on them. Normally, use of ‘anything’ works like this: C-x C-a to start, then start typing something to search for, arrow down through the matches, and either select the default action (open the file or switch to the buffer) with RET, or hit TAB to switch to a list of actions to select.
Here’s where the hack comes in. One of the actions you can perform on files is ‘open with default command’. The catch: this is not implemented on W32, which I have to use at work. On unix and MacOS, it this action is implemented by calling an external program — ‘xdg-start’ on unix, or ‘open’ on Mac-OS — with the filename as an argument. There is no equivalent command on W32 – the closest is the cmd.exe shell internal ‘start’. But because ‘start’ is a cmd internal, it is hard to call from emacs; the quoting may be badly messed up, for example, depending on whether you use cmd.exe or cygwin sh as your shell, etc. But here’s a better approach: leave it up to emacs. Emacs on W32 has a function ‘w32-shell-execute’ that works like cmd.exe’s ‘start’ internal.
The code to integrate this is now added to anything-config.el, a package of sample configurations for Anything. I’m now co-maintaining anything-config.el.
The practical upshot of this is that I can use ‘anything’ to find my playlist files while in emacs, and start them with Windows Media Player. Now if only Windows Desktop Search let you get text-mode search results back, or if there were a version of Tracker for W32…
[ Posted: 17:30] | [ Category: computing] | Permalink | Comments: 0 ]
Thu, 18 Sep 2008
Links for 2008-09-18 Thu
- Monbiot.com » Bring on the Recession
- Third Party Watch » Blog Archive » “We Agree”
This should be big news: all the minor presidential candidates, from Left parties like the Greens, to Right parties like the Constitution party, agree on a set of statements that sharply distinguish them all from the Democrats and the Republicans.
- Rad Geek People’s Daily 2008-09-13 On class consciousness
- Is J2EE appropriate for developing web apps?
- This is Your Nation on White Privilege | Red Room
An interesting and timely list of examples of white privilege: how similar behaviours are viewed positively or neutrally when done by whites, and negatively when done by blacks.
- Edge: WHAT MAKES PEOPLE VOTE REPUBLICAN? By Jonathan Haidt
On the one hand, this article does a good job of showing how Republicans are successful in relating to the non-rational side of American citizens. On the other, its advice to the Democrats is basically more of “How can we learn to gull the masses that well?”
- Political Compass: US Presidential Election 2008
Note that all of the major-party candidates, and Libertarian Party candidate Bob Barr are in the right-wing authoritarian quadrant.
[ Posted: 18:30] | [ Category: web] | Permalink | Comments: 0 ]
What I’m missing in Google Chrome: fast proxy switching
It’s nice that Chrome has Incognito Mode. But how incognito is it when your network admin can monitor the content of your traffic? Wouldn’t it be nice to be able to switch your network traffic to a secure channel – like an SSH tunnel to an http proxy under your control, or TOR?
Firefox has the ‘Distrust’ extension that provides the same protections as Chrome’s Incognito Mode (other than the v. stylish fedora-wearing spy logo). And it also has your choice of extensions that let you switch proxies without going into the depths of the advanced settings menu: QuickProxy, SwitchProxy, FoxyProxy, and several TOR-specific extensions. Now if only Distrust had a setting that let one turn on their proxy for the duration of the Distrust session…
[ Posted: 18:15] | [ Category: computing] | Permalink | Comments: 1 ]
What I’m Missing in Google Chrome: Mouseless browsing
In Firefox, I have the Mouseless Browsing plugin installed, which lets me hit a key to label links with numbers, then type the number to follow the link. But even without MLB, you can browse mouselessly with the typeahead search – type ‘/’, then start typing the text of the link, and when the link you want is highlighted, hit enter. In Chrome, you can only tab between links, not jump directly to the one you want (even with the search function). That is, you can search for link text, and it will highlight it, but you cannot then select the link without tabbing to it from the beginning.
[ Posted: 16:00] | [ Category: computing] | Permalink | Comments: 1 ]
Mon, 15 Sep 2008
Links for 2008-09-15 Mon
- al3x.net: al3x’s Rules for Computing Happiness
I could certainly dispute some of these rules. But the overall thrust of this is about right.
- Atomized � Blog Archive � On computing happiness
And these are similar to some of the exceptions I’d make.
- U.N. agency eyes curbs on Internet anonymity | Politics and Law - CNET News
- ParanoidLinux.org
- chartjunk � Blog Archive � Tax Plans (that’s one for you, nineteen for me).
Nice graphical comparison of Obama’s tax plan vs. McCain’s. The lowdown: If you make less than $110,000 a year, you will get a bigger tax cut from Obama than from McCain. If you make more than $100,000, you will get a bigger tax cut from McCain, but your taxes will not actually increase unless you make more than $600,000 (which would put you in the top 1% of incomes in the US). Anyone making around the median income gets a much bigger tax cut from Obama than from McCain.
[ Posted: 20:00] | [ Category: web] | Permalink | Comments: 0 ]
Sun, 14 Sep 2008
Links for 2008-09-14 Sun
- London Stock Exchange suffers .NET Crash | Computerworld Blogs
I wonder if the age of “you can’t be fired for choosing Microsoft” is coming to an end. - Army, Sears Partner for 1st Infantry Division Clothing Line
- “Breakfast Stick” – what it is, ingredients
For those confused and frightened by Cryptogon’s references to the nefarious Breakfast Stick.
- USGS Release: Silent Streams? Escalating Endangerment for North American Freshwater Fish: Nearly 40 Percent Now At-Risk
- Oil, sex & money: Federal agency accused of sleazy antics
- Think Progress » On 7th Anniversary Of Attacks, White House Claims Bin Laden Was Not The ‘Mastermind’ of Sept. 11
Oceanea has always been at war with Eastasia. Please destroy any materials stating that we are or have been at war with Eurasia. That reality is no longer operative. - Brian Katulis: The surge has not promoted political reconciliation in Iraq
- Newsvine - Sarah Palin: Dominionist Stalking Horse
This is scary shit. If you don’t know what the Dominionist movement is, the article will fill you in.
- What’s the difference between Palin and Muslim fundamentalists? Lipstick | Salon
More scary stuff.
- American Female Soldiers More Likely to Be Raped than Killed in Action
[ Posted: 14:00] | [ Category: web] | Permalink | Comments: 0 ]
Tue, 09 Sep 2008
Links for 2008-09-09 Tue
- Rad Geek People’s Daily: Slavery in Florida’s tomato fields
Grow your own, y’all.
- May I Offer You My Calling Card? - TIME
Via The Art of Manliness. Is the use of calling cards coming back into fashion?
- Civil Liberties Examiner: Fake or real, you are your ID
Fake IDs are a thing of the past: bogus real IDs are the wave of the future-present.
[ Posted: 19:30] | [ Category: web] | Permalink | Comments: 0 ]
Mon, 08 Sep 2008
Links for 2008-09-08 Mon
- 21 Easy Hacks to Simplify Your Life | Zen Habits
- Sarah Palin’s Heart-less use of soft rock
Trivial, but typical. No controlling legal authority.
- Rhizome Template in the Amazon?
There was a time when I was very interested in the spatial organization of societies, and how that reflected their political economy. It would be interesting to know how non-hierarchical the precontact Xinguanos were, and why their apparently decentralized social structure didn’t protect them from demographic collapse at contact.
- Essential Science Fiction and Fantasy for Libertarians
A good list from Dan Clore. There were a few I hadn’t heard of on here.
- The Word From Wasilla
[ Posted: 19:30] | [ Category: web] | Permalink | Comments: 0 ]
Fri, 05 Sep 2008
Links for 2008-09-05 Fri
- Palin: Iraq war ‘a task that is from God’ - Yahoo! News
I have promised someone important to stop bagging on Obama in public (I will leave that to Kevin Gray, who is better qualified than I am to do so), and to focus my poison pen on the republicans. So here you go. Bad stuff about Sarah Palin that’s not even personal slime on her dysfunctional family. - BBC - The history of diaries in code
Via Schneier on Security.
Sadly, it seems as if there is almost no point in writing a diary in code anymore. If you wrote it by hand (using a shorthand, a monoalphabetic substitution cipher, or, at the extreme, the Vigenère cipher or an autokey cipher), then it would be trivially susceptible to modern cryptanalytic techniques. But to use a strong encryption scheme, you’d have to write your journal on the computer, which takes all the fun out of it.
- BBC NEWS | UK | More fish off the ‘green’ menu
Oh noes, not anchovies! How will I make pasta alla putanesca now?
- Can We Escape
A libertarian class analysis by Roderick Long. In general, I am less sanguine about private power than Long, and less comfortable with public power than Chomsky. But I consider Long’s “reasons for pessimism” in this article very insightful.
- Slingshot! Organizer
A pocket organizer for radicals. I wonder if I can get an unbound one and add it to my rollabind journal, rather than adding a bound one to my pile of kit to lug around.
- Women of Steel to McCain: Palin wrong choice for working women, families
- Stevey’s Blog Rants: Business Requirements are Bullshit
Summary as I understand it: If you don’t want something yourself, don’t build it on the assumption that someone else will want it. You’ll probably be wrong.
[ Posted: 17:30] | [ Category: web] | Permalink | Comments: 0 ]
Thu, 04 Sep 2008
Links for 2008-09-04 Thu
- Clyburn: Conley can stay out of line
- Amy Goodman arrested at RNC
- Latest acquisitions of the Richland County Sheriff’s Dept.
- The U.S. Army Hires Out iRobot To Supply Military Robots
The rise of the machines is inevitable…what I’m concerned about is which machines.
- «Con Barack è finita la politica nera: Obama è soltanto un bianco travestito» - Corriere della Sera
An interview (in Italian) with Kevin Gray regarding his forthcoming book The Decline of Black Politics.
[ Posted: 07:35] | [ Category: web] | Permalink | Comments: 0 ]
Tue, 26 Aug 2008
Links for 2008-08-26 Tue
- The Copperhead Libel
Prediction: that the shooting in Knoxville was just the start of a wave of right-wing violence that we can expect in the months leading up to the election, which will intensify with an Obama win.
- Obama and Democrats prepare platform of war and reaction
Read’em and weep.
- Brad Hicks on Joe Hill, the 1968 Democratic Convention, and the 2008 Democratic Convention
I dreamed I saw Joe Hill last night.
- News Crew crashes Denver’s concentration camp
[ Posted: 18:30] | [ Category: web] | Permalink | Comments: 0 ]
Page 0 of 43 >>
Powered by PyBlosxom
Subscribe