emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] hotkeys for org in gnome


From: Adam Spiers
Subject: Re: [Orgmode] hotkeys for org in gnome
Date: Mon, 24 Dec 2007 01:02:16 +0000
User-agent: Mutt/1.5.14 (2007-02-12)

On Sat, Dec 22, 2007 at 11:30:52PM +0530, Rustom Mody wrote:
> On Dec 22, 2007 9:22 PM, Bastien <address@hidden> wrote:
> > "Eric Schulte" <address@hidden> 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 <address@hidden> 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 <mod4>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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]