emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nikos Apostolakis <nikos.ap@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: OT: remember'ing from other programs with stumpwm
Date: Thu, 05 Jul 2007 08:17:16 -0400	[thread overview]
Message-ID: <87odirt583.fsf@Sullivan.bcc.cuny.edu> (raw)
In-Reply-To: b6c377310707042239u380eaafcyd9f3f55406f681ba@mail.gmail.com

"Dmitri Minaev" <minaev@gmail.com> 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).

HTH,
Nikos

  reply	other threads:[~2007-07-05 12:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-05  5:39 OT: remember'ing from other programs with stumpwm Dmitri Minaev
2007-07-05 12:17 ` Nikos Apostolakis [this message]
2007-07-05 18:45 ` Scott Jaderholm
2007-07-05 20:49   ` Dmitri Minaev
2007-07-06  6:17     ` Dmitri Minaev
2007-07-06 11:24     ` Jason F. McBrayer
2007-07-06 12:28       ` Dmitri Minaev
2007-07-06 13:12         ` Jason F. McBrayer

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=87odirt583.fsf@Sullivan.bcc.cuny.edu \
    --to=nikos.ap@gmail.com \
    --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).