all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* making contents of other programs transparent to Emacs
@ 2004-08-11 14:39 Joe Corneli
  2004-08-11 21:27 ` Milan Zamazal
  0 siblings, 1 reply; 10+ messages in thread
From: Joe Corneli @ 2004-08-11 14:39 UTC (permalink / raw)


This seems like a hard question, and not completely Emacs-specific.

Suppose I wanted to make the contents of e.g. an rxvt or Mozilla
window readable to an Emacs.  What would I need to do?  The text is
available to X (and I can copy and paste it into other programs) so
it also seems that with more work I should be able to treat the text
in these other programs as a read-only Emacs buffer.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: making contents of other programs transparent to Emacs
  2004-08-11 14:39 making contents of other programs transparent to Emacs Joe Corneli
@ 2004-08-11 21:27 ` Milan Zamazal
  0 siblings, 0 replies; 10+ messages in thread
From: Milan Zamazal @ 2004-08-11 21:27 UTC (permalink / raw)


>>>>> "JC" == Joe Corneli <jcorneli@math.utexas.edu> writes:

    JC> Suppose I wanted to make the contents of e.g. an rxvt or Mozilla
    JC> window readable to an Emacs.  What would I need to do?  The text
    JC> is available to X (and I can copy and paste it into other
    JC> programs) so it also seems that with more work I should be able
    JC> to treat the text in these other programs as a read-only Emacs
    JC> buffer.

I'm afraid the X selection mechanism is generally not much help to you,
since the way of selecting something is application specific.

But you might use accessibility features of applications for this, quite
easily.  For instance, if the given application supports AT-SPI, you can
query its contents via the AT-SPI interface.  There's no support for
this in Emacs directly, but there are programs that can do it and you
can call them from Emacs and insert their output into an Emacs buffer.
(Unfortunately, current accessibility support in Mozilla is very poor,
so this won't work for Mozilla now.)

Regards,

Milan Zamazal

-- 
real programmer?  don't get me started.  if you need to hide your
pathetic excuse for a carreer behind super-macho languages like C, C++,
and/or Perl instead of writing clean, maintainable, efficient code, you
aren't much of a real programmer in my view.  -- Erik Naggum in comp.emacs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: making contents of other programs transparent to Emacs
       [not found] <mailman.813.1092235424.2011.help-gnu-emacs@gnu.org>
@ 2004-08-12  2:29 ` Barry Margolin
  2004-08-12  9:59 ` Bruce Ingalls
  1 sibling, 0 replies; 10+ messages in thread
From: Barry Margolin @ 2004-08-12  2:29 UTC (permalink / raw)


In article <mailman.813.1092235424.2011.help-gnu-emacs@gnu.org>,
 Joe Corneli <jcorneli@math.utexas.edu> wrote:

> This seems like a hard question, and not completely Emacs-specific.
> 
> Suppose I wanted to make the contents of e.g. an rxvt or Mozilla
> window readable to an Emacs.  What would I need to do?  The text is
> available to X (and I can copy and paste it into other programs) so
> it also seems that with more work I should be able to treat the text
> in these other programs as a read-only Emacs buffer.

As far as X is concerned, these windows are just pixels -- it doesn't 
keep track of the text.  This is done by the client applications.  
Copying and pasting is done by the application itself; when you use the 
Copy operation, the application sends a message to the X server telling 
it to put the text into the cut-buffer so that other applications can 
get at it.  But there's no way for one application to force another one 
to send it the contents of its window.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: making contents of other programs transparent to Emacs
       [not found] <mailman.813.1092235424.2011.help-gnu-emacs@gnu.org>
  2004-08-12  2:29 ` Barry Margolin
@ 2004-08-12  9:59 ` Bruce Ingalls
  1 sibling, 0 replies; 10+ messages in thread
From: Bruce Ingalls @ 2004-08-12  9:59 UTC (permalink / raw)


Joe Corneli wrote:
> Suppose I wanted to make the contents of e.g. an rxvt or Mozilla
> window readable to an Emacs. 

For console programs, you could always run tee or (type)script, and
read the file/device being output to.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: making contents of other programs transparent to Emacs
       [not found] <38r1iv$3r7l6i@ironman3.mail.utexas.edu>
@ 2004-08-16 17:03 ` Joe Corneli
       [not found] ` <mailman.1442.1092676134.2011.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Joe Corneli @ 2004-08-16 17:03 UTC (permalink / raw)


   > Suppose I wanted to make the contents of e.g. an rxvt or Mozilla
   > window readable to an Emacs. 
   
   For console programs, you could always run tee or (type)script,
   and read the file/device being output to.

I had more of the idea of interactively editing the contents of
other programs.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: making contents of other programs transparent to Emacs
       [not found] ` <mailman.1442.1092676134.2011.help-gnu-emacs@gnu.org>
@ 2004-08-16 17:48   ` Kevin Rodgers
  0 siblings, 0 replies; 10+ messages in thread
From: Kevin Rodgers @ 2004-08-16 17:48 UTC (permalink / raw)


Joe Corneli wrote:
 >    > Suppose I wanted to make the contents of e.g. an rxvt or Mozilla
 >    > window readable to an Emacs.
 >
 >    For console programs, you could always run tee or (type)script,
 >    and read the file/device being output to.
 >
 > I had more of the idea of interactively editing the contents of
 > other programs.

M-x shell
M-x term

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: making contents of other programs transparent to Emacs
@ 2004-08-16 23:22 Joe Corneli
  2004-08-28 14:40 ` Kai Grossjohann
  0 siblings, 1 reply; 10+ messages in thread
From: Joe Corneli @ 2004-08-16 23:22 UTC (permalink / raw)



    > I had more of the idea of interactively editing the contents of
    > other programs.
   
   M-x shell M-x term

Term is in my experience way too slow to be useful for running
e.g. Lynx.  And the above suggestion is of less than dubious utility
for working with programs like Mozilla.

I was not clear about the full mileage I would like to get out of
the idea I'm talking about here.

The general idea is to use Emacs as a "development platform" in a
sense similar to that in which Gnome is a development platform --
but to draw on all the strengths of Emacs.  Specifically, I would
like

  * to be able to select text from any window using familiar Emacs
    editing commands

  * to be able to search for a string across all open X windows

  * to be able to fully script window selection routines and
    keyboard commands to non-Emacs windows

I'm not saying that this would be possible to do with existing
tools, because I don't think it is.  I'm looking for feedback about
the steps that would be needed to make these things possible.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: making contents of other programs transparent to Emacs
  2004-08-16 23:22 Joe Corneli
@ 2004-08-28 14:40 ` Kai Grossjohann
  0 siblings, 0 replies; 10+ messages in thread
From: Kai Grossjohann @ 2004-08-28 14:40 UTC (permalink / raw)


Joe Corneli <jcorneli@math.utexas.edu> writes:

>   * to be able to select text from any window using familiar Emacs
>     editing commands

Well, for terminal programs (not X11), the program screen is cool.  It
allows you to select text from any window using familiar vi editing
commands ;-)  And it offers Emacs-like isearch on C-s and C-r.

