emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Spiers <orgmode@adamspiers.org>
To: emacs-orgmode@gnu.org
Subject: Re: hotkeys for org in gnome
Date: Mon, 17 Dec 2007 15:19:44 +0000	[thread overview]
Message-ID: <20071217151944.GG13112@atlantic.linksys.moosehall> (raw)
In-Reply-To: <f46c52560712160856u6a2764ccua1fdc502490a07b3@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

On Sun, Dec 16, 2007 at 10:26:40PM +0530, Rustom Mody wrote:
> On Dec 16, 2007 5:03 PM, Adam Spiers <orgmode@adamspiers.org> 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.

[-- Attachment #2: org-agenda --]
[-- Type: text/plain, Size: 839 bytes --]

#!/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 <<EOF >/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 <<EOF >/dev/null
KeyStrPress Control_L
String ca
KeyStrRelease Control_L
EOF

fi

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

  reply	other threads:[~2007-12-17 15:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-15  4:34 hotkeys for org in gnome Rustom Mody
2007-12-16 11:33 ` Adam Spiers
2007-12-16 16:56   ` Rustom Mody
2007-12-17 15:19     ` Adam Spiers [this message]
2007-12-17  6:27 ` Dmitri Minaev
2007-12-17 15:20   ` Adam Spiers
2007-12-17 15:41     ` Eric Schulte
2007-12-22 15:52       ` Bastien
2007-12-22 18:00         ` Rustom Mody
2007-12-24  1:02           ` Adam Spiers
2007-12-24  4:05             ` Rustom Mody
2007-12-24 12:32               ` Adam Spiers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071217151944.GG13112@atlantic.linksys.moosehall \
    --to=orgmode@adamspiers.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).