Re: [Orgmode] hotkeys for org in gnome
Rustom Mody ([EMAIL PROTECTED]) wrote: On Dec 24, 2007 6:32 AM, Adam Spiers [EMAIL PROTECTED] wrote: On Sat, Dec 22, 2007 at 11:30:52PM +0530, Rustom Mody wrote: 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. What I dont like is having to use a shell call for some functionality that is almost certainly available under elisp. Why not? The operation you're talking about (find an emacs, and ensure it is visible and focused) is more related to the window manager and X11 environment, so to me it makes much more sense to use wmctrl than look for some elisp. Plus, wmctrl is easy and already works, so why look for an alternative? I certainly wouldn't class this solution as an ugly hack; the only slightly ugly thing is embedding sh -c somewhere, but as I already pointed out, that is easily surmountable. ___ 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
Re: [Orgmode] hotkeys for org in gnome
On Sat, Dec 22, 2007 at 11:30:52PM +0530, Rustom Mody wrote: On Dec 22, 2007 9:22 PM, Bastien [EMAIL PROTECTED] wrote: Eric Schulte [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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 mod4e 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. ___ 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
Re: [Orgmode] hotkeys for org in gnome
On Dec 24, 2007 6:32 AM, Adam Spiers [EMAIL PROTECTED] wrote: On Sat, Dec 22, 2007 at 11:30:52PM +0530, Rustom Mody wrote: 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. The requirement is this: I should be able to -- with a single keystroke -- to get from any application into emacs into org mode. However make-frame-visible and raise-frame dont quite work: If emacs is iconized it gets de-iconized but if it is already one of the open windows below some other -- firefox, shell, whatever -- it *remains under that with the emacs tab blinking.* As a consequence Ive got to use the mouse (or shuffle through Alt-Tab). wmctrl does the job. But using it makes for two calls -- wmctrl and emacsclient -- and that makes for a packaging under a (inline) shell-script. 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. What I dont like is having to use a shell call for some functionality that is almost certainly available under elisp. ___ 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
Re: [Orgmode] hotkeys for org in gnome
Eric Schulte [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote: I was wondering if there is some way that in addition to activating emacs it is possible to run remember I believe this is one more argument in favor of scriptable window managers. In Stumpwm, Sawfish and, I assume, in Ion it's a trivial task. Agreed! Alas, I was forced to abandon sawfish after its development and maintenance slowed down to a crawl. I've been looking into window managers which can integrate well w/emacs, and it looks like FVWM http://fvwm.org/ is *very* customizable, and it is actively maintained. For those who speak python, I've just discover this new window manager and think it could get along great with Emacs: PycaWM http://pycawm.last-exile.org/ -- Bastien ___ 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
Re: [Orgmode] hotkeys for org in gnome
On Dec 22, 2007 9:22 PM, Bastien [EMAIL PROTECTED] wrote: Eric Schulte [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote: I was wondering if there is some way that in addition to activating emacs it is possible to run remember I believe this is one more argument in favor of scriptable window managers. In Stumpwm, Sawfish and, I assume, in Ion it's a trivial task. Agreed! Alas, I was forced to abandon sawfish after its development and maintenance slowed down to a crawl. I've been looking into window managers which can integrate well w/emacs, and it looks like FVWM http://fvwm.org/ is *very* customizable, and it is actively maintained. For those who speak python, I've just discover this new window manager and think it could get along great with Emacs: PycaWM http://pycawm.last-exile.org/ -- Bastien 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 mod4e ie Win-e Note that this is not quite satisfactory to me because the raise-frame and the make-frame-visible are both redundant and insufficient. Which is why I need the wmctrl. Which is why I need the bash -c. If anyone finds a way of streamlining this please post it! ___ 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
Re: [Orgmode] hotkeys for org in gnome
On Mon, Dec 17, 2007 at 10:27:40AM +0400, Dmitri Minaev wrote: On Dec 15, 2007 8:34 AM, Rustom Mody [EMAIL PROTECTED] wrote: I was wondering if there is some way that in addition to activating emacs it is possible to run remember I believe this is one more argument in favor of scriptable window managers. In Stumpwm, Sawfish and, I assume, in Ion it's a trivial task. Agreed! Alas, I was forced to abandon sawfish after its development and maintenance slowed down to a crawl. ___ 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
Re: [Orgmode] hotkeys for org in gnome
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 [EMAIL PROTECTED] wrote: I was wondering if there is some way that in addition to activating emacs it is possible to run remember I believe this is one more argument in favor of scriptable window managers. In Stumpwm, Sawfish and, I assume, in Ion it's a trivial task. Agreed! Alas, I was forced to abandon sawfish after its development and maintenance slowed down to a crawl. I've been looking into window managers which can integrate well w/emacs, and it looks like FVWM http://fvwm.org/ is *very* customizable, and it is actively maintained. -- schulte ___ 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
Re: [Orgmode] hotkeys for org in gnome
On Sat, Dec 15, 2007 at 10:04:44AM +0530, Rustom Mody wrote: There was a thread here (sorry cant exactly find it) about how when running emacs under windows it has been possible to setup a keyboard shortcut such that from anywhere, any application one can jump to emacs under a remember in org mode. I missed that first time, but what a great idea! Something similar should be possible under gnome. Anyone know how? What I have been able to do so far is that in gconf-editor - apps - metacity - global-keybindings run_command_1 is bound to the key mod4 e (that is WIN e) And in gconf-editor - apps - metacity - keybinding-commands command_1 is bound to wmctrl -a emacs In combination this makes Win e a 'global hotkey' so that from any application under gnome Win-e activates emacs (assuming it is there iconified) Wow, thanks! What a great discovery wmctrl is. I was wondering if there is some way that in addition to activating emacs it is possible to run remember Returning the favour: http://xmacro.sourceforge.net/ ___ 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
Re: [Orgmode] hotkeys for org in gnome
On Dec 16, 2007 5:03 PM, Adam Spiers [EMAIL PROTECTED] 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 ___ 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
Re: [Orgmode] hotkeys for org in gnome
On Dec 15, 2007 8:34 AM, Rustom Mody [EMAIL PROTECTED] wrote: I was wondering if there is some way that in addition to activating emacs it is possible to run remember I believe this is one more argument in favor of scriptable window managers. In Stumpwm, Sawfish and, I assume, in Ion it's a trivial task. -- With best regards, Dmitri Minaev Russian history blog: http://minaev.blogspot.com ___ 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
[Orgmode] hotkeys for org in gnome
There was a thread here (sorry cant exactly find it) about how when running emacs under windows it has been possible to setup a keyboard shortcut such that from anywhere, any application one can jump to emacs under a remember in org mode. Something similar should be possible under gnome. Anyone know how? What I have been able to do so far is that in gconf-editor - apps - metacity - global-keybindings run_command_1 is bound to the key mod4 e (that is WIN e) And in gconf-editor - apps - metacity - keybinding-commands command_1 is bound to wmctrl -a emacs In combination this makes Win e a 'global hotkey' so that from any application under gnome Win-e activates emacs (assuming it is there iconified) I was wondering if there is some way that in addition to activating emacs it is possible to run remember Thanks Rustom ___ 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