From 241260cc2819e5df254ad85953588b06388ade61 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 1 Feb 2015 11:39:36 -0800 Subject: Revert changes installed by xwidgets merge --- lisp/net/browse-url.el | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'lisp/net/browse-url.el') diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 57c7b61fc28..42fb9549255 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -668,7 +668,7 @@ regarding its parameter treatment." ;; functions allows them to be stand-alone commands, making it easier ;; to switch between browsers. -(defun browse-url-interactive-arg (prompt &optional default-url) +(defun browse-url-interactive-arg (prompt) "Read a URL from the minibuffer, prompting with PROMPT. If `transient-mark-mode' is non-nil and the mark is active, it defaults to the current region, else to the URL at or before @@ -685,8 +685,7 @@ for use in `interactive'." "[\t\r\f\n ]+" "" (buffer-substring-no-properties (region-beginning) (region-end)))) - (browse-url-url-at-point) - default-url)) + (browse-url-url-at-point))) (not (eq (null browse-url-new-window-flag) (null current-prefix-arg))))) @@ -796,13 +795,6 @@ narrowed." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Browser-independent commands -(defun url-tidy (url) - "Tidy up URL as much as possible." - (if (equal 0 (string-match ".*://" url)) - url - (concat "http://" url) ;;TODO guess more url forms, like mailto - )) - ;; A generic command to call the current browse-url-browser-function ;;;###autoload @@ -815,7 +807,6 @@ first, if that exists." (interactive (browse-url-interactive-arg "URL: ")) (unless (called-interactively-p 'interactive) (setq args (or args (list browse-url-new-window-flag)))) - (setq url (url-tidy url)) (when (and url-handler-mode (not (file-name-absolute-p url))) (setq url (expand-file-name url))) (let ((process-environment (copy-sequence process-environment)) -- cgit v1.2.1 From 1b0ebbdb566a8dfa5f45ce121b2c835e9760091f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 24 Feb 2015 18:02:11 -0500 Subject: browse-url-firefox: update for firefox 36's removal of -remote Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1080319 * lisp/net/browse-url.el (browse-url-firefox-startup-arguments): Make obsolete. (browse-url-firefox): Doc fix. Remove -remote. (browse-url-firefox-sentinel): Remove function. * etc/NEWS: Mention this. Fixes: debbugs:19921 --- lisp/net/browse-url.el | 80 +++++++++++++++++--------------------------------- 1 file changed, 27 insertions(+), 53 deletions(-) (limited to 'lisp/net/browse-url.el') diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index e6ae0d7df06..4819cdc20f6 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -337,6 +337,9 @@ Defaults to the value of `browse-url-firefox-arguments' at the time :type '(repeat (string :tag "Argument")) :group 'browse-url) +(make-obsolete-variable 'browse-url-firefox-startup-arguments + "it no longer has any effect." "24.5") + (defcustom browse-url-chromium-program (let ((candidates '("chromium" "chromium-browser"))) (while (and candidates (not (executable-find (car candidates)))) @@ -1102,68 +1105,39 @@ used instead of `browse-url-new-window-flag'." ;;;###autoload (defun browse-url-firefox (url &optional new-window) "Ask the Firefox WWW browser to load URL. -Default to the URL around or before point. The strings in -variable `browse-url-firefox-arguments' are also passed to -Firefox. +Defaults to the URL around or before point. Passes the strings +in the variable `browse-url-firefox-arguments' to Firefox. -When called interactively, if variable -`browse-url-new-window-flag' is non-nil, load the document in a -new Firefox window, otherwise use a random existing one. A -non-nil interactive prefix argument reverses the effect of -`browse-url-new-window-flag'. +Interactively, if the variable `browse-url-new-window-flag' is non-nil, +loads the document in a new Firefox window. A non-nil prefix argument +reverses the effect of `browse-url-new-window-flag'. If `browse-url-firefox-new-window-is-tab' is non-nil, then whenever a document would otherwise be loaded in a new window, it is loaded in a new tab in an existing window instead. -When called non-interactively, optional second argument -NEW-WINDOW is used instead of `browse-url-new-window-flag'. +Non-interactively, this uses the optional second argument NEW-WINDOW +instead of `browse-url-new-window-flag'. -On MS-Windows systems the optional `new-window' parameter is -ignored. Firefox for Windows does not support the \"-remote\" -command line parameter. Therefore, the -`browse-url-new-window-flag' and `browse-url-firefox-new-window-is-tab' -are ignored as well. Firefox on Windows will always open the requested -URL in a new window." +On MS Windows, this ignores `browse-url-new-window-flag' and +`browse-url-firefox-new-window-is-tab', as well as the NEW-WINDOW argument. +It always uses a new window." (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) - (let* ((process-environment (browse-url-process-environment)) - (use-remote - (not (memq system-type '(windows-nt ms-dos)))) - (process - (apply 'start-process - (concat "firefox " url) nil - browse-url-firefox-program - (append - browse-url-firefox-arguments - (if use-remote - (list "-remote" - (concat - "openURL(" - url - (if (browse-url-maybe-new-window new-window) - (if browse-url-firefox-new-window-is-tab - ",new-tab" - ",new-window")) - ")")) - (list url)))))) - ;; If we use -remote, the process exits with status code 2 if - ;; Firefox is not already running. The sentinel runs firefox - ;; directly if that happens. - (when use-remote - (set-process-sentinel process - `(lambda (process change) - (browse-url-firefox-sentinel process ,url)))))) - -(defun browse-url-firefox-sentinel (process url) - "Handle a change to the process communicating with Firefox." - (or (eq (process-exit-status process) 0) - (let* ((process-environment (browse-url-process-environment))) - ;; Firefox is not running - start it - (message "Starting Firefox...") - (apply 'start-process (concat "firefox " url) nil - browse-url-firefox-program - (append browse-url-firefox-startup-arguments (list url)))))) + (let* ((process-environment (browse-url-process-environment))) + (apply 'start-process + (concat "firefox " url) nil + browse-url-firefox-program + (append + browse-url-firefox-arguments + ;; FIXME someone should check if this limitation + ;; still applies. + (unless (memq system-type '(windows-nt ms-dos)) + (if (browse-url-maybe-new-window new-window) + (if browse-url-firefox-new-window-is-tab + '("-new-tab") + '("-new-window")))) + (list url))))) ;;;###autoload (defun browse-url-chromium (url &optional _new-window) -- cgit v1.2.1 From 20c6b227ea69b9cd47f92d1a7e0935312e8ce83c Mon Sep 17 00:00:00 2001 From: Oscar Fuentes Date: Fri, 6 Mar 2015 17:18:45 +0100 Subject: browse-url-firefox: removed MS-Windows limitations net/browse-url.el (browse-url-firefox): Removed outdated MS-Windows limitations. --- lisp/net/browse-url.el | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'lisp/net/browse-url.el') diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 4c8ebf01588..5e61c094c2e 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1117,11 +1117,7 @@ whenever a document would otherwise be loaded in a new window, it is loaded in a new tab in an existing window instead. Non-interactively, this uses the optional second argument NEW-WINDOW -instead of `browse-url-new-window-flag'. - -On MS Windows, this ignores `browse-url-new-window-flag' and -`browse-url-firefox-new-window-is-tab', as well as the NEW-WINDOW argument. -It always uses a new window." +instead of `browse-url-new-window-flag'." (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) (let* ((process-environment (browse-url-process-environment))) @@ -1130,13 +1126,10 @@ It always uses a new window." browse-url-firefox-program (append browse-url-firefox-arguments - ;; FIXME someone should check if this limitation - ;; still applies. - (unless (memq system-type '(windows-nt ms-dos)) - (if (browse-url-maybe-new-window new-window) - (if browse-url-firefox-new-window-is-tab - '("-new-tab") - '("-new-window")))) + (if (browse-url-maybe-new-window new-window) + (if browse-url-firefox-new-window-is-tab + '("-new-tab") + '("-new-window"))) (list url))))) ;;;###autoload -- cgit v1.2.1 From 43a847c02c3eb848cd0d55a4722bfe7f39b1112f Mon Sep 17 00:00:00 2001 From: Vibhav Pant Date: Tue, 17 Mar 2015 05:27:23 +0530 Subject: Fixes: debbugs:19335 * net/browse-url.el (browse-url-browser-function): Add "Conkeror". (browse-url-conkeror-program, browse-url-conkeror-arguments) (browse-url-conkeror-new-window-is-buffer): New defcustoms. (browse-url-default-browser): Check for `browse-url-conkeror' and call `browse-url-conkeror-program'. (browse-url-conkeror): New command. (bug#19863) * etc/NEWS: Mention added support for Conkeror. --- lisp/net/browse-url.el | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'lisp/net/browse-url.el') diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 5e61c094c2e..4b64d95d0c6 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -42,6 +42,7 @@ ;; browse-url-netscape Netscape 1.1b1 ;; browse-url-mosaic XMosaic/mMosaic <= 2.4 ;; browse-url-cci XMosaic 2.5 +;; browse-url-conkeror Conkeror Dont know ;; browse-url-w3 w3 0 ;; browse-url-w3-gnudoit w3 remotely ;; browse-url-text-* Any text browser 0 @@ -236,6 +237,7 @@ regexp should probably be \".\" to specify a default browser." (function-item :tag "Netscape" :value browse-url-netscape) (function-item :tag "Mosaic" :value browse-url-mosaic) (function-item :tag "Mosaic using CCI" :value browse-url-cci) + (function-item :tag "Conkeror" :value browse-url-conkeror) (function-item :tag "Text browser in an xterm window" :value browse-url-text-xterm) (function-item :tag "Text browser in an Emacs window" @@ -416,6 +418,13 @@ functionality is not available there." :type 'boolean :group 'browse-url) +(defcustom browse-url-conkeror-new-window-is-buffer nil + "Whether to open up new windows in a buffer or a new window. +If non-nill, then open the URL in a new buffer rather than a new window if +`browse-url-conkeror' is asked to open it in a new window" + :type 'boolean + :group 'browse-url) + (defcustom browse-url-galeon-new-window-is-tab nil "Whether to open up new windows in a tab or a new window. If non-nil, then open the URL in a new tab rather than a new window if @@ -462,6 +471,17 @@ commands reverses the effect of this variable. Requires Netscape version :type 'string :group 'browse-url) +(defcustom browse-url-conkeror-program "conkeror" + "The name by which to invoke Conkeror." + :type 'string + :version "25.1" + :group 'browse-url) + +(defcustom browse-url-conkeror-arguments nil + "A list of strings to pass to Conkeror as arguments." + :type '(repeat (string :tag "Argument")) + :group 'browse-url) + (defcustom browse-url-filename-alist `(("^/\\(ftp@\\|anonymous@\\)?\\([^:]+\\):/*" . "ftp://\\2/") ;; The above loses the username to avoid the browser prompting for @@ -936,6 +956,7 @@ used instead of `browse-url-new-window-flag'." ((executable-find browse-url-kde-program) 'browse-url-kde) ((executable-find browse-url-netscape-program) 'browse-url-netscape) ((executable-find browse-url-mosaic-program) 'browse-url-mosaic) + ((executable-find browse-url-conkeror-program) 'browse-url-conkeror) ((executable-find browse-url-xterm-program) 'browse-url-text-xterm) ((locate-library "w3") 'browse-url-w3) (t @@ -1359,6 +1380,41 @@ used instead of `browse-url-new-window-flag'." (process-send-string "browse-url" "disconnect\r\n") (delete-process "browse-url")) +;; --- Conkeror --- +;;;###autoload +(defun browse-url-conkeror (url &optional new-window) + "Ask the Conkeror WWW browser to load URL. +Default to the URL around or before point. The strings in the variable +`browse-url-conkeror-arguments' are also passed to Conkeror. + +When called interactively, if variable `browse-url-new-window-flag' +is non-nil, load the document in a new Conkeror window, otherwise use a random +existing one. A non-nil interactive prefix argument reverses the effect of +`browse-url-new-window-flag' + +If `browse-url-conkeror-new-window-is-buffer' then whenever a document would +otherwise be loaded in a new window, it is loaded in a new buffer in an existing +window instead. + +When called non-interatively, optional second argument NEW-WINDOW is used instead of +`browse-url-new-window-flag'" + (interactive (browse-url-interactive-arg "URL: ")) + (setq url (browse-url-encode-url url)) + (let* ((process-environment (browse-url-process-environment))) + (apply 'start-process (format "conkeror %s" url) + nil + browse-url-conkeror-program + (append + browse-url-conkeror-arguments + (list + "-e" + (format "load_url_in_new_%s('%s')" + (if (browse-url-maybe-new-window new-window) + (if browse-url-conkeror-new-window-is-buffer + "buffer" + "window") + "buffer") + url)))))) ;; --- W3 --- ;; External. -- cgit v1.2.1 From f9e354ebea34aeb1ef47b13ad77f670c7acb5b13 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 17 Mar 2015 17:09:34 -0700 Subject: Spelling and wording fixes --- lisp/net/browse-url.el | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'lisp/net/browse-url.el') diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 4b64d95d0c6..dff587e63ab 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -42,7 +42,7 @@ ;; browse-url-netscape Netscape 1.1b1 ;; browse-url-mosaic XMosaic/mMosaic <= 2.4 ;; browse-url-cci XMosaic 2.5 -;; browse-url-conkeror Conkeror Dont know +;; browse-url-conkeror Conkeror Don't know ;; browse-url-w3 w3 0 ;; browse-url-w3-gnudoit w3 remotely ;; browse-url-text-* Any text browser 0 @@ -62,7 +62,7 @@ ;; control. . ;; Browsers can cache Web pages so it may be necessary to tell them to -;; reload the current page if it has changed (e.g. if you have edited +;; reload the current page if it has changed (e.g., if you have edited ;; it). There is currently no perfect automatic solution to this. ;; Netscape allows you to specify the id of the window you want to @@ -420,8 +420,8 @@ functionality is not available there." (defcustom browse-url-conkeror-new-window-is-buffer nil "Whether to open up new windows in a buffer or a new window. -If non-nill, then open the URL in a new buffer rather than a new window if -`browse-url-conkeror' is asked to open it in a new window" +If non-nil, then open the URL in a new buffer rather than a new window if +`browse-url-conkeror' is asked to open it in a new window." :type 'boolean :group 'browse-url) @@ -823,7 +823,7 @@ narrowed." ;;;###autoload (defun browse-url (url &rest args) "Ask a WWW browser to load URL. -Prompts for a URL, defaulting to the URL at or before point. Variable +Prompt for a URL, defaulting to the URL at or before point. Variable `browse-url-browser-function' says which browser to use. If the URL is a mailto: URL, consult `browse-url-mailto-function' first, if that exists." @@ -862,7 +862,7 @@ first, if that exists." ;;;###autoload (defun browse-url-at-point (&optional arg) "Ask a WWW browser to load the URL at or before point. -Doesn't let you edit the URL like `browse-url'. Variable +Don't let you edit the URL like `browse-url'. Variable `browse-url-browser-function' says which browser to use." (interactive "P") (let ((url (browse-url-url-at-point))) @@ -876,7 +876,7 @@ Doesn't let you edit the URL like `browse-url'. Variable (defun browse-url-at-mouse (event) "Ask a WWW browser to load a URL clicked with the mouse. The URL is the one around or before the position of the mouse click -but point is not changed. Doesn't let you edit the URL like +but point is not changed. Don't let you edit the URL like `browse-url'. Variable `browse-url-browser-function' says which browser to use." (interactive "e") @@ -1384,20 +1384,21 @@ used instead of `browse-url-new-window-flag'." ;;;###autoload (defun browse-url-conkeror (url &optional new-window) "Ask the Conkeror WWW browser to load URL. -Default to the URL around or before point. The strings in the variable -`browse-url-conkeror-arguments' are also passed to Conkeror. +Default to the URL around or before point. Also pass the strings +in the variable `browse-url-conkeror-arguments' to Conkeror. -When called interactively, if variable `browse-url-new-window-flag' -is non-nil, load the document in a new Conkeror window, otherwise use a random -existing one. A non-nil interactive prefix argument reverses the effect of -`browse-url-new-window-flag' +When called interactively, if variable +`browse-url-new-window-flag' is non-nil, load the document in a +new Conkeror window, otherwise use a random existing one. A +non-nil interactive prefix argument reverses the effect of +`browse-url-new-window-flag'. -If `browse-url-conkeror-new-window-is-buffer' then whenever a document would -otherwise be loaded in a new window, it is loaded in a new buffer in an existing -window instead. +If variable `browse-url-conkeror-new-window-is-buffer' is +non-nil, then whenever a document would otherwise be loaded in a +new window, load it in a new buffer in an existing window instead. -When called non-interatively, optional second argument NEW-WINDOW is used instead of -`browse-url-new-window-flag'" +When called non-interactively, use optional second argument +NEW-WINDOW instead of `browse-url-new-window-flag'." (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) (let* ((process-environment (browse-url-process-environment))) @@ -1495,7 +1496,7 @@ used instead of `browse-url-new-window-flag'." (n browse-url-text-input-attempts)) (require 'term) (if (and (browse-url-maybe-new-window new-buffer) buf) - ;; Rename away the OLD buffer. This isn't very polite, but + ;; Rename away the OLD buffer. This isn't very polite, but ;; term insists on working in a buffer named *lynx* and would ;; choke on *lynx*<1> (progn (set-buffer buf) -- cgit v1.2.1 From 1a93b9145d6f6aadb75f51eeb8d7b5bc45f06940 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 17 Mar 2015 20:55:02 -0700 Subject: * lisp/net/browse-url.el: Omit confusing documentation. --- lisp/net/browse-url.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lisp/net/browse-url.el') diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index dff587e63ab..b44bb71c046 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -862,8 +862,7 @@ first, if that exists." ;;;###autoload (defun browse-url-at-point (&optional arg) "Ask a WWW browser to load the URL at or before point. -Don't let you edit the URL like `browse-url'. Variable -`browse-url-browser-function' says which browser to use." +Variable `browse-url-browser-function' says which browser to use." (interactive "P") (let ((url (browse-url-url-at-point))) (if url @@ -876,9 +875,8 @@ Don't let you edit the URL like `browse-url'. Variable (defun browse-url-at-mouse (event) "Ask a WWW browser to load a URL clicked with the mouse. The URL is the one around or before the position of the mouse click -but point is not changed. Don't let you edit the URL like -`browse-url'. Variable `browse-url-browser-function' says which browser -to use." +but point is not changed. Variable `browse-url-browser-function' +says which browser to use." (interactive "e") (save-excursion (mouse-set-point event) -- cgit v1.2.1 From f314d48159083f9f660fe6a3fb038016a77ae4bf Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 24 Mar 2015 23:26:48 -0700 Subject: browse-url: mark some of the more obsolete stuff as such * lisp/net/browse-url.el (browse-url-browser-function) (browse-url-default-browser): Remove obsolete items from the explicit listing. (browse-url-new-window-flag, browse-url-of-file-hook): Doc fixes. (browse-url-netscape-program, browse-url-netscape-arguments) (browse-url-netscape-startup-arguments) (browse-url-galeon-program, browse-url-galeon-arguments) (browse-url-galeon-startup-arguments) (browse-url-gnome-moz-program, browse-url-gnome-moz-arguments) (browse-url-galeon-new-window-is-tab) (browse-url-netscape-new-window-is-tab) (browse-url-mosaic-program, browse-url-mosaic-arguments) (browse-url-mosaic-pidfile, browse-url-CCI-port) (browse-url-CCI-host, browse-url-netscape-version) (browse-url-netscape, browse-url-netscape-sentinel) (browse-url-netscape-reload, browse-url-netscape-send) (browse-url-galeon, browse-url-galeon-sentinel) (browse-url-gnome-moz, browse-url-mosaic, browse-url-cci) (browse-url-w3-gnudoit): Make obsolete. * etc/NEWS: Mention this. * doc/misc/idlwave.texi (HTML Help Browser Tips): Remove obsolete info. * lisp/ffap.el (ffap-url-fetcher): Simplify default and doc. * lisp/x-dnd.el: Comment update. --- lisp/net/browse-url.el | 154 ++++++++++++++++--------------------------------- 1 file changed, 51 insertions(+), 103 deletions(-) (limited to 'lisp/net/browse-url.el') diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index b44bb71c046..c4ed2332aba 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -31,89 +31,32 @@ ;; different methods of remote control so there is one function for ;; each supported browser. If the chosen browser is not running, it ;; is started. Currently there is support for the following browsers, -;; some of them probably now obsolete: +;; as well as some other obsolete ones: ;; Function Browser Earliest version ;; browse-url-mozilla Mozilla Don't know ;; browse-url-firefox Firefox Don't know (tried with 1.0.1) ;; browse-url-chromium Chromium 3.0 -;; browse-url-galeon Galeon Don't know ;; browse-url-epiphany Epiphany Don't know -;; browse-url-netscape Netscape 1.1b1 -;; browse-url-mosaic XMosaic/mMosaic <= 2.4 -;; browse-url-cci XMosaic 2.5 ;; browse-url-conkeror Conkeror Don't know ;; browse-url-w3 w3 0 -;; browse-url-w3-gnudoit w3 remotely ;; browse-url-text-* Any text browser 0 ;; browse-url-generic arbitrary ;; browse-url-default-windows-browser MS-Windows browser ;; browse-url-default-macosx-browser Mac OS X browser ;; browse-url-xdg-open Free Desktop xdg-open on Gnome, KDE, Xfce4, LXDE -;; browse-url-gnome-moz GNOME interface to Mozilla ;; browse-url-kde KDE konqueror (kfm) ;; browse-url-elinks Elinks Don't know (tried with 0.12.GIT) -;; [A version of the Netscape browser is now free software -;; , albeit not GPLed, so it is -;; reasonable to have that as the default.] - -;; Note that versions of Netscape before 1.1b1 did not have remote -;; control. . - ;; Browsers can cache Web pages so it may be necessary to tell them to ;; reload the current page if it has changed (e.g., if you have edited ;; it). There is currently no perfect automatic solution to this. -;; Netscape allows you to specify the id of the window you want to -;; control but which window DO you want to control and how do you -;; discover its id? - -;; William M. Perry's excellent "w3" WWW browser for -;; Emacs -;; has a function w3-follow-url-at-point, but that -;; doesn't let you edit the URL like browse-url. -;; The `gnuserv' package that can be used to control it in another -;; Emacs process is available from -;; . - -;; Lynx is now distributed by the FSF. See also -;; . - -;; Free graphical browsers that could be used by `browse-url-generic' -;; include Chimera and -;; , Arena -;; and Amaya -;; . mMosaic -;; , -;; (with development -;; support for Java applets and multicast) can be used like Mosaic by -;; setting `browse-url-mosaic-program' appropriately. - -;; I [Denis Howe, not Dave Love] recommend Nelson Minar -;; 's excellent html-helper-mode.el for editing -;; HTML and thank Nelson for his many useful comments on this code. -;; - -;; See also hm--html-menus . For composing correct HTML see also -;; PSGML the general SGML structure editor package -;; ; hm--html-menus can be used -;; with this. - ;; This package generalizes function html-previewer-process in Marc ;; Andreessen's html-mode (LCD modes/html-mode.el.Z). See also the ;; ffap.el package. The huge hyperbole package also contains similar ;; functions. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Help! - -;; Can you write and test some code for the Macintrash and Windoze -;; Netscape remote control APIs? (See the URL above). - -;; Do any other browsers have remote control? - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Usage @@ -170,34 +113,9 @@ ;; To always save modified buffers before displaying the file in a browser: ;; (setq browse-url-save-file t) -;; To get round the Netscape caching problem, you could EITHER have -;; write-file in html-helper-mode make Netscape reload the document: -;; -;; (autoload 'browse-url-netscape-reload "browse-url" -;; "Ask a WWW browser to redisplay the current file." t) -;; (add-hook 'html-helper-mode-hook -;; (lambda () -;; (add-hook 'local-write-file-hooks -;; (lambda () -;; (let ((local-write-file-hooks)) -;; (save-buffer)) -;; (browse-url-netscape-reload) -;; t) ; => file written by hook -;; t))) ; append to l-w-f-hooks -;; -;; OR have browse-url-of-file ask Netscape to load and then reload the -;; file: -;; -;; (add-hook 'browse-url-of-file-hook 'browse-url-netscape-reload) - -;; You may also want to customize browse-url-netscape-arguments, e.g. -;; (setq browse-url-netscape-arguments '("-install")) -;; -;; or similarly for the other browsers. - ;; To invoke different browsers for different URLs: ;; (setq browse-url-browser-function '(("^mailto:" . browse-url-mail) -;; ("." . browse-url-netscape))) +;; ("." . browse-url-firefox))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Code: @@ -226,17 +144,11 @@ function is passed the URL and any other args of `browse-url'. The last regexp should probably be \".\" to specify a default browser." :type '(choice (function-item :tag "Emacs W3" :value browse-url-w3) - (function-item :tag "W3 in another Emacs via `gnudoit'" - :value browse-url-w3-gnudoit) (function-item :tag "eww" :value eww-browse-url) (function-item :tag "Mozilla" :value browse-url-mozilla) (function-item :tag "Firefox" :value browse-url-firefox) (function-item :tag "Chromium" :value browse-url-chromium) - (function-item :tag "Galeon" :value browse-url-galeon) (function-item :tag "Epiphany" :value browse-url-epiphany) - (function-item :tag "Netscape" :value browse-url-netscape) - (function-item :tag "Mosaic" :value browse-url-mosaic) - (function-item :tag "Mosaic using CCI" :value browse-url-cci) (function-item :tag "Conkeror" :value browse-url-conkeror) (function-item :tag "Text browser in an xterm window" :value browse-url-text-xterm) @@ -250,8 +162,6 @@ regexp should probably be \".\" to specify a default browser." :value browse-url-default-windows-browser) (function-item :tag "Default Mac OS X browser" :value browse-url-default-macosx-browser) - (function-item :tag "GNOME invoking Mozilla" - :value browse-url-gnome-moz) (function-item :tag "Default browser" :value browse-url-default-browser) (function :tag "Your own function") @@ -284,18 +194,25 @@ system, given vroot.h from the same directory, with cc flags :type 'string :group 'browse-url) +(make-obsolete-variable 'browse-url-netscape-program nil "25.1") + (defcustom browse-url-netscape-arguments nil "A list of strings to pass to Netscape as arguments." :type '(repeat (string :tag "Argument")) :group 'browse-url) +(make-obsolete-variable 'browse-url-netscape-arguments nil "25.1") + (defcustom browse-url-netscape-startup-arguments browse-url-netscape-arguments "A list of strings to pass to Netscape when it starts up. Defaults to the value of `browse-url-netscape-arguments' at the time `browse-url' is loaded." :type '(repeat (string :tag "Argument")) + :group 'browse-url) +(make-obsolete-variable 'browse-url-netscape-startup-arguments nil "25.1") + (defcustom browse-url-browser-display nil "The X display for running the browser, if not same as Emacs's." :type '(choice string (const :tag "Default" nil)) @@ -363,11 +280,15 @@ Defaults to the value of `browse-url-firefox-arguments' at the time :type 'string :group 'browse-url) +(make-obsolete-variable 'browse-url-galeon-program nil "25.1") + (defcustom browse-url-galeon-arguments nil "A list of strings to pass to Galeon as arguments." :type '(repeat (string :tag "Argument")) :group 'browse-url) +(make-obsolete-variable 'browse-url-galeon-arguments nil "25.1") + (defcustom browse-url-galeon-startup-arguments browse-url-galeon-arguments "A list of strings to pass to Galeon when it starts up. Defaults to the value of `browse-url-galeon-arguments' at the time @@ -375,6 +296,8 @@ Defaults to the value of `browse-url-galeon-arguments' at the time :type '(repeat (string :tag "Argument")) :group 'browse-url) +(make-obsolete-variable 'browse-url-galeon-startup-arguments nil "25.1") + (defcustom browse-url-epiphany-program "epiphany" "The name by which to invoke Epiphany." :type 'string @@ -395,12 +318,16 @@ Defaults to the value of `browse-url-epiphany-arguments' at the time ;; GNOME means of invoking either Mozilla or Netscape. (defvar browse-url-gnome-moz-program "gnome-moz-remote") +(make-obsolete-variable 'browse-url-gnome-moz-program nil "25.1") + (defcustom browse-url-gnome-moz-arguments '() "A list of strings passed to the GNOME mozilla viewer as arguments." :version "21.1" :type '(repeat (string :tag "Argument")) :group 'browse-url) +(make-obsolete-variable 'browse-url-gnome-moz-arguments nil "25.1") + (defcustom browse-url-mozilla-new-window-is-tab nil "Whether to open up new windows in a tab or a new window. If non-nil, then open the URL in a new tab rather than a new window if @@ -432,6 +359,8 @@ If non-nil, then open the URL in a new tab rather than a new window if :type 'boolean :group 'browse-url) +(make-obsolete-variable 'browse-url-galeon-new-window-is-tab nil "25.1") + (defcustom browse-url-epiphany-new-window-is-tab nil "Whether to open up new windows in a tab or a new window. If non-nil, then open the URL in a new tab rather than a new window if @@ -447,11 +376,12 @@ window." :type 'boolean :group 'browse-url) +(make-obsolete-variable 'browse-url-netscape-new-window-is-tab nil "25.1") + (defcustom browse-url-new-window-flag nil "Non-nil means always open a new browser window with appropriate browsers. Passing an interactive argument to \\[browse-url], or specific browser -commands reverses the effect of this variable. Requires Netscape version -1.1N or later or XMosaic version 2.5 or later if using those browsers." +commands reverses the effect of this variable." :type 'boolean :group 'browse-url) @@ -461,16 +391,22 @@ commands reverses the effect of this variable. Requires Netscape version :version "20.3" :group 'browse-url) +(make-obsolete-variable 'browse-url-mosaic-program nil "25.1") + (defcustom browse-url-mosaic-arguments nil "A list of strings to pass to Mosaic as arguments." :type '(repeat (string :tag "Argument")) :group 'browse-url) +(make-obsolete-variable 'browse-url-mosaic-arguments nil "25.1") + (defcustom browse-url-mosaic-pidfile "~/.mosaicpid" "The name of the pidfile created by Mosaic." :type 'string :group 'browse-url) +(make-obsolete-variable 'browse-url-mosaic-pidfile nil "25.1") + (defcustom browse-url-conkeror-program "conkeror" "The name by which to invoke Conkeror." :type 'string @@ -521,12 +457,8 @@ Used by the `browse-url-of-file' command." :group 'browse-url) (defcustom browse-url-of-file-hook nil - "Run after `browse-url-of-file' has asked a browser to load a file. - -Set this to `browse-url-netscape-reload' to force Netscape to load the -file rather than displaying a cached copy." + "Hook run after `browse-url-of-file' has asked a browser to load a file." :type 'hook - :options '(browse-url-netscape-reload) :group 'browse-url) (defcustom browse-url-CCI-port 3003 @@ -536,6 +468,8 @@ the value set in the browser." :type 'integer :group 'browse-url) +(make-obsolete-variable 'browse-url-CCI-port nil "25.1") + (defcustom browse-url-CCI-host "localhost" "Host to access XMosaic via CCI. This should be the host name of the machine running XMosaic with CCI @@ -543,6 +477,8 @@ enabled. The port number should be set in `browse-url-CCI-port'." :type 'string :group 'browse-url) +(make-obsolete-variable 'browse-url-CCI-host nil "25.1") + (defvar browse-url-temp-file-name nil) (make-variable-buffer-local 'browse-url-temp-file-name) @@ -594,6 +530,8 @@ incompatibly at version 4." :type 'number :group 'browse-url) +(make-obsolete-variable 'browse-url-netscape-version nil "25.1") + (defcustom browse-url-text-browser "lynx" "The name of the text browser to invoke." :type 'string @@ -946,14 +884,14 @@ used instead of `browse-url-new-window-flag'." ((memq system-type '(darwin)) 'browse-url-default-macosx-browser) ((browse-url-can-use-xdg-open) 'browse-url-xdg-open) - ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) +;;; ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) ((executable-find browse-url-mozilla-program) 'browse-url-mozilla) ((executable-find browse-url-firefox-program) 'browse-url-firefox) ((executable-find browse-url-chromium-program) 'browse-url-chromium) - ((executable-find browse-url-galeon-program) 'browse-url-galeon) +;;; ((executable-find browse-url-galeon-program) 'browse-url-galeon) ((executable-find browse-url-kde-program) 'browse-url-kde) - ((executable-find browse-url-netscape-program) 'browse-url-netscape) - ((executable-find browse-url-mosaic-program) 'browse-url-mosaic) +;;; ((executable-find browse-url-netscape-program) 'browse-url-netscape) +;;; ((executable-find browse-url-mosaic-program) 'browse-url-mosaic) ((executable-find browse-url-conkeror-program) 'browse-url-conkeror) ((executable-find browse-url-xterm-program) 'browse-url-text-xterm) ((locate-library "w3") 'browse-url-w3) @@ -1019,6 +957,7 @@ is loaded in a new tab in an existing window instead. When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." + (declare (obsolete nil "25.1")) (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) (let* ((process-environment (browse-url-process-environment)) @@ -1046,6 +985,7 @@ used instead of `browse-url-new-window-flag'." (defun browse-url-netscape-sentinel (process url) "Handle a change to the process communicating with Netscape." + (declare (obsolete nil "25.1")) (or (eq (process-exit-status process) 0) (let* ((process-environment (browse-url-process-environment))) ;; Netscape not running - start it @@ -1057,6 +997,7 @@ used instead of `browse-url-new-window-flag'." (defun browse-url-netscape-reload () "Ask Netscape to reload its current document. How depends on `browse-url-netscape-version'." + (declare (obsolete nil "25.1")) (interactive) ;; Backwards incompatibility reported by ;; . @@ -1066,6 +1007,7 @@ How depends on `browse-url-netscape-version'." (defun browse-url-netscape-send (command) "Send a remote control command to Netscape." + (declare (obsolete nil "25.1")) (let* ((process-environment (browse-url-process-environment))) (apply 'start-process "netscape" nil browse-url-netscape-program @@ -1184,6 +1126,7 @@ new tab in an existing window instead. When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." + (declare (obsolete nil "25.1")) (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) (let* ((process-environment (browse-url-process-environment)) @@ -1205,6 +1148,7 @@ used instead of `browse-url-new-window-flag'." (defun browse-url-galeon-sentinel (process url) "Handle a change to the process communicating with Galeon." + (declare (obsolete nil "25.1")) (or (eq (process-exit-status process) 0) (let* ((process-environment (browse-url-process-environment))) ;; Galeon is not running - start it @@ -1287,6 +1231,7 @@ effect of `browse-url-new-window-flag'. When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." + (declare (obsolete nil "25.1")) (interactive (browse-url-interactive-arg "URL: ")) (apply 'start-process (concat "gnome-moz-remote " url) nil @@ -1315,6 +1260,7 @@ the effect of `browse-url-new-window-flag'. When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." + (declare (obsolete nil "25.1")) (interactive (browse-url-interactive-arg "Mosaic URL: ")) (let ((pidfile (expand-file-name browse-url-mosaic-pidfile)) pid) @@ -1365,6 +1311,7 @@ the effect of `browse-url-new-window-flag'. When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." + (declare (obsolete nil "25.1")) (interactive (browse-url-interactive-arg "Mosaic URL: ")) (open-network-stream "browse-url" " *browse-url*" browse-url-CCI-host browse-url-CCI-port) @@ -1443,6 +1390,7 @@ used instead of `browse-url-new-window-flag'." "Ask another Emacs running gnuserv to load the URL using the W3 browser. The `browse-url-gnudoit-program' program is used with options given by `browse-url-gnudoit-args'. Default to the URL around or before point." + (declare (obsolete nil "25.1")) (interactive (browse-url-interactive-arg "W3 URL: ")) (apply 'start-process (concat "gnudoit:" url) nil browse-url-gnudoit-program -- cgit v1.2.1