unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Is it possible to use another GUI client and connect it to Emacs?
@ 2015-03-27  4:58 Tu, Do
  2015-03-27 10:11 ` Xavier Maillard
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Tu, Do @ 2015-03-27  4:58 UTC (permalink / raw)
  To: help-gnu-emacs

For example, is it possible for me to write a package that connects Emacs from Firefox and exchange messages, so that I can manipulate texts and Firefox layout directly from headless Emacs server?

Firefox is just an example. In general, I want to create a client that sends messages to Emacs daemon and receive back messages that tell my client how to manipulate my GUI objects and my client then starts handling based on the instructions. Currently, how easy it is to implement something like that?


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

* Re: Is it possible to use another GUI client and connect it to Emacs?
  2015-03-27  4:58 Is it possible to use another GUI client and connect it to Emacs? Tu, Do
@ 2015-03-27 10:11 ` Xavier Maillard
  2015-03-27 18:52 ` Jacob Gerlach
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Xavier Maillard @ 2015-03-27 10:11 UTC (permalink / raw)
  To: Tu, Do; +Cc: help-gnu-emacs

Hi,

Tu, Do <solidius4747@gmail.com> writes:

> For example, is it possible for me to write a package that connects
> Emacs from Firefox and exchange messages, so that I can manipulate
> texts and Firefox layout directly from headless Emacs server?

Your GNU emacs has been built with dbus support, that should be
pretty simple, I guess.

Regards
-- Xavier.



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

* Re: Is it possible to use another GUI client and connect it to Emacs?
  2015-03-27  4:58 Is it possible to use another GUI client and connect it to Emacs? Tu, Do
  2015-03-27 10:11 ` Xavier Maillard
@ 2015-03-27 18:52 ` Jacob Gerlach
  2015-03-27 22:29 ` Stefan Monnier
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Jacob Gerlach @ 2015-03-27 18:52 UTC (permalink / raw)
  To: Tu, Do; +Cc: help-gnu-emacs

On Fri, Mar 27, 2015 at 12:58 AM, Tu, Do <solidius4747@gmail.com> wrote:
> For example, is it possible for me to write a package that connects Emacs from Firefox and
> exchange messages, so that I can manipulate texts and Firefox layout directly from headless
>  Emacs server?

Are you talking about controlling Firefox or just using emacs to edit
text fields?

I believe the latter has been done for both Firefox [1] and Chrome [2].

Regards,
Jake

[1] https://aloiroberto.wordpress.com/2010/01/23/how-to-integrate-firefox-and-emacs/
[2] http://wikemacs.org/wiki/Edit_with_Emacs



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

* Re: Is it possible to use another GUI client and connect it to Emacs?
  2015-03-27  4:58 Is it possible to use another GUI client and connect it to Emacs? Tu, Do
  2015-03-27 10:11 ` Xavier Maillard
  2015-03-27 18:52 ` Jacob Gerlach
@ 2015-03-27 22:29 ` Stefan Monnier
  2015-03-30  8:13   ` Thierry Volpiatto
  2015-03-27 22:46 ` Pascal J. Bourguignon
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2015-03-27 22:29 UTC (permalink / raw)
  To: help-gnu-emacs

> For example, is it possible for me to write a package that connects Emacs
> from Firefox and exchange messages, so that I can manipulate texts and
> Firefox layout directly from headless Emacs server?

Of course.  E.g. you can run "emacsclient --eval <exp>" and it will
execute that expression and return the value.

Or you can setup a TCP connection.

Or you can use dbus.

Not sure what will turn out to be easier from Firefox,


        Stefan




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

* Re: Is it possible to use another GUI client and connect it to Emacs?
  2015-03-27  4:58 Is it possible to use another GUI client and connect it to Emacs? Tu, Do
                   ` (2 preceding siblings ...)
  2015-03-27 22:29 ` Stefan Monnier
@ 2015-03-27 22:46 ` Pascal J. Bourguignon
  2015-03-30  6:46 ` Tu, Do
  2015-03-30 16:19 ` Phillip Lord
  5 siblings, 0 replies; 8+ messages in thread
From: Pascal J. Bourguignon @ 2015-03-27 22:46 UTC (permalink / raw)
  To: help-gnu-emacs

