[Conkeror] cant invoke external_editor: NS_ERROR_INVALID_POINTER on input.TEXTAREA
Jeremy Maitin-Shepard
jeremy at jeremyms.com
Sun Apr 20 12:51:28 PDT 2008
PILCH Hartmut m7I3JBWBVq1Cc <phm at a2e.de> writes:
>> As Jose suggested, I believe this problem is due to you not having built
>> spawn-process-helper, which is needed to launch external processes from
>> Conkeror.
> Indeed this did it, it works for me now.
>> (It is not exactly your fault that you didn't have it built,
>> as the installation instructions didn't say anything about it.)
>> I just updated the installation instructions on the wiki at
>>
>> http://conkeror.org/Installation
>>
>> to specify to build this program as well.
> It would also be good to mention the 'C-i' command in the
> content/help.html page.
Yes, a lot more information is needed in the help page. If you are
interested in contributing improvements, that would be great.
> Moreover, in
> conkeror/modules/external-editor.js
> a full concrete example on how to write an editor function would be
> helpful.
Well, create_external_editor_launcher provides one example. I'll
provide another (trivial) example here:
// Note that file is not a string, but rather an instance of nsIFile
function my_run_external_editor(file) {
keywords(arguments);
var line_number = arguments.$line;
var temporary = arguments.$temporary;
dumpln("my_run_external_editor\n file: " + file.path +
"\n temporary? " + (temporary? "yes":"no") +
"\n line number: " + (line_number != null ? line_number :
"none specified"));
if (line_number)
yield shell_command("emacs +" + line_number + " \"" +
file.path + "\"");
else
yield shell_command("emacs \"" + file.path + "\"");
if (temporary) file.remove();
}
> When using mozex.mozdev.org I wrote a little perl program called
> mozedit for myself which takes the two arguments passed by mozex,
> i.e. the name of the temporary file and the url to which it
> corresponds, and then determines the location in my file system to
> which this particular page belongs, e.g. something like
> $MY_WORKSPACE/webedit/wikipedia/en/Web_Browsers/section5.txt
> is copied from/to the temporary location before/after editing.
> One could perhaps write this all in Javascript within Conkeror, but
> passing the two arguments (file, url) to an external script would
> really be enough.
Currently Conkeror isn't set up to provide the URL to the external
program, but that could be changed if it is useful to do so for some
purpose. In the case of editing a form field rather than viewing page
source, the URL of the document that contains the form field doesn't
necessarily uniquely identify the form field anyway. It is not clear to
me why it is particularly important that your editor open the file using
a name like $MY_WORKSPACE/webedit/wikipedia/en/Web_Browsers/section5.txt
rather than e.g. /tmp/text.txt.
--
Jeremy Maitin-Shepard
More information about the Conkeror
mailing list