Debian package: Add support for XULRunner 19
[conkeror.git] / debian / patches / sensible-editor-xdg-open.diff
blobc6f0319f413c2409f6ba51ab166991f809cea9a5
1 Let Debian's sensible-editor guess the editor and let xdg-open find
2 the right application to open an file instead of hardcoded
3 applications which may not be installed. Closes: #570086
5 Index: conkeror/modules/external-editor.js
6 ===================================================================
7 --- conkeror.orig/modules/external-editor.js 2012-01-31 18:28:37.000000000 +0100
8 +++ conkeror/modules/external-editor.js 2012-01-31 18:35:45.000000000 +0100
9 @@ -5,7 +5,7 @@
10 * COPYING file.
11 **/
13 -define_variable("editor_shell_command", getenv("VISUAL") || getenv("EDITOR") || "emacs",
14 +define_variable("editor_shell_command", "/usr/bin/sensible-editor",
15 "Shell command used to invoke an external editor.\n" +
16 "This defaults to the value of the EDITOR environment variable. If " +
17 "`run_external_editor_function' is non-null, it is used instead to " +
18 Index: conkeror-1.0~~pre+git120518/modules/mime.js
19 ===================================================================
20 --- conkeror-1.0~~pre+git120518.orig/modules/mime.js 2012-02-22 23:15:54.000000000 +0100
21 +++ conkeror-1.0~~pre+git120518/modules/mime.js 2012-05-19 00:52:56.000000000 +0200
22 @@ -70,16 +70,8 @@
24 define_mime_type_table("external_content_handlers",
26 - "*": getenv("EDITOR"),
27 - text: { "*": getenv("EDITOR") },
28 - image: { "*": "feh" },
29 - video: { "*": "mplayer" },
30 - audio: { "*": "mplayer" },
31 - application: {
32 - pdf: "evince",
33 - postscript: "evince",
34 - "x-dvi": "evince"
35 - }
36 + "*": "xdg-open",
37 + text: { "*": "sensible-editor" }
39 "Structure associating MIME types and MIME type patterns with "+
40 "the names of programs for handling those them. The key \"*\" "+