"Tu, Do" <solidius4747@gmail.com> writes:

> For example, is it possible for me to write a package that connects
> Emacs from Firefox and exchange messages, so that I can manipulate
> texts and Firefox layout directly from headless Emacs server?
>
> Firefox is just an example. In general, I want to create a client that
> sends messages to Emacs daemon and receive back messages that tell my
> client how to manipulate my GUI objects and my client then starts
> handling based on the instructions. Currently, how easy it is to
> implement something like that?


With X11, it is possible to create a X window inside another X window,
even if it doesn't belong to the same process.

Therefore, it would be possible to have emacs create an emacs frame
inside another program X window.

Unfortunately, the API to do that is not exported at the elisp level.  A
patch to emacs would be required, and of course, the hosting application
would have to be modified to invoke emacs for its text editing areas.


X11 is under-exploited.

-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk


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

* Re: Is it possible to use another GUI client and connect it to Emacs?
  2015-03-27  4:58 Is it possible to use another GUI client and connect it to Emacs? Tu, Do
                   ` (3 preceding siblings ...)
  2015-03-27 22:46 ` Pascal J. Bourguignon
@ 2015-03-30  6:46 ` Tu, Do
  2015-03-30 16:19 ` Phillip Lord
  5 siblings, 0 replies; 8+ messages in thread
From: Tu, Do @ 2015-03-30  6:46 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks everyone for your hints. It's sufficient for me.


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

* Re: Is it possible to use another GUI client and connect it to Emacs?
  2015-03-27 22:29 ` Stefan Monnier
@ 2015-03-30  8:13   ` Thierry Volpiatto
  0 siblings, 0 replies; 8+ messages in thread
From: Thierry Volpiatto @ 2015-03-30  8:13 UTC (permalink / raw)
  To: help-gnu-emacs

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> For example, is it possible for me to write a package that connects Emacs
>> from Firefox and exchange messages, so that I can manipulate texts and
>> Firefox layout directly from headless Emacs server?
>
> Of course.  E.g. you can run "emacsclient --eval <exp>" and it will
> execute that expression and return the value.

The problem is how to call emacsclient from firefox.
You have for this to setup a new protocol in firefox, which is not
allowed by firefox, you can workaround this by creating yourself the new
protocol with this small library:

https://github.com/thierryvolpiatto/firefox-protocol

You can then use a bookmarklet to call your script using emacsclient.

I actually use this to show my firefox bookmark list in emacs and to
bookmark web pages in regular emacs bookmarks.

Hope that help.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




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

* Re: Is it possible to use another GUI client and connect it to Emacs?
  2015-03-27  4:58 Is it possible to use another GUI client and connect it to Emacs? Tu, Do
                   ` (4 preceding siblings ...)
  2015-03-30  6:46 ` Tu, Do
@ 2015-03-30 16:19 ` Phillip Lord
  5 siblings, 0 replies; 8+ messages in thread
From: Phillip Lord @ 2015-03-30 16:19 UTC (permalink / raw)
  To: Tu, Do; +Cc: help-gnu-emacs

"Tu, Do" <solidius4747@gmail.com> writes:

> For example, is it possible for me to write a package that connects Emacs from
> Firefox and exchange messages, so that I can manipulate texts and Firefox
> layout directly from headless Emacs server?

Well, the general way to let anything accept connections from firefox,
and have the messages affect the layout of firefox is to use the HTTP.
So, have your Emacs server run elnode or the web-server package and you
are away.

Another option would be to use one of the JS repls that are around. The
REPL runs on the browser but displays in Emacs.

Phil






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

end of thread, other threads:[~2015-03-30 16:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-27  4:58 Is it possible to use another GUI client and connect it to Emacs? Tu, Do
2015-03-27 10:11 ` Xavier Maillard
2015-03-27 18:52 ` Jacob Gerlach
2015-03-27 22:29 ` Stefan Monnier
2015-03-30  8:13   ` Thierry Volpiatto
2015-03-27 22:46 ` Pascal J. Bourguignon
2015-03-30  6:46 ` Tu, Do
2015-03-30 16:19 ` Phillip Lord

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).