This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: Patch: external editor changes
- To: Tom Tromey <tromey at redhat dot com>
- Subject: Re: Patch: external editor changes
- From: Keith Seitz <keiths at cygnus dot com>
- Date: Tue, 2 Oct 2001 14:30:46 -0700 (PDT)
- cc: Insight List <insight at sourceware dot cygnus dot com>
On 2 Oct 2001, Tom Tromey wrote:
> Do I need separate approval for the main.c change?
Yes, you will. It'll come quickly, though, unless Elena is really swamped.
> + * This variable controls the interaction with an external editor.
> */
> -int enable_external_editor = 0;
> -char *external_editor_command = "tk_dialog .warn-external \\\n\
> -\"No command is specified.\nUse --tclcommand <tcl/file> or --external-editor <cmd> to specify a new command\" 0 Ok";
I won't even pretend to understand how this stuff works. The --tclcommand
option is supposed to just source a tcl file into the interpreter when
Insight is initialized. The testsuite uses this. I guess someone found it
convenient to use for this, too. :-(
> +namespace eval Editor {
<ignorance>
Aside: why a namespace instead of a class?
</ignorance>
> + $popups(source) add command -label "Open Source in external editor" \
> + -command [list $parent edit]
^^^^^^^^^^^^^^^^^^^
<ignorance>
"[list $parent edit]" almost equal to "[code $parent edit]"?
I know that with list you cannot get to non-public methods like you can
with code. Any other diffs? I only ask 'cause I would have used "code"
(out of ignorance).
</ignorance>
You say that you set your external editor command to "emacsclient
--no-wait +%d %s". I presume that %d and %s are substituted with line and
file name, right? Did we ever document this somewhere? (You don't have to
document it, but you might know. Man, I would love to redo the online
documentation. Better yet, I would love to just whack it and move it to a
web page.)
I've tried this out. I entered "xterm - vi %s +%d" and it worked! Hey,
that's pretty cool.
What does emacsclient do? (Now you've got my curiosity peaked.)
One small comment. Something bothers me about how close the new "external
editor" preference is to the preference above it. Can you add some padding
between the two?
Otherwise, I'd say CHECK IT IN!! (And tell me how to use it with XEmacs!)
Keith