Author: Jason

  • Nic Ferrier – This Year in Emacs

    On 19/02/2013 Nic Ferrier gave a great talk current status of Emacs, and where it’s heading.

    Skills Matter : In The Brain of Nic Ferrier: This Year in Emacs.

  • Error: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program /usr/lib/dbus-1.0/dbus-daemon-launch-helper: Success

    I recently migrated my linux box from bare metal hardware to a VMware virtual machine. At the same time, I upgraded from Debian squeeze to Debian Wheezy (testing).
    After the dust had settled, one nagging problem keep recurring. Every time I did an aptitude update or aptitude install, after everything successfully ran, I would get this error message:
    Error: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program /usr/lib/dbus-1.0/dbus-daemon-launch-helper: Success
    The cause of this proved quite difficult to track down. Eventually a Gentoo forum post led me to the solution. It seems that somewhere along the line, dbus-daemon-launch-helper has ended up with the wrong permissions. Change its permissions to be world executable.
    chmod o+x /usr/lib/dbus-1.0/dbus-daemon-launch-helper

  • Australian emacs users mailing list

    During the emacs BoF at LCA2013 we decided to set up a mailing list for Australian users.
    Ben has now set it up and it can be reached here:
    Emacs-au-discuss
     

  • Linuxconf 2013

    Linuxconf 2013

    I just got back from having an amazing week at LCA2013. That was my first LCA and I was really not quite sure what to expect. It turned out to be an amazing experience. I met so man really smart people, learnt a lot and generally got exposed to all sorts of new ideas and software.
    Some of the highlights were:

    1. Sir Tim Berners Lee.
    2. Meeting kernel hackers.
    3. Meeting Joey Hess as I backed his kickstarter.
    4. Finding out about Apache OFBiz
    5. Seeing Paul Fenwick give several presentations. Here are some of his videos on youtube.
    6. Organising the emacs BoF.
    7. Realising that I’m not the only emacs user in Australia.
    8. The Penguin Dinner on Mt Stromlo.

    There were many other great and inspiring things. Too many to list. All I can say is I hope I can make it to LCA2014 in Perth.

  • Laser cut stand for HDHomerun

    I got sick of my HDHomeruns not stacking nicely so I made a stand on the lasercutter for them.

    front view of two hdhomeruns in a lasercut perspex stand
    Front view of HDHomerun Stand cut on laser cutter

    rear view of two hdhomeruns is lasercut perspex stand
    Rear view of HDHomerun Stand cut on laser cutter

  • Edit a regex search string in Emacs

    If you are writing a complex regex search in emacs and need to edit the string, arrow keys takes you out of the search. M-e allows you to really edit the string.

  • Watering System

    Watering System

    I’ve been working on installing a watering system in my garden. Even though it seems simple on the surface, it took me a while to work out how to do things.

    Part 1 – The Solenoid Valves and Manifold

    First of all I sketeched out the garden beds I wanted to install the irrigation system into, and then I planned how many runs of dripper line I wanted. For the garden beds in question I needed two lines and three lines respectively.
    The garden beds are on the side of our house with the closest water source being under the kitchen sink. I decided to install the solenoid valves and manifold under the kitchen sink. I put together my bill of materials and bought from Wet Earth who have been very helpful in advising me.
    I measured the space available under the sink and put the pieces together to ensure they would fit. My first mistake was not testing the whole rig before installing. I found that it leaked and I spent a  hours fiddling around under the sink trying to fix it. It was very difficult working under the sink and in the end pulled the whole lot out so I could test it all for leaks on the bench. I made a little test harness which you can see in the center of the photo below. It allowed me to connect the hose to the system and leave it pressurised to look for leaks.

    solenoid valves, manifold, ball valve and filter
    Solenoid Valves and Manifold and Filter

    Starting from the top middle and following around anti-clockwise are:

    1. Hose adaptor for testing purposes
    2. Flexi hose.
    3. Back flow prevention valve
    4. Ball valve so I can turn the whole thing off if I need to.
    5. Filter
    6. Manifold
    7. 2 x Hunter Jar Top solenoide Valves

    Under my sink there was already an unused tee in the cold water line. I’ll connect the flexi hose to that. I have heard that these flexi lines don’t last for ever and they need to be changed every 5-10 years or so.
    The biggest problem I had was that all my threaded connections leaked. I was using plumber’s pink thread tape (the thicker stuff) but they still leaked. I asked at the pluming shop and was told that I should wind the thick tape twice around the thread before screwing them together, which I duly did, but it still leaked. I went back to the plumbing shop and asked more advice and was told that I should be wrapping the thread in 6-10 turns of the thick tape. Once I did that the seals were good. The guy at the irrigation shop told me to use 9 turns of thick tape, or 18 turns of thin on the black nylon glass re-inforced threaded fittings. This seems to be working well too.
    After testing on the bench I finally managed to seal all the threaded connections only to find the valve heads were leaking, slow leaks but definitely leaking. I called Wet Earth and they told me to pull the head off the valve and ensure the diaphragms were clean. I did this and repressurised the system on my test harness. After leaving it at full presssure for several hours, and very slow drips coming out of the valve heads, it eventually seemed dry up. I suspect there was water in the thread  or between the diaphragm and the head of the collar of the valve that was slowly dripping out making me think it was leaking, but the water eventually dried up and thats why I think it was just water in the thread.
    I was using spanners for working on the various bits but then I got some molegrips and I have found these to be much better for the job. Much quicker to get parts on and off. Also molegrips open up mich wider. My 10″ shifter wasn’t wide enough for the nyglass fittings.

    Part 2 – Dripper Lines

    I made the ends for the dripper lines on the bench. For each bed I needed a head which would consist of 2 elbows, a tee for the water inlet and a vacuum break, and a tail consisting of 2 elbows, and a automatic flush valve. I measured up the 13mm poly tubing and put it together. I started out using hot water to warm the pipe to make it easier to insert the barbed fittings but then I had the idea of using the heat gun. The heat gun is much easer. I also found that the 13mm poly tubing was quite easy to straighten by using the heat gun to warm a section of pipe, and then holding it straight while it cools. It makes things slightly easier to work with, not having the pipe bending all over the place. It is easy to overheat the poly pipe with the heat gun though so you do have to be careful with it.
    I laid the dripper line in the beds and hooked up the head and tail ends I made earlier. Incidentally I found the mole grips were also very good here for squeezing closed the poly pipe clips.

    Drip Line and Flush Valve in garden bed
    Drip Line and Flush Valve

    Above you can see three dripper lines (the middle one is a bit obscured) and the round automatic flush valve. The pipes are held in place with retaining pins. They are useful for holding things in place as you lay the pipes and connect things up. I spaced the lines 25cm appart in this bed. The drippers are  spaced at 30cms in the dripper line.
    Three dripper lines in small garden bed
    Three Dripper Lines

     
    Vacuum Breaker Valve and 13mm poly pipe laid in garden bed
    Vacuum Breaker and distribution into the dripper lines

    Above you can see the vacuum break valve and the way I ran the 13mm poly pipe to the dripper lines. In hindsight I could have probably made that quite a bit neater if I had used a 4 way cross splitter.
    13mm poly pipes run along wall and on garden bed
    13mm Poly pipes coming through the kitchen wall

     
     
    Flower bed with two 13mm dripper lines running down it
    13mm Dripper lines

     
    flower bed with 13mm dripper line, automatic flush valve and tap
    Flush Valve and a tap I added to ease manual flushing of the lines

     Part 3 – The Controller

    I have long wished for a web interface based watering system controller. I finally found what I was after in OpenSprinkler by Rays Hobby. It is an arduino based sprinkler controller that is fully open. Software and hardware designs are fully available. I ordered one as soon as it was announced and Ray was very helpful in sending it out to me. I was perhaps a little hasty though as I have v1 of the board and its now up to v1.4. From what I can see the main benefits are that the newer board has a better way of connecting the Solenoid terminals so you can easily connect and disconnect the whole lot. I’ve also been experiencing stability issues with my controller. It seems to hang on power on most of the time and only successfully boots ones every 10-20 power cycles. I’ve not yet had time to look into solving those problems.
    The controller lacks a battery backup so once you lose power, you have to re-load the configuration again. Ray came up with a hack to add external battery backup but its not very elegant. More recent versions have built in FTDI so you can program it directly from your computer. Mine requires an ISP programmer to program it and its a bit fiddly to do.
    I have just noticed that the new boards store all settings in the firmware so yet another reason to consider upgrading.
    The video of the 1.4 version seems very good. Especially the ability to manually turn on and off stations which I imagine will be very good for testing.
    I’ll post an update when I make more progress on this project.
  • The Mark Ring in emacs

    Each time you mark with C-<SPC>, Emacs saves the mark in the mark ring.
    You can step back through your mark ring with C-u C-<SPC>.
    You can swap point and mark with C-x C-x.

  • Indenting of comments in emacs-lisp mode

    Emacs-lisp mode indents comments based on the number of semi-colons prefixing them.
    One semi-colon indents to column 40.
    Two semi-colons indent to the same level as the block you are in.
    Three semi-colons indent to wherever you place it and don’t move if you press <TAB>

    ;;; column:
    ;;;34567890123456789012345678901234567890123456789
                                            ; one semi-colon
    (when (some case)
      ;; two semi-colons indents to the appropriate level
      (second line)
      )
    ;; two semi-colons indents to the appropriate level
          ;;; I want this comment to stay right here
    
  • Re-reading the emacs tutorial

    It came upon me to re-read the emacs tutorial. Last time I read it was probably about 17 years ago. Things might have changed since then.
    I picked up two things:
    C-/ is undo and is equivalent to C-_
    C-h c gives you brief help on a keyboard shortcut. I was using C-h k but that opens a new window which can be annoying sometimes.
    C-h t takes you to the tutorial.