# File lib/lowline.rb, line 55
  def run_editor
    f = Tempfile.new "ditz"
    yield f
    f.close

    editor = ENV["EDITOR"] || "/usr/bin/vi"
    cmd = "#{editor} #{f.path.inspect}"

    mtime = File.mtime f.path
    system cmd or raise Error, "cannot execute command: #{cmd.inspect}"

    File.mtime(f.path) == mtime ? nil : f.path
  end