Wednesday, August 12, 2015

Ironic: Emacs is native on OSX, not Ubuntu

Old News.  Just as troubling as ever.

I have yet to find a GNU/Linux distro on which Emacs is natively available, out of the box.

Sunday, August 9, 2015

Emacs tool for browsing audio files

In this post on another blog of mine I posted emacs lisp code for a tool, which I boldly stole from dired-mplayer: dired-vlc.  Vlc is an excellent video player.  The code I posted allows one to rapidly and immediately play a video file/clip in Emacs dired, the directory browsing tool that I like the best. 

I have some video files, wav and mp3, and I wish to sort them.  So I edited the above mentioned code, and saved it to the file dired-audacious.el.  It was unbelievably easy and speedy to browse through the dozens of files, and delete the unwanted ones. 

In the above linked post, I mentioned another tool I cobbled together from other people's code, an improvement to org-mode's time marking code, to enable me to save a time mark within the video I am watching and type notes.  From these I have been able to easily compile indexes to videos and clips, for teaching purposes.  Dired-vlc was crucial. 

Here is the code for dired-audacious.  It works only if one runs linux and has audacious installed as a sound player.  

;==== %<===== Begin dired-audacious.el  =========
(require 'org)

(defvar dired-audacious-program "/usr/bin/audacious")

(defun dired-audacious (&optional timer)
  "Asynchronously start vlc on file through dired.  If an optional
argument is given (C-u), the org relative timer is started.  This
function purports to start vlc in rc mode, to leave open the
possibility of remote control."
  (interactive "P")
  (let ((file (expand-file-name (dired-get-filename)))
        ext files basename dir curr-file ;idx-file sub-file srt-file
    command options)
    (setq basename (file-name-nondirectory
            (file-name-sans-extension file)))
    (setq dir (file-name-directory file))
    (setq files (directory-files dir t basename))
    (delete file files)
    (setq command (format "\"%s\" \"%s" dired-audacious-program "--intf rc"))
    (if (y-or-n-p (format "Run command %s?" command))
        (start-process "junk" nil dired-audacious-program file)))
  (if (equal timer '(4)) (org-timer-start))

;; end dired-audacious.el

For explanation, please contact me

Search: Pencil Point Protectors

In days of yore, metal pencil caps were found at an art supply store.  I want some.  Amazingly, like most truly useful things, they are not easy to find.  Today is not the first day I have enlisted Google to search for some, or some way to make them.  Here's a little of what I found.  Dick Blick's art supply has some, at least online.

  • Plastic Save-A-Point pencil caps.   These are all I found at Aaron Brothers.  They are crap.  Do not buy them unless you only sharpen pencils with a cheap plastic hand held sharpener.  The well sharpened point will protrude through the small hole at the point of the cap, and be easily broken off, or poke you.  
  • DIY Paper point protectors 
  • Jetpen has three or four varieties of point protectors
  • Maybe Dick Blicks would have metal ones
  • Plastic models (General Pencil?) at Aaron Brothers
  • I think there may be a design on thingaverse for 3D printers.