From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Spiers Subject: Re: hotkeys for org in gnome Date: Mon, 24 Dec 2007 01:02:16 +0000 Message-ID: <20071224010216.GB5797@atlantic.linksys.moosehall> References: <20071217152035.GH13112@atlantic.linksys.moosehall> <18278.39083.265689.69826@gargle.gargle.HOWL> <87ejde7mmf.fsf@bzg.ath.cx> Reply-To: Adam Spiers Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J6bi1-0003HC-KY for emacs-orgmode@gnu.org; Sun, 23 Dec 2007 20:02:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J6bi1-0003H0-BO for emacs-orgmode@gnu.org; Sun, 23 Dec 2007 20:02:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J6bi1-0003Gx-2x for emacs-orgmode@gnu.org; Sun, 23 Dec 2007 20:02:21 -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 1J6bi0-0007oL-JX for emacs-orgmode@gnu.org; Sun, 23 Dec 2007 20:02:20 -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 lBO12JIf023095 for ; Sun, 23 Dec 2007 19:02:19 -0600 Received: from localhost (localhost [[UNIX: localhost]]) by mail.beimborn.com (8.12.11.20060308/8.12.11/Submit) id lBO12JJC023090 for emacs-orgmode@gnu.org; Mon, 24 Dec 2007 01:02:19 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 On Sat, Dec 22, 2007 at 11:30:52PM +0530, Rustom Mody wrote: > On Dec 22, 2007 9:22 PM, Bastien wrote: > > "Eric Schulte" writes: > > > > > On Monday, December 17, at 15:20, Adam Spiers wrote: > > > > On Mon, Dec 17, 2007 at 10:27:40AM +0400, Dmitri Minaev wrote: > > > > > On Dec 15, 2007 8:34 AM, Rustom Mody wrote: > > > > > > I was wondering if there is some way that in addition to activating > > > > > > emacs it is possible to run remember [snipped] > I guess that there are -- broadly speaking -- 3 ways of handling this: > > 1. A programmable window manager > 2. Generating arbitrary sequence of events by stuffing the > corresponding keys into the window manager using (something like) > xrecord > 3. Using emacs' own clientserver setup ie emacsclient > > I have as of now opted for the 3rd option. My setup is as follows: > > .emacs has the following: > > (server-start) > (defun myserver () > (raise-frame) > (make-frame-visible) > (remember)) > > gconf-editor->apps->metacity->keybindings->command_1 has the binding: > > bash -c "wmctrl -a emacs; emacsclient -n -e '(myserver)'" > Actually it has > bash -c "wmctrl -a emacs-snapshot-gtk; emacsclient.emacs-snapshot -n > -e '(myserver)'" > because of debian peculiarities with respect to emacs 22. > > And gconf-editor->apps->metacity->global-keybindings has run_command_1 > bound to the keystroke e ie Win-e Nice. I'm currently on the 2nd option as documented in a post a few days again, but there's very little difference; in fact it could well be worth me switching to the emacsclient approach as there are a few minor issues with using xmacro. > Note that this is not quite satisfactory to me because the raise-frame > and the make-frame-visible are both redundant and insufficient. You lost me there. .emacs is only run at startup, after which the window manager can do anything it wants with the positioning and visibility of the frames - or was that your point? > Which is why I need the wmctrl. Which is why I need the bash -c. Right. I'm using -c as well. > If anyone finds a way of streamlining this please post it! If it's the -c you don't like, you can always dump the commands in a script. That's nice because it gives you more breathing space to do things like error checking on the exit code of the wmctrl.