More Apple X11.app wierdness
When you are running your own window manager (and with the quartz-wm in proxy mode for the clipboard support), expoze works with X11 windows. Amazing!
Well, sort of. It throws around all the windows correctly; and when you click one it comes to the top; but it doesn't change X11's window stacking order because front clicks are sent through to the window that used to be on top instead of the one that Quartz has now placed on top. 09:02 AM, 23 Aug 2004 by Mark Aufflick Permalink | Short Link | Comments (0) Sensible Emacs usage with Apple's XCode
The new version of Apple's XCode mercifully allows you to use an external editor, and the integration seems to be quite thorough. Of course for the old time Mac users there is BBEdit integration. I was a big BBEdit fan before I became a Unix-head (which was well before MacOS X).
But hallelujah, XCode supports emacs integration! And, it's quite smart - but yet not quite smart enough :/ It uses my all time favourite gnuserv/gnuclient (with the gnuserv-compat.el library so it can run in GNU emacs), and Apple have put a Darwin compatible gnuserv binary in /usr/bin/gnuserv. This is handy even if you (like me) run fink installed emacsen. But this is a Mac, so you don't want terminal emacs... Carbon emacs is nice, but I want to use X11 GNU Emacs. Problem is, the way XCode interacts with gnuclient is a bit annoying. First up, it executes /usr/bin/emacs with no arguments inside a Terminal.app window. You have to configure your .emacs file to start gnuserv-start as per these release notes. One easy thing you can do, is start gnuserv by hand in your X version (M-x gnuserv-start) and not in your .emacs file. Then, when you double click a file in XCode, it will start a (useless) console emacs, and use gnuclient to open the file in your X11 Emacs. So far so good - but two emacs processes is heavy, so i replaced /usr/bin/emacs with a hard link to /usr/bin/true ;) See Update 3 below for the right way to do this! This only leaves two problems:
The emacs support seems hard coded - I can't find any scripts that do the work to hack away at. Maybe I can replaec Terminal.app with an AppleScript compiled .app that ignores the calls that XCode is making and thus just leave the gnuclient calls (which appears to be executed by XCode directly - not via Terminal.app), but also to tell X11.app to come to the foreground when (the new) Terminal.app is asked to go to the foreground. Seems like a lot of work. And I don't do any commercial Mac development, so I probably won't bother! Annoying though... UPDATE It seems the link to /usr/bin/true didn't work - XCode must realise that emacs wasn't started. What does work though is to move aside /usr/bin/emacs and replace it with a symlink to your X11 version (eg. /sw/bin/emacs-21.2). Still have both of the bulleted problems abouve though. Then I had the great idea to move gnuclient to gnuclient-bin, replace gnuclient with dtemacs (hard coding DISPLAY to :0.0). I thought it might fail if XCode exec-ed the binary directly, but it didn't seme to make any difference, so perhaps the gnuclient protocol is coded into XCode?? If an Apple developer on the XCode team reads this - please give us an option to tune the system calls for emacs :) UPDATE 2 Ok, so this is REALLY bogus, but if the bazillion Terminal windows annoy you, here is what you can do:
Unfortunately you will have to repeat these steps every time. Also, if you symlink X11.app to Terminal.app it will get raised, but none of it's windows will so that kinda defeats the purpose. If the next version of XCode doesn't help, I'll come up with some Applescript wizardry for a replacement .app and a script menu entry to do all the stupid renaming etc. UPDATE 3 You can actually tell Xcode which emacs binary to start up using the Expert preferences. Simply run the following in a shell with the path to your custom installed emacs: defaults write com.apple.Xcode PBXEmacsPath /opt/bin/emacs Still doesn't address the Terminal problem though. 02:13 AM, 23 Aug 2004 by Mark Aufflick Permalink | Short Link | Comments (2) Trackpad scrolling for Mac Laptops [www.ragingmenace.com]
For some time now, high end Wintel laptops (Toshiba ones at least) have had a sexy feature that makes the far right and bottom of your trackpad to function like a scroll wheel. In other words, if you stroke up and down the far right edge of your trackpad, your current window scrolls up and down.
It's even more addictive than a scroll wheel since your trackpad is right under your hands at all times. Well, now you can get this on your OSX Mac laptop as well thanks to a very smart Control Panel called SideTrack from Alex Harper (RagingMenace.com<.a>). It's currently in public Beta, but I have yet to see any SideEffects on my original TiBook running Panther.5 This guy also provided some enhancements to uControl—another of my (very few) essential OSX addons. 02:08 PM, 18 Aug 2004 by Mark Aufflick Permalink | Short Link | Comments (0) Emacs on MacOS X goodness
First, thanks to XCode 1.5's support for external editors, my desire to start writing some Mac software doesn't mean I have to learn YAE (yet another editor).
However, coercign Xcode to talk to a running X11 emacs using gnuserv seems to be tricky, so I'm investigating Aqua emacs. Apparently cvs builds of emacs can now generate a .dmg emacs installer for Aqua. My cvs tree is still downloading so we will see. Since Applescript is still handy even on OSX, the emacs lisp functions to call applescript from within emacs may be useful (on Steve Wainstead's advogato blog). Elsewhere on Steve's blog is an excellent lisp func that starts tailing a logfile in a new shell buffer and frame in one easy step (here). Many more great tips here: http://www.emacswiki.org/cgi-bin/wiki/MacOSTweaks 05:19 PM, 15 Aug 2004 by Mark Aufflick Permalink | Short Link | Comments (0) Logged Query Analysis for Postgres [pqa.projects.postgresql.org]
This is absolutely legendary. Very simply, pqa analyses your postgres logfile (after tweaking the logging level a bit in your postgresql.conf) to produce reports on:
Very simple - but very beneficial when you have to optimise a large amount of code pumping the database as fast as it can. The biggest deficiency it has is that it doesn't log which database is involved - I'll take a look at the code and the logs to see if that is possible, but it's written in ruby... Maybe I should port it to perl, but then I'd have to maintain it... 05:08 PM, 13 Aug 2004 by Mark Aufflick Permalink | Short Link | Comments (0) Web CMS Face-Off [www.eweek.com]
This face-off between opensource perl Bricolage, InterWoven TeamSite and others gives Bricolage a good wrap.
Bricolage rated as many "Good" and "Excellent" rankings as TeamSite and it's "Cons" section was shorter. So why would anyone shell out $40k USD for TeamSite? It's not like their support is amazing or that its easier to find TeamSite developers than Perl/Mason developers... 11:23 AM, 12 Aug 2004 by Mark Aufflick Permalink | Short Link | Comments (0) PowerPC : An Architectural History [arstechnica.com]
This is brilliant! Part 1 of 3, this article looks at the first PPC ship, the 601, and how it was designed to bridge from POWER to PowerPC, then continues to cover the rest of the 60x line.
If you're into processor design you will love this series. The same author has apparently written a more in depth history of the Pentium line, but I like my processors in RISC thanks ;) 06:18 PM, 05 Aug 2004 by Mark Aufflick Permalink | Short Link | Comments (0) |
Archive
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 Categoriessoftware (39)..cocoa (21) ..heads up 'tunes (5) ..ruby (6) ..lisp (3) ..perl (4) ..openacs (1) mac (20) embedded (2) ..microprocessor (2) ..avr (1) electronics (3) design (1) photography (25) ..black and white (6) ..A day in Sydney (18) ..The Daily Shoot (6) food (2) Book Review (2) Notifications Request notifications
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||








Request notifications