Hi,

played around with this feature a little bit more and found a few
issues:

a) conkeror doesn't seem to inform the user if spawning the external
   editor fails. I had a case of a machine where emacs segfaults (for
   whatever reason) and the only thing I noticed was that the input
   field became editable again (no more greyed out).

   Same counts if the configured editor is not found, e.g. if $EDITOR
   is not set and emacs is not installed or $EDITOR is set wrongly.

   IMHO conkeror should at least post an error message to the status
   bar in such a case (e.g. "$EDITOR failed to start: $error_message
   (return code $?)").

b) spawing external editors doesn't work right if the configured
   editor needs a terminal (i.e. doesn't open its own window). In my
   example I have $EDITOR set to zile (Zile Is a Lossy Emacs :-), a
   small, fast and efficient editor with Emacs look and feel.

   In that case the spawned editor seems to be half connected to the
   terminal conkeror has been called in (if any), but doesn't come up
   there completely. My zsh argues that conkeror suddenly expects tty
   input, so something happened on that terminal, but the editor
   doesn't show up though and the field stays disabled (greyed out).

   What could make the situation slightly better is the following
   patch which first checks the $VISUAL environment variable before
   checking $EDITOR or falling back to emacs because $VISUAL is
   usually only set to editors with GUI while $EDITOR can be set to
   some text-mode only editor.

   Unfortunately I have no idea how to test if some editor needs a
   terminal, but if we can manage to get a spawned text-mode editor
   can connect to the terminal conkeror was called from (if any), this
   would a big step towards the perfect solution for this issue. :-)

   Here's the mentioned patch:

diff -ur conkeror.orig/modules/external-editor.js 
conkeror/modules/external-editor.js
--- conkeror.orig/modules/external-editor.js    2008-04-20 01:30:08.000000000 
+0200
+++ conkeror/modules/external-editor.js 2008-06-29 18:05:52.000000000 +0200
@@ -5,10 +5,10 @@
  * COPYING file.
 **/
 
-define_variable("editor_shell_command", getenv("EDITOR") || "emacs",
+define_variable("editor_shell_command", getenv("VISUAL") || getenv("EDITOR") 
|| "emacs",
                      "Shell command used to invoke an external editor.\n" +
-                     "This defaults to the value of the EDITOR environment 
variable.  If " +
-                     "`run_external_editor_function' is non-null, it is used 
instead to " +
+                     "This defaults to the value of the VISUAL and EDITOR 
environment variables.  " +
+                     "If `run_external_editor_function' is non-null, it is 
used instead to " +
                      "invoke an external editor and the value of this variable 
is ignored." +
                      "It is used as part of a shell command in the following 
two ways:\n" +
                      "<editor_shell_command> <file>\n" +
                    
    Even better would be to check if those files exist and if not try
    the next one. Debian has a shell script called sensible-editor for
    this. Will use that for the next version of the Debian package of
    conkeror.

Everything mentioned here has been tested with the latest version in
the repository (commit 6944096a1af033d0aa70d8b4cc19b271e0d832b1 from
IIRC 14th of June 2008).

                Regards, Axel
-- 
Axel Beckert - [EMAIL PROTECTED], [EMAIL PROTECTED] - http://noone.org/abe/
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to