From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Spiers Subject: Re: hotkeys for org in gnome Date: Mon, 17 Dec 2007 15:19:44 +0000 Message-ID: <20071217151944.GG13112@atlantic.linksys.moosehall> References: <20071216113348.GE13112@atlantic.linksys.moosehall> Reply-To: Adam Spiers Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MGYHOYXEY6WxJCY8" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J4Hl3-0001Ft-MF for emacs-orgmode@gnu.org; Mon, 17 Dec 2007 10:19:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J4Hl1-0001Es-Gl for emacs-orgmode@gnu.org; Mon, 17 Dec 2007 10:19:52 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4Hl1-0001Eb-AQ for emacs-orgmode@gnu.org; Mon, 17 Dec 2007 10:19:51 -0500 Received: from mail.beimborn.com ([70.84.38.100]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J4Hl0-0002L4-I6 for emacs-orgmode@gnu.org; Mon, 17 Dec 2007 10:19:51 -0500 Received: from mail.beimborn.com (localhost.localdomain [127.0.0.1]) by mail.beimborn.com (8.12.11.20060308/8.12.8) with ESMTP id lBHFJj6A000577 for ; Mon, 17 Dec 2007 09:19:45 -0600 Received: from localhost (localhost [[UNIX: localhost]]) by mail.beimborn.com (8.12.11.20060308/8.12.11/Submit) id lBHFJi00000572 for emacs-orgmode@gnu.org; Mon, 17 Dec 2007 15:19:44 GMT Content-Disposition: inline In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Dec 16, 2007 at 10:26:40PM +0530, Rustom Mody wrote: > On Dec 16, 2007 5:03 PM, Adam Spiers wrote: > > : > > : > > Returning the favour: http://xmacro.sourceforge.net/ > > Could you make it work? I could not (about 20 minutes of trying) > Seems worthwhile but a bit ancient Yes, got it working in the end. Found a few patches lying around the web to fix various things, so it compiles cleanly now. You can use mercurial to do a hg clone of my repository from http://www.adamspiers.org/cgi-bin/hg.cgi/xmacro/ There appears to be a complete lack of sanity checking of the input you feed it, so for example echo "KeyStr Escape" | ./xmacroplay :0 works great, but echo "KeySym Escape" | ./xmacroplay :0 will blow up in your face. Attached is an example script which I have bound to Win-a in openbox. --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=org-agenda #!/bin/sh if [ -z "$DISPLAY" ]; then echo "$0: no DISPLAY" >&2 exit 1 fi if ! wmctrl -a emacs; then echo "$0: wmctrl failed" >&2 exit 1 fi # It seems there is some kind of timing issue which requires this # sleep - probably we have to ensure that wmctrl has finished # switching before feeding the command to emacs. sleep 0.2 if true; then # Use M-x org-agenda; works regardless of key-binding or current # buffer. Also Escape should be more portable than Meta_L etc. xmacroplay $DISPLAY </dev/null KeyStr Escape String xorg-agenda KeyStr Return EOF else # Another way of doing it since I bind C-c C-a to `org-agenda', # but this only works if the current emacs buffer is in org-mode. xmacroplay $DISPLAY </dev/null KeyStrPress Control_L String ca KeyStrRelease Control_L EOF fi --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --MGYHOYXEY6WxJCY8--