[Top][All Lists]

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

[Orgmode] Re: OT: remember'ing from other programs with stumpwm

From: Nikos Apostolakis
Subject: [Orgmode] Re: OT: remember'ing from other programs with stumpwm
Date: Thu, 05 Jul 2007 08:17:16 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux)

"Dmitri Minaev" <address@hidden> writes:

> Obviously, one thing is missing here -- the URL. Unfortunately, I
> couldn't find a way to retrieve it from Firefox programmatically.

This may not be what you want but there is Conkeror, an emacs-like
keyboard-driven version of firefox.  In Conkeror the
"copy-current-url" is bund to "c".  So, if I understood your code
correctly you would have to add a few lines like

  (window-send-string (current-window) "c")

to copy the URL to the x-clipboard and later
  (window-send-string (current-window) (kbd "C-y"))
to copy the clipboard to the relelevant emacs buffer.

> To get all this working, I just had to set up remember-mode
> (shamelessly copying the instructions from the org-mode manual) and to
> add the following into ~/.stumpwmrc file:
> (define-stumpwm-command "emacs-remember" ()
>  (let ((window-name (if (current-window) (window-title
> (current-window)) "No current window")))
>    (run-or-raise "emacs" :class "Emacs")
>    (send-meta-key (current-screen) (kbd "M-x"))
>    (window-send-string (current-window) "org-remember")
>    (send-meta-key (current-screen) (kbd "RET"))
>    (window-send-string (current-window) "f")
>    (window-send-string (current-window) window-name)
>    (send-meta-key (current-screen) (kbd "RET"))
>    (window-send-string (current-window) (get-x-selection))))
> (define-key *top-map* (kbd "F12") "emacs-remember")

For some time I've been considering to switch to stumpwm from
ratpoison.  The naturality of the above (at least in the eyes of an
emacs user) finally did it.  I am now determined that in a week that
I'll be back home I'll try stumpwm.  Thanks for posting this (even
though it's OT).


reply via email to

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