* Sending a region to another X application
@ 2014-08-21 15:27 H. Dieter Wilhelm
0 siblings, 0 replies; 2+ messages in thread
From: H. Dieter Wilhelm @ 2014-08-21 15:27 UTC (permalink / raw)
To: help-gnu-emacs
Hello (),
I've written a major mode (https://code.google.com/p/ansys-mode/) for an
obscure programming language (APDL
http://www.ansys.com/Support/Training+Center/Courses/Introduction+to+ANSYS+Mechanical+APDL)
which is used to automate finite element simulations.
At the moment the user is "copy and pasting" code snippets from an Emacs
buffer to the TCL/TK application's "command" text field. The Emacs mode
would be more helpful if one could directly "send" code fragments with a
key binding to the application.
I've no experience with GUI programming and the only idea I've got from
internet investigations, so far, is to utilise an external C program for
sending the data over the X server with the help of libraries like Xlib
or XCB, but there seems to be little documentation. Do you have a
better idea or is this the easiest way to go?
Dieter
--
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Sending a region to another X application
[not found] <mailman.185.1408636859.24723.help-gnu-emacs@gnu.org>
@ 2014-08-21 16:33 ` Buchs, Kevin J.
0 siblings, 0 replies; 2+ messages in thread
From: Buchs, Kevin J. @ 2014-08-21 16:33 UTC (permalink / raw)
To: help-gnu-emacs
Dieter,
This is more of a general programming question than an emacs one, so you
might want to target me off list if you have follow-up questions. Having
some experience with TCL, I know that often a command shell is just a
TCL shell with functions defined for the commands you execute. If you
have such a situation, you can extend that shell with some code that can
accept commands from a network connection, pipe, or even via the X
clipboard. If you have created a major mode in emacs, you know enough to
know that you can talk to these communication channels from emacs lisp
without too much work. Extending the TCL shell is your major task.
As for using X-Window, I've not heard of such a thing done for
inter-application communication, but I suppose it is possible. You want
to generate X events for the keystrokes. It would take some work, so
think books when you are looking for documentation. Maybe some open
source GUI testing program could give you some pointers. I wouldn't
choose to go this route, however.
Kevin Buchs Research Computer Services Phone: 507-538-5459
Mayo Clinic 200 1st. St SW Rochester, MN 55905
http://mayoclinic.org http://facebook.com/MayoClinic http://youtube.com/MayoClinic http://twitter.com/MayoClinic
On 08/21/2014 11:00 AM, help-gnu-emacs-request@gnu.org wrote:
> Sending a region to another X application
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-21 16:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-21 15:27 Sending a region to another X application H. Dieter Wilhelm
[not found] <mailman.185.1408636859.24723.help-gnu-emacs@gnu.org>
2014-08-21 16:33 ` Buchs, Kevin J.
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).