From: Kai Grossjohann <kai@emptydomain.de>
Subject: Re: Setting gdb to use eshell buffer
Date: Wed, 17 Dec 2003 20:17:25 +0000 [thread overview]
Message-ID: <878ylb2o8a.fsf@emptyhost.emptydomain.de> (raw)
In-Reply-To: mailman.426.1069464439.399.help-gnu-emacs@gnu.org
ncohen@ucsd.edu writes:
> Hi I'm using tramp to successfully transparently edit remote files
> however I also want to compile and debug them from inside emacs.
> How do I do this?
With difficulty :-/
Tramp comes with a file tramp-util.el which contains a function that
allows you to do remote compiles. It is, however, a fake, because it
doesn't show any output until the remote compile is finished. (M-x
compile RET shows you output as it is arriving.) And what's more,
Emacs is frozen while it is waiting for the compile to finish.
I'm thinking about extending Tramp to allow background processes. I
think that Tramp needs to open multiple connections to the remote host
to do that. (If somebody has other ideas, please speak up.) And if
you open multiple connections to a host, then password caching becomes
interesting. And password caching is potentially very dangerous.
Also, it would make sense to reuse connections, instead of opening a
new connection whenever you issue a new compile command.
> I'm wondering if there is a way to 'point' the emacs gdb process to
> a shell that is currently running as a process 'inside'(?) emacs.
> Then I could use eshell to connect to a remote machine, and then
> issue either a gdb command in eshell and somehow have emacs-gdb take
> control of the buffer, or issue a gdb command in emacs and have it
> issue the command to the eshell (so the remote gdb will start).
I think it should be possible to have GUD take control of an already
existing buffer that's running GDB. But I don't know how to do that.
Maybe GUD is not designed for this, so it could be difficult.
But using eshell to "connect" to a remote machine seems a bit
strange. Either you are using "cd /user@host:/path/to/dir" to do this
connection. In that case, it's all fake -- no actual process is
involved. Whenever you type something into eshell, then eshell will
run that command as a shell command. And Tramp intercepts the
shell-command action for its directories, so it kinda appears as if
eshell was "connected" to the remote machine. But it isn't, really.
The other possibility is that you are invoking ssh at the eshell
prompt. That won't do much good, since eshell does not have good
facilities for interacting with subprocesses. (The facilities aren't
that bad, but eshell wasn't designed for it.)
The third possibility is you're talking about M-x shell RET and not
M-x eshell RET. In that case, everything is different ;-) But it
remains difficult to use Tramp for compilation.
Kai
next parent reply other threads:[~2003-12-17 20:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.426.1069464439.399.help-gnu-emacs@gnu.org>
2003-12-17 20:17 ` Kai Grossjohann [this message]
2004-01-25 14:08 ` Setting gdb to use eshell buffer Ulrich Herbst
2004-01-31 20:15 ` Kai Grossjohann
2004-01-26 23:14 ` Kevin Rodgers
2004-01-31 20:14 ` Kai Grossjohann
2004-02-02 22:45 ` Kevin Rodgers
2004-02-03 8:26 ` Kai Grossjohann
2004-02-03 16:23 ` Stefan Monnier
2004-02-05 7:53 ` Kai Grossjohann
2003-11-22 0:24 ncohen
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878ylb2o8a.fsf@emptyhost.emptydomain.de \
--to=kai@emptydomain.de \
/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.
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).