But I don't know of anything similar for X11.

It would be way cool, though.  Please do tell about your findings.

Kai

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: making contents of other programs transparent to Emacs
@ 2004-08-28 17:50 Joe Corneli
  0 siblings, 0 replies; 10+ messages in thread
From: Joe Corneli @ 2004-08-28 17:50 UTC (permalink / raw)



   Well, for terminal programs (not X11), the program screen is
   cool.

Yes, I use it a lot, though I haven't spent much time trying to
configure the commands to match my preferences, but I think it can
be easily done.  For now, I've reverted to using the mouse to cut
and paste between programs.

I wonder if it would be possible to hack screen make it so that each
virtual terminal window was also a virtual Emacs buffer; this would
be a concrete step in the direction of making other programs
transparent to Emacs.

I have no progress so far on an Emacs-controlled X11.  

But here is a little background: part of the inspiration for
thinking about this stuff was a hope that the Ratpoison window
manager (which is like screen in many ways) could be more like
screen in terms of text selection.  

It is possible to send commands to Ratpoison from within Emacs, but
if you shift your focus away from Emacs, its game over for that.
(One could write a pretty simple patch to resolve that problem I
think, but this is a far cry from having every keyboard command
filtered through an Emacs process or having the contents of the
other programs available to that process.)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: making contents of other programs transparent to Emacs
       [not found] <mailman.537.1093715759.1998.help-gnu-emacs@gnu.org>
@ 2004-08-30  6:44 ` Mathias Dahl
  0 siblings, 0 replies; 10+ messages in thread
From: Mathias Dahl @ 2004-08-30  6:44 UTC (permalink / raw)


Joe Corneli <jcorneli@math.utexas.edu> writes:

> I have no progress so far on an Emacs-controlled X11.

You know about the XWEM (X Window Emacs Manager)
project (http://www.emacswiki.org/cgi-bin/wiki/XWindowEmacsManager)?

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-08-30  6:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-11 14:39 making contents of other programs transparent to Emacs Joe Corneli
2004-08-11 21:27 ` Milan Zamazal
     [not found] <mailman.813.1092235424.2011.help-gnu-emacs@gnu.org>
2004-08-12  2:29 ` Barry Margolin
2004-08-12  9:59 ` Bruce Ingalls
     [not found] <38r1iv$3r7l6i@ironman3.mail.utexas.edu>
2004-08-16 17:03 ` Joe Corneli
     [not found] ` <mailman.1442.1092676134.2011.help-gnu-emacs@gnu.org>
2004-08-16 17:48   ` Kevin Rodgers
  -- strict thread matches above, loose matches on Subject: below --
2004-08-16 23:22 Joe Corneli
2004-08-28 14:40 ` Kai Grossjohann
2004-08-28 17:50 Joe Corneli
     [not found] <mailman.537.1093715759.1998.help-gnu-emacs@gnu.org>
2004-08-30  6:44 ` Mathias Dahl

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.