Have rvm.el set your emacs rvm environment via .rvmrc
rvm.el enables that same environment to be set (globally) for an emacs process, with functions like rvm-activate-corresponding-ruby.
To get rvm.el to update globally when you cd into a dir in your emacs shell, just add the following to your .rvmrc after the rvm call to set the ruby/gemset:
emacsclient -n --eval '(rvm-activate-corresponding-ruby)'
(which of course assumes that your .emacs has (server-start) or similar).
07:26 AM, 05 Mar 2011 by Mark Aufflick Permalink | Comments (0)
Not in Africa
Not in Africa
Taken as part of The Daily Shoot project. View all Mark's Daily Shoot photos.
Taken with Canon EOS 400D DIGITAL and 24.0 - 85.0 mm on 2011:03:03 10:57:22
- Exposure: 1/25
- Aperture: f4.5
- ISO speed: 800
- Exposure program: Program AE
- Exposure compensation: -1/3
- Flash: Off, Did not fire
- File: _MG_4025.JPG
08:46 PM, 02 Mar 2011 by Mark Aufflick Permalink | Comments (0)
Air Display incompatible with DisplayConfigX
But then back at my desk, Air Display* wouldn't connect to my iPad properly. Taps would reposition the mouse, but no image. The Air Display control panel unhelpfully suggested my router may be blocking UDP.
After rebooting every device involved I had a hunch about DisplayConfigX, and uninstalled all custom display profiles.
Booyah, Air Display back to normal.
Why that is I have no idea. DisplayConfigX doesn't do anything other than alter some config files—in this case, for monitors unrelated to any I run in my office. Because it is so odd I thought I'd post in case I can save anyone else the same confusion.
*Air Display, for those who don't know, is a neat pair of iPad/Mac apps that lets you use one (only) iPad as an extra display on your Mac. Very cool for your Skype/iChat windows, CoverSutra etc. http://avatron.com/apps/air-display
07:37 PM, 02 Mar 2011 by Mark Aufflick Permalink | Comments (0)
Apple Push Notifications Talk—Screen/Audio recording now available
07:00 PM, 02 Mar 2011 by Mark Aufflick Permalink | Comments (0)
Piping to an emacs buffer with emacsclient
My ultimate aim is for a PAGER script to use instead of less in my emacs shell. While this isn't quite perfect for that use, it's still pretty useful.
NB: The code below is probably out of date by the time you read this - see this gist for the latest version that you can clone, fork etc.
#!/usr/bin/perl usestrict; usewarnings; useIO::Select; my$emacsclient = "/usr/local/bin/emacsclient"; # This script uses emacsclient, be sure to have a running server session. # A server-session can be started by "M-x server-start". exit 1 if 0 != system("$emacsclient -n --eval '(progn (pop-to-buffer (get-buffer-create \"*piped*\")))'"); my$s = IO::Select->new; $s->add(\*STDIN); while (1) { # block until data available my$data = <STDIN>; # exit if STDIN closed exit(0) if!$data; # keep reading while data is available, or we have a bunch of lines my$lines = 0; $data .= <STDIN> while$lines++ < 100 && $s->can_read(.5); $data =~ s/"/\\"/g; $data =~ s/'/'\\''/g; $data =~ s/\\/\\\\/g; system(qq{$emacsclient -n --eval '(with-current-buffer "*piped*" (goto-char (point-max)) (insert "} . $data . qq{"))'}); }
06:23 PM, 02 Mar 2011 by Mark Aufflick Permalink | Comments (2)
Archive
| March 2011 | ||||||
| S | M | T | W | T | F | S |
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||
March 2012
February 2012
November 2011
October 2011
April 2011
March 2011
January 2011
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
December 2003
November 2003
October 2003
September 2003
August 2003
Blog Categories
software (40)..cocoa (21)
..heads up 'tunes (5)
..ruby (6)
..lisp (4)
..perl (4)
..openacs (1)
mac (21)
embedded (2)
..microprocessor (2)
..avr (1)
electronics (3)
design (1)
photography (26)
..black and white (6)
..A day in Sydney (18)
..The Daily Shoot (6)
food (2)
Book Review (2)
Notifications
Request notifications







