I'll have one last go because I still can't connect people's answers to my 
question, but for me this isn't a subject of great importance.

On 1 Oct 2004, Ted Zlatanov wrote:

> On Thu, 30 Sep 2004, [EMAIL PROTECTED] wrote:
> 
> > Just to be clear: what I currently do using emacsclient takes care of
> > opening the file in the current emacs window. However, that window isn't
> > the currently displayed window of the frame. What I want to do is
> > have Ion switch to this currently existing emacs window, which is now
> > visiting the file. (You can debate whether this is what I should want to
> > do, but that's a separate issue.) AFAICS, this intrinsically requires
> > either the shell command or the emacs itself to be able to tell ion `make
> > "emacs" the active window in this frame', and this isn't possible. (let me
> > know if any of this is wrong.)
> 
> Do you mean *switch* or *show*?  If you just want to pop to the Emacs
> window, you could attach it to the current frame (NB: because of Ion's
> frames, I'm calling Emacs' frames "windows").  To switch to it is
> harder - I usually just keep Emacs in one workspace so I can hard-code
> switching to that workspace as "switch to Emacs" in code and in my
> brain.

There are some subtle distinctions that you're making that mean I still 
can't tell what the basic answer is. To try and state the question really 
explicitly:

I've got a WIonWS workspace with one frame in it, with an emacs running in
server mode with a single X Window and an xterm. The xterm window is the
visible window in the frame. I execute a command in the xterm which,
amongst potentially other things, uses emacsclient to visit a file in the
emacs. The input events that I perform to execute the command are typing
ordinary characters into the xterm and pressing enter. If I require that
those be the ONLY input associated with my desire `I want to edit the
files I get via running this command' (i.e., I DON'T then press some Ion
keybinding afterwards), can I cause for the emacs window to become the
visible window in the frame? It's ok for the command to invoke some
moderately complicated script, or write to a file or pipe, or anything
like that, but the two conditions are:

* the command has to be run in the `context' of the shell in the xterm,
because it may involve type globbing, piping stuff in from grep, history,
etc. This seems to require the input to be into the xterm, although if
there's some clever way to get the context of the xterm shell in an ion
input window that's ok.

* the ONLY input event is the typing of the command

(I've already said that it's not that much extra work for me to use an
easy ion keybinding that does something clever to switch to the emacs
window after typing the command in the xterm; for the purposes of this
question I'm a masochist who just won't do that.)

> As I said, if you're doing the xterm <-> Emacs shuffle a lot try Dired
> in Emacs, you won't be disappointed.

I'm probably dense, but I still don't quite see emacs dired as solving the
problems raised by the way I work. I'm in an xterm which is in a directory
where I haven't edited anything previously so there's no emacs dired
buffer for that window yet.  I'm, e.g., running commands, grepping for
stuff, using cdrecord, checking stuff with an interactive interpreter,
doing all kinds of normal stuff that terminals seem to me to be quite good
for. Suddenly, I figure out I want to edit the set of files matching a
particular typeglob "f*.cc q*a*.hh". I can get the files into emacs by
typing

e f*.cc q*a*.hh

(as I've got e is aliased to emacsclient). Other than Matthieu Moy's
suggestion of actually having a shell in emacs, I don't see how to use
emacs facilities such as dired in a way to make my work-flow easier.

-- 
__cheers, dave____________________________________________
www.inf.ed.ac.uk/people/staff/David_Tweed.html
tel: +44 131 651 3447  fax: +44 131 651 3435
X wrote a book about this, which Y was carrying around for
a long time with little discernible effect -- John Baez


Reply via email to