2001-07-16 12:23:00 +00:00
|
|
|
;;; browse-url.el --- pass a URL to a WWW browser
|
2000-03-20 13:12:14 +00:00
|
|
|
|
2020-01-01 00:19:43 +00:00
|
|
|
;; Copyright (C) 1995-2020 Free Software Foundation, Inc.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;; Author: Denis Howe <dbh@doc.ic.ac.uk>
|
2019-05-25 13:43:06 -07:00
|
|
|
;; Maintainer: emacs-devel@gnu.org
|
2000-03-20 13:12:14 +00:00
|
|
|
;; Created: 03 Apr 1995
|
|
|
|
;; Keywords: hypertext, hypermedia, mouse
|
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
2008-05-06 07:31:51 +00:00
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
2000-03-20 13:12:14 +00:00
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 07:31:51 +00:00
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 15:52:52 -07:00
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
;; This package provides functions which read a URL (Uniform Resource
|
|
|
|
;; Locator) from the minibuffer, defaulting to the URL around point,
|
|
|
|
;; and ask a World-Wide Web browser to load it. It can also load the
|
|
|
|
;; URL associated with the current buffer. Different browsers use
|
|
|
|
;; different methods of remote control so there is one function for
|
|
|
|
;; each supported browser. If the chosen browser is not running, it
|
2000-08-15 11:17:17 +00:00
|
|
|
;; is started. Currently there is support for the following browsers,
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
;; as well as some other obsolete ones:
|
2000-08-15 11:17:17 +00:00
|
|
|
|
|
|
|
;; Function Browser Earliest version
|
2001-11-19 19:12:31 +00:00
|
|
|
;; browse-url-mozilla Mozilla Don't know
|
2005-06-18 10:36:11 +00:00
|
|
|
;; browse-url-firefox Firefox Don't know (tried with 1.0.1)
|
2016-01-24 14:37:38 -05:00
|
|
|
;; browse-url-chrome Chrome 47.0.2526.111
|
2011-10-19 12:03:39 +03:00
|
|
|
;; browse-url-chromium Chromium 3.0
|
2003-07-07 20:54:56 +00:00
|
|
|
;; browse-url-epiphany Epiphany Don't know
|
2015-03-17 17:09:34 -07:00
|
|
|
;; browse-url-conkeror Conkeror Don't know
|
2000-08-15 11:17:17 +00:00
|
|
|
;; browse-url-w3 w3 0
|
2007-10-29 13:56:39 +00:00
|
|
|
;; browse-url-text-* Any text browser 0
|
2000-08-15 11:17:17 +00:00
|
|
|
;; browse-url-generic arbitrary
|
|
|
|
;; browse-url-default-windows-browser MS-Windows browser
|
2016-11-06 00:33:43 -07:00
|
|
|
;; browse-url-default-macosx-browser macOS browser
|
2017-03-09 19:01:19 -08:00
|
|
|
;; browse-url-xdg-open freedesktop.org xdg-open
|
2001-05-18 11:27:38 +00:00
|
|
|
;; browse-url-kde KDE konqueror (kfm)
|
2007-09-07 04:37:01 +00:00
|
|
|
;; browse-url-elinks Elinks Don't know (tried with 0.12.GIT)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;; Browsers can cache Web pages so it may be necessary to tell them to
|
2015-03-17 17:09:34 -07:00
|
|
|
;; reload the current page if it has changed (e.g., if you have edited
|
2000-03-20 13:12:14 +00:00
|
|
|
;; it). There is currently no perfect automatic solution to this.
|
|
|
|
|
2011-11-18 00:31:02 -08:00
|
|
|
;; This package generalizes function html-previewer-process in Marc
|
2000-03-20 13:12:14 +00:00
|
|
|
;; Andreessen's html-mode (LCD modes/html-mode.el.Z). See also the
|
|
|
|
;; ffap.el package. The huge hyperbole package also contains similar
|
|
|
|
;; functions.
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; Usage
|
|
|
|
|
|
|
|
;; To display the URL at or before point:
|
|
|
|
;; M-x browse-url-at-point RET
|
|
|
|
;; or, similarly but with the opportunity to edit the URL extracted from
|
|
|
|
;; the buffer, use:
|
|
|
|
;; M-x browse-url
|
|
|
|
|
2012-09-17 13:41:04 +08:00
|
|
|
;; To display a URL by shift-clicking on it, put this in your init file:
|
2000-03-20 13:12:14 +00:00
|
|
|
;; (global-set-key [S-mouse-2] 'browse-url-at-mouse)
|
|
|
|
;; (Note that using Shift-mouse-1 is not desirable because
|
|
|
|
;; that event has a standard meaning in Emacs.)
|
|
|
|
|
|
|
|
;; To display the current buffer in a web browser:
|
|
|
|
;; M-x browse-url-of-buffer RET
|
|
|
|
|
|
|
|
;; To display the current region in a web browser:
|
|
|
|
;; M-x browse-url-of-region RET
|
|
|
|
|
|
|
|
;; In Dired, to display the file named on the current line:
|
|
|
|
;; M-x browse-url-of-dired-file RET
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2011-11-19 18:29:42 -08:00
|
|
|
;; Customization (~/.emacs)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;; To see what variables are available for customization, type
|
|
|
|
;; `M-x set-variable browse-url TAB'. Better, use
|
|
|
|
;; `M-x customize-group browse-url'.
|
|
|
|
|
|
|
|
;; Bind the browse-url commands to keys with the `C-c C-z' prefix
|
|
|
|
;; (as used by html-helper-mode):
|
|
|
|
;; (global-set-key "\C-c\C-z." 'browse-url-at-point)
|
|
|
|
;; (global-set-key "\C-c\C-zb" 'browse-url-of-buffer)
|
|
|
|
;; (global-set-key "\C-c\C-zr" 'browse-url-of-region)
|
|
|
|
;; (global-set-key "\C-c\C-zu" 'browse-url)
|
|
|
|
;; (global-set-key "\C-c\C-zv" 'browse-url-of-file)
|
|
|
|
;; (add-hook 'dired-mode-hook
|
|
|
|
;; (lambda ()
|
|
|
|
;; (local-set-key "\C-c\C-zf" 'browse-url-of-dired-file)))
|
|
|
|
|
2000-08-15 11:17:17 +00:00
|
|
|
;; Browse URLs in mail messages under RMAIL by clicking mouse-2:
|
2000-03-20 13:12:14 +00:00
|
|
|
;; (add-hook 'rmail-mode-hook (lambda () ; rmail-mode startup
|
|
|
|
;; (define-key rmail-mode-map [mouse-2] 'browse-url-at-mouse)))
|
2000-08-15 11:17:17 +00:00
|
|
|
;; Alternatively, add `goto-address' to `rmail-show-message-hook'.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
2000-08-15 11:17:17 +00:00
|
|
|
;; Gnus provides a standard feature to activate URLs in article
|
|
|
|
;; buffers for invocation of browse-url.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;; Use the Emacs w3 browser when not running under X11:
|
|
|
|
;; (or (eq window-system 'x)
|
|
|
|
;; (setq browse-url-browser-function 'browse-url-w3))
|
|
|
|
|
|
|
|
;; To always save modified buffers before displaying the file in a browser:
|
|
|
|
;; (setq browse-url-save-file t)
|
|
|
|
|
|
|
|
;; To invoke different browsers for different URLs:
|
|
|
|
;; (setq browse-url-browser-function '(("^mailto:" . browse-url-mail)
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
;; ("." . browse-url-firefox)))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; Variables
|
|
|
|
|
|
|
|
(defgroup browse-url nil
|
|
|
|
"Use a web browser to look at a URL."
|
|
|
|
:prefix "browse-url-"
|
2000-03-26 18:34:30 +00:00
|
|
|
:link '(emacs-commentary-link "browse-url")
|
2010-03-12 12:47:22 -05:00
|
|
|
:group 'external
|
2010-03-12 14:13:38 -05:00
|
|
|
:group 'comm)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
2019-07-28 15:55:31 +02:00
|
|
|
(defvar browse-url--browser-defcustom-type
|
|
|
|
'(choice
|
|
|
|
(function-item :tag "Emacs W3" :value browse-url-w3)
|
|
|
|
(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 "Google Chrome" :value browse-url-chrome)
|
|
|
|
(function-item :tag "Chromium" :value browse-url-chromium)
|
|
|
|
(function-item :tag "Epiphany" :value browse-url-epiphany)
|
|
|
|
(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"
|
|
|
|
:value browse-url-text-emacs)
|
|
|
|
(function-item :tag "KDE" :value browse-url-kde)
|
|
|
|
(function-item :tag "Elinks" :value browse-url-elinks)
|
|
|
|
(function-item :tag "Specified by `Browse Url Generic Program'"
|
|
|
|
:value browse-url-generic)
|
|
|
|
(function-item :tag "Default Windows browser"
|
|
|
|
:value browse-url-default-windows-browser)
|
|
|
|
(function-item :tag "Default macOS browser"
|
|
|
|
:value browse-url-default-macosx-browser)
|
|
|
|
(function-item :tag "Default browser"
|
|
|
|
:value browse-url-default-browser)
|
|
|
|
(function :tag "Your own function")
|
|
|
|
(alist :tag "Regexp/function association list"
|
|
|
|
:key-type regexp :value-type function)))
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
;;;###autoload
|
2019-07-28 15:55:31 +02:00
|
|
|
(defcustom browse-url-browser-function 'browse-url-default-browser
|
2007-08-23 18:41:14 +00:00
|
|
|
"Function to display the current buffer in a WWW browser.
|
2000-03-20 13:12:14 +00:00
|
|
|
This is used by the `browse-url-at-point', `browse-url-at-mouse', and
|
|
|
|
`browse-url-of-file' commands.
|
|
|
|
|
|
|
|
If the value is not a function it should be a list of pairs
|
2000-03-26 18:34:30 +00:00
|
|
|
\(REGEXP . FUNCTION). In this case the function called will be the one
|
2000-03-20 13:12:14 +00:00
|
|
|
associated with the first REGEXP which matches the current URL. The
|
|
|
|
function is passed the URL and any other args of `browse-url'. The last
|
2019-08-02 21:45:19 +02:00
|
|
|
regexp should probably be \".\" to specify a default browser.
|
|
|
|
|
|
|
|
Also see `browse-url-secondary-browser-function'."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type browse-url--browser-defcustom-type
|
|
|
|
:version "24.1")
|
|
|
|
|
2019-07-29 00:07:34 +02:00
|
|
|
(defcustom browse-url-secondary-browser-function 'browse-url-default-browser
|
|
|
|
"Function used to launch an alternative browser.
|
2019-08-02 16:39:53 +03:00
|
|
|
This is usually an external browser (that is, not eww or w3m),
|
|
|
|
used as the secondary browser choice, typically when a prefix
|
|
|
|
argument is given to a URL-opening command in those modes that
|
2019-08-02 21:45:19 +02:00
|
|
|
support this (for instance, eww/shr).
|
|
|
|
|
|
|
|
Also see `browse-url-browser-function'."
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "27.1"
|
|
|
|
:type browse-url--browser-defcustom-type)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
2010-11-24 07:29:06 +01:00
|
|
|
(defcustom browse-url-mailto-function 'browse-url-mail
|
|
|
|
"Function to display mailto: links.
|
|
|
|
This variable uses the same syntax as the
|
|
|
|
`browse-url-browser-function' variable. If the
|
|
|
|
`browse-url-mailto-function' variable is nil, that variable will
|
|
|
|
be used instead."
|
|
|
|
:type '(choice
|
|
|
|
(function-item :tag "Emacs Mail" :value browse-url-mail)
|
|
|
|
(function-item :tag "None" nil))
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "24.1")
|
2010-11-24 07:29:06 +01:00
|
|
|
|
2016-10-21 11:23:39 -04:00
|
|
|
(defcustom browse-url-man-function 'browse-url-man
|
|
|
|
"Function to display man: links."
|
|
|
|
:type '(radio
|
|
|
|
(function-item :tag "Emacs Man" :value browse-url-man)
|
|
|
|
(const :tag "None" nil)
|
|
|
|
(function :tag "Other function"))
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "26.1")
|
|
|
|
|
|
|
|
(defcustom browse-url-button-regexp
|
|
|
|
(concat
|
|
|
|
"\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|"
|
|
|
|
"nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)"
|
|
|
|
"\\(//[-a-z0-9_.]+:[0-9]*\\)?"
|
|
|
|
(let ((chars "-a-z0-9_=#$@~%&*+\\/[:word:]")
|
|
|
|
(punct "!?:;.,"))
|
|
|
|
(concat
|
|
|
|
"\\(?:"
|
|
|
|
;; Match paired parentheses, e.g. in Wikipedia URLs:
|
|
|
|
;; http://thread.gmane.org/47B4E3B2.3050402@gmail.com
|
|
|
|
"[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)"
|
|
|
|
"\\(?:" "[" chars punct "]+" "[" chars "]" "\\)?"
|
|
|
|
"\\|"
|
|
|
|
"[" chars punct "]+" "[" chars "]"
|
|
|
|
"\\)"))
|
|
|
|
"\\)")
|
|
|
|
"Regular expression that matches URLs."
|
|
|
|
:version "27.1"
|
|
|
|
:type 'regexp)
|
2016-10-21 11:23:39 -04:00
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
(defcustom browse-url-netscape-program "netscape"
|
|
|
|
;; Info about netscape-remote from Karl Berry.
|
2007-08-23 18:41:14 +00:00
|
|
|
"The name by which to invoke Netscape.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
The free program `netscape-remote' from
|
|
|
|
<URL:http://home.netscape.com/newsref/std/remote.c> is said to start
|
|
|
|
up very much quicker than `netscape'. Reported to compile on a GNU
|
|
|
|
system, given vroot.h from the same directory, with cc flags
|
|
|
|
-DSTANDALONE -L/usr/X11R6/lib -lXmu -lX11."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'string)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-netscape-program nil "25.1")
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
(defcustom browse-url-netscape-arguments nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings to pass to Netscape as arguments."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-netscape-arguments nil "25.1")
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
(defcustom browse-url-netscape-startup-arguments browse-url-netscape-arguments
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings to pass to Netscape when it starts up.
|
2000-03-20 13:12:14 +00:00
|
|
|
Defaults to the value of `browse-url-netscape-arguments' at the time
|
|
|
|
`browse-url' is loaded."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-netscape-startup-arguments nil "25.1")
|
|
|
|
|
2001-11-19 19:12:31 +00:00
|
|
|
(defcustom browse-url-browser-display nil
|
2012-02-28 00:17:21 -08:00
|
|
|
"The X display for running the browser, if not same as Emacs's."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(choice string (const :tag "Default" nil)))
|
2001-11-19 19:12:31 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-mozilla-program "mozilla"
|
2007-08-23 18:41:14 +00:00
|
|
|
"The name by which to invoke Mozilla."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'string)
|
2001-11-19 19:12:31 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-mozilla-arguments nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings to pass to Mozilla as arguments."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2001-11-19 19:12:31 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-mozilla-startup-arguments browse-url-mozilla-arguments
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings to pass to Mozilla when it starts up.
|
2001-11-19 19:12:31 +00:00
|
|
|
Defaults to the value of `browse-url-mozilla-arguments' at the time
|
|
|
|
`browse-url' is loaded."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2001-11-19 19:12:31 +00:00
|
|
|
|
2010-04-29 10:04:33 -04:00
|
|
|
(defcustom browse-url-firefox-program
|
2015-03-22 03:39:21 -04:00
|
|
|
(let ((candidates '("icecat" "iceweasel" "firefox")))
|
2010-04-29 10:04:33 -04:00
|
|
|
(while (and candidates (not (executable-find (car candidates))))
|
|
|
|
(setq candidates (cdr candidates)))
|
|
|
|
(or (car candidates) "firefox"))
|
2015-03-22 03:39:21 -04:00
|
|
|
"The name by which to invoke Firefox or a variant of it."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'string)
|
2005-06-18 10:36:11 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-firefox-arguments nil
|
2015-03-22 03:39:21 -04:00
|
|
|
"A list of strings to pass to Firefox (or variant) as arguments."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2005-06-18 10:36:11 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-firefox-startup-arguments browse-url-firefox-arguments
|
2015-03-22 03:39:21 -04:00
|
|
|
"A list of strings to pass to Firefox (or variant) when it starts up.
|
2005-06-18 10:36:11 +00:00
|
|
|
Defaults to the value of `browse-url-firefox-arguments' at the time
|
|
|
|
`browse-url' is loaded."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2005-06-18 10:36:11 +00:00
|
|
|
|
2015-02-24 18:02:11 -05:00
|
|
|
(make-obsolete-variable 'browse-url-firefox-startup-arguments
|
|
|
|
"it no longer has any effect." "24.5")
|
|
|
|
|
2016-01-24 14:37:38 -05:00
|
|
|
(defcustom browse-url-chrome-program
|
|
|
|
(let ((candidates '("google-chrome-stable" "google-chrome")))
|
|
|
|
(while (and candidates (not (executable-find (car candidates))))
|
|
|
|
(setq candidates (cdr candidates)))
|
|
|
|
(or (car candidates) "chromium"))
|
2016-01-25 08:49:09 -08:00
|
|
|
"The name by which to invoke the Chrome browser."
|
2016-01-24 14:37:38 -05:00
|
|
|
:type 'string
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "25.1")
|
2016-01-24 14:37:38 -05:00
|
|
|
|
|
|
|
(defcustom browse-url-chrome-arguments nil
|
|
|
|
"A list of strings to pass to Google Chrome as arguments."
|
|
|
|
:type '(repeat (string :tag "Argument"))
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "25.1")
|
2016-01-24 14:37:38 -05:00
|
|
|
|
2011-10-19 12:03:39 +03:00
|
|
|
(defcustom browse-url-chromium-program
|
|
|
|
(let ((candidates '("chromium" "chromium-browser")))
|
|
|
|
(while (and candidates (not (executable-find (car candidates))))
|
|
|
|
(setq candidates (cdr candidates)))
|
|
|
|
(or (car candidates) "chromium"))
|
|
|
|
"The name by which to invoke Chromium."
|
|
|
|
:type 'string
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "24.1")
|
2011-10-19 12:03:39 +03:00
|
|
|
|
|
|
|
(defcustom browse-url-chromium-arguments nil
|
|
|
|
"A list of strings to pass to Chromium as arguments."
|
|
|
|
:type '(repeat (string :tag "Argument"))
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "24.1")
|
2011-10-19 12:03:39 +03:00
|
|
|
|
2010-04-29 10:04:33 -04:00
|
|
|
(defcustom browse-url-galeon-program "galeon"
|
2007-08-23 18:41:14 +00:00
|
|
|
"The name by which to invoke Galeon."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'string)
|
2001-11-19 19:12:31 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-galeon-program nil "25.1")
|
|
|
|
|
2001-11-19 19:12:31 +00:00
|
|
|
(defcustom browse-url-galeon-arguments nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings to pass to Galeon as arguments."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2001-11-19 19:12:31 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-galeon-arguments nil "25.1")
|
|
|
|
|
2001-11-19 19:12:31 +00:00
|
|
|
(defcustom browse-url-galeon-startup-arguments browse-url-galeon-arguments
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings to pass to Galeon when it starts up.
|
2001-11-19 19:12:31 +00:00
|
|
|
Defaults to the value of `browse-url-galeon-arguments' at the time
|
|
|
|
`browse-url' is loaded."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2001-11-19 19:12:31 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-galeon-startup-arguments nil "25.1")
|
|
|
|
|
2003-07-07 20:54:56 +00:00
|
|
|
(defcustom browse-url-epiphany-program "epiphany"
|
2007-08-23 18:41:14 +00:00
|
|
|
"The name by which to invoke Epiphany."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'string)
|
2003-07-07 20:54:56 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-epiphany-arguments nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings to pass to Epiphany as arguments."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2003-07-07 20:54:56 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-epiphany-startup-arguments browse-url-epiphany-arguments
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings to pass to Epiphany when it starts up.
|
2003-07-07 20:54:56 +00:00
|
|
|
Defaults to the value of `browse-url-epiphany-arguments' at the time
|
|
|
|
`browse-url' is loaded."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2003-07-07 20:54:56 +00:00
|
|
|
|
2011-11-13 22:27:12 -08:00
|
|
|
;; GNOME means of invoking either Mozilla or Netscape.
|
2004-11-07 04:00:18 +00:00
|
|
|
(defvar browse-url-gnome-moz-program "gnome-moz-remote")
|
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-gnome-moz-program nil "25.1")
|
|
|
|
|
2004-11-07 04:00:18 +00:00
|
|
|
(defcustom browse-url-gnome-moz-arguments '()
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings passed to the GNOME mozilla viewer as arguments."
|
2004-11-07 04:00:18 +00:00
|
|
|
:version "21.1"
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2004-11-07 04:00:18 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-gnome-moz-arguments nil "25.1")
|
|
|
|
|
2002-10-11 17:17:10 +00:00
|
|
|
(defcustom browse-url-mozilla-new-window-is-tab nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"Whether to open up new windows in a tab or a new window.
|
2002-10-11 17:17:10 +00:00
|
|
|
If non-nil, then open the URL in a new tab rather than a new window if
|
|
|
|
`browse-url-mozilla' is asked to open it in a new window."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'boolean)
|
2002-10-11 17:17:10 +00:00
|
|
|
|
2005-06-18 10:36:11 +00:00
|
|
|
(defcustom browse-url-firefox-new-window-is-tab nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"Whether to open up new windows in a tab or a new window.
|
2005-06-18 10:36:11 +00:00
|
|
|
If non-nil, then open the URL in a new tab rather than a new window if
|
2016-11-04 11:24:21 +02:00
|
|
|
`browse-url-firefox' is asked to open it in a new window."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'boolean)
|
2005-06-18 10:36:11 +00:00
|
|
|
|
2015-03-17 05:27:23 +05:30
|
|
|
(defcustom browse-url-conkeror-new-window-is-buffer nil
|
|
|
|
"Whether to open up new windows in a buffer or a new window.
|
2015-03-17 17:09:34 -07:00
|
|
|
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."
|
2016-01-12 20:06:49 -05:00
|
|
|
:version "25.1"
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'boolean)
|
2015-03-17 05:27:23 +05:30
|
|
|
|
2001-11-25 00:04:41 +00:00
|
|
|
(defcustom browse-url-galeon-new-window-is-tab nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"Whether to open up new windows in a tab or a new window.
|
2001-11-25 00:04:41 +00:00
|
|
|
If non-nil, then open the URL in a new tab rather than a new window if
|
|
|
|
`browse-url-galeon' is asked to open it in a new window."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'boolean)
|
2001-11-25 00:04:41 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-galeon-new-window-is-tab nil "25.1")
|
|
|
|
|
2003-07-07 20:54:56 +00:00
|
|
|
(defcustom browse-url-epiphany-new-window-is-tab nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"Whether to open up new windows in a tab or a new window.
|
2003-07-07 20:54:56 +00:00
|
|
|
If non-nil, then open the URL in a new tab rather than a new window if
|
|
|
|
`browse-url-epiphany' is asked to open it in a new window."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'boolean)
|
2003-07-07 20:54:56 +00:00
|
|
|
|
2005-02-22 14:11:48 +00:00
|
|
|
(defcustom browse-url-netscape-new-window-is-tab nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"Whether to open up new windows in a tab or a new window.
|
2005-02-22 14:11:48 +00:00
|
|
|
If non-nil, then open the URL in a new tab rather than a new
|
|
|
|
window if `browse-url-netscape' is asked to open it in a new
|
|
|
|
window."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'boolean)
|
2005-02-22 14:11:48 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-netscape-new-window-is-tab nil "25.1")
|
|
|
|
|
2001-04-18 12:48:36 +00:00
|
|
|
(defcustom browse-url-new-window-flag nil
|
2007-09-17 15:59:55 +00:00
|
|
|
"Non-nil means always open a new browser window with appropriate browsers.
|
2000-03-20 13:12:14 +00:00
|
|
|
Passing an interactive argument to \\[browse-url], or specific browser
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
commands reverses the effect of this variable."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'boolean)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-mosaic-program "xmosaic"
|
2007-08-23 18:41:14 +00:00
|
|
|
"The name by which to invoke Mosaic (or mMosaic)."
|
2000-03-20 13:12:14 +00:00
|
|
|
:type 'string
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "20.3")
|
2000-03-20 13:12:14 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-mosaic-program nil "25.1")
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
(defcustom browse-url-mosaic-arguments nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings to pass to Mosaic as arguments."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-mosaic-arguments nil "25.1")
|
|
|
|
|
2002-03-18 04:24:09 +00:00
|
|
|
(defcustom browse-url-mosaic-pidfile "~/.mosaicpid"
|
2007-08-23 18:41:14 +00:00
|
|
|
"The name of the pidfile created by Mosaic."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'string)
|
2002-03-18 04:24:09 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-mosaic-pidfile nil "25.1")
|
|
|
|
|
2015-03-17 05:27:23 +05:30
|
|
|
(defcustom browse-url-conkeror-program "conkeror"
|
|
|
|
"The name by which to invoke Conkeror."
|
|
|
|
:type 'string
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "25.1")
|
2015-03-17 05:27:23 +05:30
|
|
|
|
|
|
|
(defcustom browse-url-conkeror-arguments nil
|
|
|
|
"A list of strings to pass to Conkeror as arguments."
|
2016-01-12 20:06:49 -05:00
|
|
|
:version "25.1"
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2015-03-17 05:27:23 +05:30
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
(defcustom browse-url-filename-alist
|
2015-12-25 23:32:55 +01:00
|
|
|
`(("^/\\(ftp@\\|anonymous@\\)?\\([^:/]+\\):/*" . "ftp://\\2/")
|
2000-03-20 13:12:14 +00:00
|
|
|
;; The above loses the username to avoid the browser prompting for
|
|
|
|
;; it in anonymous cases. If it's not anonymous the next regexp
|
|
|
|
;; applies.
|
2015-12-25 23:32:55 +01:00
|
|
|
("^/\\([^:@/]+@\\)?\\([^:/]+\\):/*" . "ftp://\\1\\2/")
|
2012-04-13 11:15:42 -04:00
|
|
|
,@(if (memq system-type '(windows-nt ms-dos))
|
2009-11-23 20:58:55 +00:00
|
|
|
'(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/")
|
2007-08-23 18:41:14 +00:00
|
|
|
("^[\\/][\\/]+" . "file://")))
|
2009-04-15 22:51:26 +00:00
|
|
|
("^/+" . "file:///"))
|
2007-08-23 18:41:14 +00:00
|
|
|
"An alist of (REGEXP . STRING) pairs used by `browse-url-of-file'.
|
2000-03-20 13:12:14 +00:00
|
|
|
Any substring of a filename matching one of the REGEXPs is replaced by
|
|
|
|
the corresponding STRING using `replace-match', not treating STRING
|
|
|
|
literally. All pairs are applied in the order given. The default
|
2003-01-14 22:34:20 +00:00
|
|
|
value converts ange-ftp/EFS-style file names into ftp URLs and prepends
|
|
|
|
`file:' to any file name beginning with `/'.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
For example, adding to the default a specific translation of an ange-ftp
|
|
|
|
address to an HTTP URL:
|
|
|
|
|
|
|
|
(setq browse-url-filename-alist
|
2015-09-03 15:31:12 -07:00
|
|
|
\\='((\"/webmaster@webserver:/home/www/html/\" .
|
2000-03-20 13:12:14 +00:00
|
|
|
\"http://www.acme.co.uk/\")
|
2015-12-25 23:32:55 +01:00
|
|
|
(\"^/\\(ftp@\\|anonymous@\\)?\\([^:/]+\\):/*\" . \"ftp://\\2/\")
|
|
|
|
(\"^/\\([^:@/]+@\\)?\\([^:/]+\\):/*\" . \"ftp://\\1\\2/\")
|
2007-08-23 18:41:14 +00:00
|
|
|
(\"^/+\" . \"file:/\")))"
|
2000-03-20 13:12:14 +00:00
|
|
|
:type '(repeat (cons :format "%v"
|
|
|
|
(regexp :tag "Regexp")
|
|
|
|
(string :tag "Replacement")))
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "25.1")
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-save-file nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"If non-nil, save the buffer before displaying its file.
|
2000-03-20 13:12:14 +00:00
|
|
|
Used by the `browse-url-of-file' command."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'boolean)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-of-file-hook nil
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
"Hook run after `browse-url-of-file' has asked a browser to load a file."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'hook)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-CCI-port 3003
|
2007-08-23 18:41:14 +00:00
|
|
|
"Port to access XMosaic via CCI.
|
2000-03-20 13:12:14 +00:00
|
|
|
This can be any number between 1024 and 65535 but must correspond to
|
|
|
|
the value set in the browser."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'integer)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-CCI-port nil "25.1")
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
(defcustom browse-url-CCI-host "localhost"
|
2007-08-23 18:41:14 +00:00
|
|
|
"Host to access XMosaic via CCI.
|
2000-03-20 13:12:14 +00:00
|
|
|
This should be the host name of the machine running XMosaic with CCI
|
|
|
|
enabled. The port number should be set in `browse-url-CCI-port'."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'string)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-CCI-host nil "25.1")
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
(defvar browse-url-temp-file-name nil)
|
|
|
|
(make-variable-buffer-local 'browse-url-temp-file-name)
|
2008-07-08 14:45:36 +00:00
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
(defcustom browse-url-xterm-program "xterm"
|
2007-10-29 13:56:39 +00:00
|
|
|
"The name of the terminal emulator used by `browse-url-text-xterm'.
|
2005-06-10 14:13:42 +00:00
|
|
|
This might, for instance, be a separate color version of xterm."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'string)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-xterm-args nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings defining options for `browse-url-xterm-program'.
|
2000-03-20 13:12:14 +00:00
|
|
|
These might set its size, for instance."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-gnudoit-program "gnudoit"
|
2007-08-23 18:41:14 +00:00
|
|
|
"The name of the `gnudoit' program used by `browse-url-w3-gnudoit'."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'string)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-gnudoit-args '("-q")
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings defining options for `browse-url-gnudoit-program'.
|
2000-03-20 13:12:14 +00:00
|
|
|
These might set the port, for instance."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-generic-program nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"The name of the browser program used by `browse-url-generic'."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(choice string (const :tag "None" nil)))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-generic-args nil
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings defining options for `browse-url-generic-program'."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-temp-dir temporary-file-directory
|
2007-08-23 18:41:14 +00:00
|
|
|
"The name of a directory for browse-url's temporary files.
|
2000-03-20 13:12:14 +00:00
|
|
|
Such files are generated by functions like `browse-url-of-region'.
|
|
|
|
You might want to set this to somewhere with restricted read permissions
|
|
|
|
for privacy's sake."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'string)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
2007-08-23 18:41:14 +00:00
|
|
|
(defcustom browse-url-netscape-version 3
|
|
|
|
"The version of Netscape you are using.
|
2000-03-20 13:12:14 +00:00
|
|
|
This affects how URL reloading is done; the mechanism changed
|
|
|
|
incompatibly at version 4."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type 'number)
|
2000-03-20 13:12:14 +00:00
|
|
|
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(make-obsolete-variable 'browse-url-netscape-version nil "25.1")
|
|
|
|
|
2007-10-29 13:56:39 +00:00
|
|
|
(defcustom browse-url-text-browser "lynx"
|
|
|
|
"The name of the text browser to invoke."
|
|
|
|
:type 'string
|
|
|
|
:version "23.1")
|
|
|
|
|
|
|
|
(defcustom browse-url-text-emacs-args (and (not window-system)
|
|
|
|
'("-show_cursor"))
|
|
|
|
"A list of strings defining options for a text browser in an Emacs buffer.
|
|
|
|
|
|
|
|
The default is none in a window system, otherwise `-show_cursor' to
|
|
|
|
indicate the position of the current link in the absence of
|
|
|
|
highlighting, assuming the normal default for showing the cursor."
|
|
|
|
:type '(repeat (string :tag "Argument"))
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "23.1")
|
2007-10-29 13:56:39 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-text-input-field 'avoid
|
|
|
|
"Action on selecting an existing text browser buffer at an input field.
|
|
|
|
What to do when sending a new URL to an existing text browser buffer in Emacs
|
|
|
|
if the browser cursor is on an input field (in which case the `g' command
|
2000-03-20 13:12:14 +00:00
|
|
|
would be entered as data). Such fields are recognized by the
|
2007-10-29 13:56:39 +00:00
|
|
|
underlines ____. Allowed values: nil: disregard it, `warn': warn the
|
|
|
|
user and don't emit the URL, `avoid': try to avoid the field by moving
|
2000-03-20 13:12:14 +00:00
|
|
|
down (this *won't* always work)."
|
|
|
|
:type '(choice (const :tag "Move to try to avoid field" :value avoid)
|
|
|
|
(const :tag "Disregard" :value nil)
|
|
|
|
(const :tag "Warn, don't emit URL" :value warn))
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "23.1")
|
2000-03-20 13:12:14 +00:00
|
|
|
|
2007-10-29 13:56:39 +00:00
|
|
|
(defcustom browse-url-text-input-attempts 10
|
|
|
|
"How many times to try to move down from a series of text browser input fields."
|
2002-07-22 15:21:41 +00:00
|
|
|
:type 'integer
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "23.1")
|
2000-03-20 13:12:14 +00:00
|
|
|
|
2007-10-29 13:56:39 +00:00
|
|
|
(defcustom browse-url-text-input-delay 0.2
|
|
|
|
"Seconds to wait for a text browser between moves down from an input field."
|
2002-07-22 15:21:41 +00:00
|
|
|
:type 'number
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "23.1")
|
2000-03-20 13:12:14 +00:00
|
|
|
|
2001-05-18 11:27:38 +00:00
|
|
|
(defcustom browse-url-kde-program "kfmclient"
|
2007-08-23 18:41:14 +00:00
|
|
|
"The name by which to invoke the KDE web browser."
|
2001-05-18 11:27:38 +00:00
|
|
|
:type 'string
|
2019-07-28 15:55:31 +02:00
|
|
|
:version "21.1")
|
2001-05-18 11:27:38 +00:00
|
|
|
|
|
|
|
(defcustom browse-url-kde-args '("openURL")
|
2007-08-23 18:41:14 +00:00
|
|
|
"A list of strings defining options for `browse-url-kde-program'."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Argument")))
|
2001-05-18 11:27:38 +00:00
|
|
|
|
2007-09-07 04:37:01 +00:00
|
|
|
(defcustom browse-url-elinks-wrapper '("xterm" "-e")
|
Remove leading `*' from docs of some defcustoms etc.
* emulation/crisp.el, emulation/cua-base.el, emulation/edt.el:
* emulation/pc-select.el, emulation/vip.el, international/iso-ascii.el:
* international/kkc.el, international/ogonek.el, mail/feedmail.el:
* net/browse-url.el, net/eudc-vars.el, net/net-utils.el:
* net/rcompile.el, net/rlogin.el, textmodes/enriched.el:
* textmodes/makeinfo.el, textmodes/page-ext.el, textmodes/picture.el:
* textmodes/refer.el, textmodes/spell.el, textmodes/table.el:
* textmodes/tex-mode.el, textmodes/two-column.el:
Remove leading `*' from docs of defcustoms etc.
2010-09-22 23:42:45 -07:00
|
|
|
"Wrapper command prepended to the Elinks command-line."
|
2019-07-28 15:55:31 +02:00
|
|
|
:type '(repeat (string :tag "Wrapper")))
|
2007-09-07 04:37:01 +00:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; URL encoding
|
|
|
|
|
2007-09-17 15:59:55 +00:00
|
|
|
(defun browse-url-url-encode-chars (text chars)
|
|
|
|
"URL-encode the chars in TEXT that match CHARS.
|
2010-01-02 15:14:54 -05:00
|
|
|
CHARS is a regexp-like character alternative (e.g., \"[)$]\")."
|
2007-09-19 11:22:03 +00:00
|
|
|
(let ((encoded-text (copy-sequence text))
|
2007-09-12 11:48:34 +00:00
|
|
|
(s 0))
|
2007-09-19 11:22:03 +00:00
|
|
|
(while (setq s (string-match chars encoded-text s))
|
|
|
|
(setq encoded-text
|
2012-05-09 20:39:40 +08:00
|
|
|
(replace-match (format "%%%X"
|
2007-09-19 11:22:03 +00:00
|
|
|
(string-to-char (match-string 0 encoded-text)))
|
|
|
|
t t encoded-text)
|
2007-09-12 11:48:34 +00:00
|
|
|
s (1+ s)))
|
2007-09-19 11:22:03 +00:00
|
|
|
encoded-text))
|
2007-09-07 04:37:01 +00:00
|
|
|
|
2007-09-17 15:59:55 +00:00
|
|
|
(defun browse-url-encode-url (url)
|
|
|
|
"Escape annoying characters in URL.
|
2010-01-02 15:14:54 -05:00
|
|
|
The annoying characters are those that can mislead a web browser
|
|
|
|
regarding its parameter treatment."
|
|
|
|
;; FIXME: Is there an actual example of a web browser getting
|
|
|
|
;; confused? (This used to encode commas, but at least Firefox
|
|
|
|
;; handles commas correctly and doesn't accept encoded commas.)
|
2012-05-09 20:39:40 +08:00
|
|
|
(browse-url-url-encode-chars url "[\")$] "))
|
2007-09-17 15:59:55 +00:00
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; URL input
|
|
|
|
|
|
|
|
(defun browse-url-url-at-point ()
|
2013-05-08 11:13:25 -04:00
|
|
|
(or (thing-at-point 'url t)
|
|
|
|
;; assume that the user is pointing at something like gnu.org/gnu
|
|
|
|
(let ((f (thing-at-point 'filename t)))
|
|
|
|
(and f (concat "http://" f)))))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;; Having this as a separate function called by the browser-specific
|
|
|
|
;; functions allows them to be stand-alone commands, making it easier
|
|
|
|
;; to switch between browsers.
|
|
|
|
|
2015-02-01 11:39:36 -08:00
|
|
|
(defun browse-url-interactive-arg (prompt)
|
2000-03-20 13:12:14 +00:00
|
|
|
"Read a URL from the minibuffer, prompting with PROMPT.
|
2004-05-23 22:38:30 +00:00
|
|
|
If `transient-mark-mode' is non-nil and the mark is active,
|
2004-05-29 15:34:50 +00:00
|
|
|
it defaults to the current region, else to the URL at or before
|
|
|
|
point. If invoked with a mouse button, it moves point to the
|
|
|
|
position clicked before acting.
|
|
|
|
|
|
|
|
This function returns a list (URL NEW-WINDOW-FLAG)
|
|
|
|
for use in `interactive'."
|
2000-03-20 13:12:14 +00:00
|
|
|
(let ((event (elt (this-command-keys) 0)))
|
|
|
|
(and (listp event) (mouse-set-point event)))
|
2004-05-23 22:38:30 +00:00
|
|
|
(list (read-string prompt (or (and transient-mark-mode mark-active
|
|
|
|
;; rfc2396 Appendix E.
|
|
|
|
(replace-regexp-in-string
|
|
|
|
"[\t\r\f\n ]+" ""
|
|
|
|
(buffer-substring-no-properties
|
|
|
|
(region-beginning) (region-end))))
|
2015-02-01 11:39:36 -08:00
|
|
|
(browse-url-url-at-point)))
|
2001-04-18 12:48:36 +00:00
|
|
|
(not (eq (null browse-url-new-window-flag)
|
2000-03-20 13:12:14 +00:00
|
|
|
(null current-prefix-arg)))))
|
|
|
|
|
2004-11-04 10:15:37 +00:00
|
|
|
;; called-interactive-p needs to be called at a function's top-level, hence
|
|
|
|
;; this macro. We use that rather than interactive-p because
|
|
|
|
;; use in a keyboard macro should not change this behavior.
|
2000-03-22 23:06:18 +00:00
|
|
|
(defmacro browse-url-maybe-new-window (arg)
|
2009-10-02 00:02:02 +00:00
|
|
|
`(if (or noninteractive (not (called-interactively-p 'any)))
|
2000-03-22 23:06:18 +00:00
|
|
|
,arg
|
2001-04-18 12:48:36 +00:00
|
|
|
browse-url-new-window-flag))
|
2000-03-22 23:06:18 +00:00
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; Browse current buffer
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-of-file (&optional file)
|
|
|
|
"Ask a WWW browser to display FILE.
|
|
|
|
Display the current buffer's file if FILE is nil or if called
|
|
|
|
interactively. Turn the filename into a URL with function
|
|
|
|
`browse-url-file-url'. Pass the URL to a browser using the
|
|
|
|
`browse-url' function then run `browse-url-of-file-hook'."
|
|
|
|
(interactive)
|
|
|
|
(or file
|
|
|
|
(setq file (buffer-file-name))
|
|
|
|
(error "Current buffer has no file"))
|
|
|
|
(let ((buf (get-file-buffer file)))
|
|
|
|
(if buf
|
2007-08-22 18:52:59 +00:00
|
|
|
(with-current-buffer buf
|
2000-03-20 13:12:14 +00:00
|
|
|
(cond ((not (buffer-modified-p)))
|
|
|
|
(browse-url-save-file (save-buffer))
|
|
|
|
(t (message "%s modified since last save" file))))))
|
|
|
|
(browse-url (browse-url-file-url file))
|
|
|
|
(run-hooks 'browse-url-of-file-hook))
|
|
|
|
|
|
|
|
(defun browse-url-file-url (file)
|
|
|
|
"Return the URL corresponding to FILE.
|
|
|
|
Use variable `browse-url-filename-alist' to map filenames to URLs."
|
2013-12-03 14:21:13 +02:00
|
|
|
(let ((coding (if (equal system-type 'windows-nt)
|
|
|
|
;; W32 pretends that file names are UTF-8 encoded.
|
|
|
|
'utf-8
|
2018-01-25 13:35:13 -05:00
|
|
|
(and (or file-name-coding-system
|
2013-12-03 14:21:13 +02:00
|
|
|
default-file-name-coding-system)))))
|
2006-05-20 04:29:38 +00:00
|
|
|
(if coding (setq file (encode-coding-string file coding))))
|
2007-09-17 15:59:55 +00:00
|
|
|
(setq file (browse-url-url-encode-chars file "[*\"()',=;?% ]"))
|
2000-09-26 13:05:29 +00:00
|
|
|
(dolist (map browse-url-filename-alist)
|
|
|
|
(when (and map (string-match (car map) file))
|
|
|
|
(setq file (replace-match (cdr map) t nil file))))
|
2000-03-20 13:12:14 +00:00
|
|
|
file)
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-of-buffer (&optional buffer)
|
|
|
|
"Ask a WWW browser to display BUFFER.
|
|
|
|
Display the current buffer if BUFFER is nil. Display only the
|
|
|
|
currently visible part of BUFFER (from a temporary file) if buffer is
|
|
|
|
narrowed."
|
|
|
|
(interactive)
|
|
|
|
(save-excursion
|
|
|
|
(and buffer (set-buffer buffer))
|
|
|
|
(let ((file-name
|
|
|
|
;; Ignore real name if restricted
|
2012-09-07 16:58:31 +08:00
|
|
|
(and (not (buffer-narrowed-p))
|
2000-03-20 13:12:14 +00:00
|
|
|
(or buffer-file-name
|
|
|
|
(and (boundp 'dired-directory) dired-directory)))))
|
2019-08-17 17:30:42 -07:00
|
|
|
(when (or (not file-name)
|
|
|
|
;; This can happen when we're looking at a file from a
|
|
|
|
;; zip file buffer, for instance.
|
|
|
|
(not (file-exists-p file-name)))
|
|
|
|
(unless browse-url-temp-file-name
|
|
|
|
(setq browse-url-temp-file-name
|
|
|
|
(convert-standard-filename
|
|
|
|
(make-temp-file
|
|
|
|
(expand-file-name "burl" browse-url-temp-dir)
|
|
|
|
nil ".html"))))
|
|
|
|
(setq file-name browse-url-temp-file-name)
|
|
|
|
(write-region (point-min) (point-max) file-name nil 'no-message))
|
2000-03-20 13:12:14 +00:00
|
|
|
(browse-url-of-file file-name))))
|
|
|
|
|
|
|
|
(defun browse-url-delete-temp-file (&optional temp-file-name)
|
|
|
|
;; Delete browse-url-temp-file-name from the file system
|
|
|
|
;; If optional arg TEMP-FILE-NAME is non-nil, delete it instead
|
|
|
|
(let ((file-name (or temp-file-name browse-url-temp-file-name)))
|
|
|
|
(if (and file-name (file-exists-p file-name))
|
|
|
|
(delete-file file-name))))
|
|
|
|
|
|
|
|
(add-hook 'kill-buffer-hook 'browse-url-delete-temp-file)
|
|
|
|
|
2010-10-08 17:52:12 -07:00
|
|
|
(declare-function dired-get-filename "dired"
|
|
|
|
(&optional localp no-error-if-not-filep))
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-of-dired-file ()
|
|
|
|
"In Dired, ask a WWW browser to display the file named on this line."
|
|
|
|
(interactive)
|
2011-05-08 14:34:51 -04:00
|
|
|
(let ((tem (dired-get-filename t t)))
|
|
|
|
(if tem
|
|
|
|
(browse-url-of-file (expand-file-name tem))
|
|
|
|
(error "No file on this line"))))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-of-region (min max)
|
|
|
|
"Ask a WWW browser to display the current region."
|
|
|
|
(interactive "r")
|
|
|
|
(save-excursion
|
|
|
|
(save-restriction
|
|
|
|
(narrow-to-region min max)
|
|
|
|
(browse-url-of-buffer))))
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; Browser-independent commands
|
|
|
|
|
|
|
|
;; A generic command to call the current browse-url-browser-function
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url (url &rest args)
|
|
|
|
"Ask a WWW browser to load URL.
|
2015-04-18 18:00:02 -07:00
|
|
|
Prompt for a URL, defaulting to the URL at or before point.
|
2015-12-26 20:47:42 +02:00
|
|
|
Invokes a suitable browser function which does the actual job.
|
|
|
|
The variable `browse-url-browser-function' says which browser function to
|
|
|
|
use. If the URL is a mailto: URL, consult `browse-url-mailto-function'
|
2015-04-18 18:00:02 -07:00
|
|
|
first, if that exists.
|
|
|
|
|
2015-12-26 20:47:42 +02:00
|
|
|
The additional ARGS are passed to the browser function. See the doc
|
|
|
|
strings of the actual functions, starting with `browse-url-browser-function',
|
|
|
|
for information about the significance of ARGS (most of the functions
|
|
|
|
ignore it).
|
|
|
|
If ARGS are omitted, the default is to pass `browse-url-new-window-flag'
|
|
|
|
as ARGS."
|
2000-03-20 13:12:14 +00:00
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
2009-10-02 03:48:36 +00:00
|
|
|
(unless (called-interactively-p 'interactive)
|
2001-04-18 12:48:36 +00:00
|
|
|
(setq args (or args (list browse-url-new-window-flag))))
|
2019-08-23 06:00:36 +02:00
|
|
|
(when (and url-handler-mode
|
|
|
|
(not (file-name-absolute-p url))
|
|
|
|
(not (string-match "\\`[a-z]+:" url)))
|
2014-05-13 10:54:08 +02:00
|
|
|
(setq url (expand-file-name url)))
|
2010-11-24 07:29:06 +01:00
|
|
|
(let ((process-environment (copy-sequence process-environment))
|
|
|
|
(function (or (and (string-match "\\`mailto:" url)
|
|
|
|
browse-url-mailto-function)
|
2016-10-21 11:23:39 -04:00
|
|
|
(and (string-match "\\`man:" url)
|
|
|
|
browse-url-man-function)
|
2011-03-04 00:21:56 -08:00
|
|
|
browse-url-browser-function))
|
|
|
|
;; Ensure that `default-directory' exists and is readable (b#6077).
|
2014-05-13 10:54:08 +02:00
|
|
|
(default-directory (or (unhandled-file-name-directory default-directory)
|
|
|
|
(expand-file-name "~/"))))
|
2006-12-08 03:17:10 +00:00
|
|
|
;; When connected to various displays, be careful to use the display of
|
|
|
|
;; the currently selected frame, rather than the original start display,
|
|
|
|
;; which may not even exist any more.
|
2013-07-31 10:52:26 +04:00
|
|
|
(if (stringp (frame-parameter nil 'display))
|
|
|
|
(setenv "DISPLAY" (frame-parameter nil 'display)))
|
2010-11-24 07:29:06 +01:00
|
|
|
(if (and (consp function)
|
|
|
|
(not (functionp function)))
|
2009-10-18 23:55:16 +00:00
|
|
|
;; The `function' can be an alist; look down it for first match
|
|
|
|
;; and apply the function (which might be a lambda).
|
|
|
|
(catch 'done
|
2010-11-24 07:29:06 +01:00
|
|
|
(dolist (bf function)
|
2009-10-18 23:55:16 +00:00
|
|
|
(when (string-match (car bf) url)
|
|
|
|
(apply (cdr bf) url args)
|
|
|
|
(throw 'done t)))
|
|
|
|
(error "No browse-url-browser-function matching URL %s"
|
|
|
|
url))
|
|
|
|
;; Unbound symbols go down this leg, since void-function from
|
|
|
|
;; apply is clearer than wrong-type-argument from dolist.
|
2010-11-24 07:29:06 +01:00
|
|
|
(apply function url args))))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;;;###autoload
|
2000-03-22 23:06:18 +00:00
|
|
|
(defun browse-url-at-point (&optional arg)
|
2000-03-20 13:12:14 +00:00
|
|
|
"Ask a WWW browser to load the URL at or before point.
|
2015-04-18 18:00:02 -07:00
|
|
|
Variable `browse-url-browser-function' says which browser to use.
|
|
|
|
Optional prefix argument ARG non-nil inverts the value of the option
|
|
|
|
`browse-url-new-window-flag'."
|
2000-03-22 23:06:18 +00:00
|
|
|
(interactive "P")
|
2000-08-15 11:17:17 +00:00
|
|
|
(let ((url (browse-url-url-at-point)))
|
|
|
|
(if url
|
|
|
|
(browse-url url (if arg
|
2001-04-18 12:48:36 +00:00
|
|
|
(not browse-url-new-window-flag)
|
|
|
|
browse-url-new-window-flag))
|
2000-08-15 11:17:17 +00:00
|
|
|
(error "No URL found"))))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(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
|
2015-03-17 20:55:02 -07:00
|
|
|
but point is not changed. Variable `browse-url-browser-function'
|
|
|
|
says which browser to use."
|
2000-03-20 13:12:14 +00:00
|
|
|
(interactive "e")
|
|
|
|
(save-excursion
|
2000-08-15 11:17:17 +00:00
|
|
|
(mouse-set-point event)
|
2002-06-21 09:58:32 +00:00
|
|
|
;; This handles browse-url-new-window-flag properly
|
|
|
|
;; when it gets no arg.
|
|
|
|
(browse-url-at-point)))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; Browser-specific commands
|
|
|
|
|
|
|
|
;; --- Default MS-Windows browser ---
|
|
|
|
|
2005-07-03 16:31:40 +00:00
|
|
|
(defvar dos-windows-version)
|
2007-11-22 01:05:55 +00:00
|
|
|
(declare-function w32-shell-execute "w32fns.c") ;; Defined in C.
|
2005-07-03 16:31:40 +00:00
|
|
|
|
2013-09-10 23:52:26 +02:00
|
|
|
(defun browse-url-default-windows-browser (url &optional _new-window)
|
2015-12-26 20:47:42 +02:00
|
|
|
"Invoke the MS-Windows system's default Web browser.
|
|
|
|
The optional NEW-WINDOW argument is not used."
|
2000-03-20 13:12:14 +00:00
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
2009-11-20 21:49:46 +00:00
|
|
|
(cond ((eq system-type 'ms-dos)
|
|
|
|
(if dos-windows-version
|
|
|
|
(shell-command (concat "start " (shell-quote-argument url)))
|
|
|
|
(error "Browsing URLs is not supported on this system")))
|
|
|
|
((eq system-type 'cygwin)
|
2009-11-23 20:58:55 +00:00
|
|
|
(call-process "cygstart" nil nil nil url))
|
2018-05-03 21:04:17 +03:00
|
|
|
(t
|
|
|
|
(w32-shell-execute "open"
|
|
|
|
;; w32-shell-execute passes file:// URLs
|
|
|
|
;; to APIs that expect file names, so we
|
|
|
|
;; need to unhex any %nn encoded
|
|
|
|
;; characters in the URL. We don't do
|
|
|
|
;; that for other URLs; in particular,
|
|
|
|
;; default Windows mail client barfs on
|
|
|
|
;; quotes in the MAILTO URLs, so we prefer
|
|
|
|
;; to leave the URL with its embedded %nn
|
|
|
|
;; encoding intact.
|
|
|
|
(if (eq t (compare-strings url nil 7
|
|
|
|
"file://" nil nil))
|
|
|
|
(url-unhex-string url)
|
|
|
|
url)))))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
2013-09-10 23:52:26 +02:00
|
|
|
(defun browse-url-default-macosx-browser (url &optional _new-window)
|
2016-11-06 00:33:43 -07:00
|
|
|
"Invoke the macOS system's default Web browser.
|
lisp/*.el: Fix typos and other trivial doc fixes
* lisp/allout-widgets.el (allout-widgets-auto-activation)
(allout-current-decorated-p):
* lisp/auth-source.el (auth-source-protocols):
* lisp/autorevert.el (auto-revert-set-timer):
* lisp/battery.el (battery-mode-line-limit):
* lisp/calc/calcalg3.el (math-map-binop):
* lisp/calendar/cal-dst.el (calendar-dst-find-startend):
* lisp/calendar/cal-mayan.el (calendar-mayan-long-count-to-absolute):
* lisp/calendar/calendar.el (calendar-date-echo-text)
(calendar-generate-month, calendar-string-spread)
(calendar-cursor-to-date, calendar-read, calendar-read-date)
(calendar-mark-visible-date, calendar-dayname-on-or-before):
* lisp/calendar/diary-lib.el (diary-ordinal-suffix):
* lisp/cedet/ede/autoconf-edit.el (autoconf-new-program)
(autoconf-find-last-macro, autoconf-parameter-strip):
* lisp/cedet/ede/config.el (ede-target-with-config-build):
* lisp/cedet/ede/linux.el (ede-linux--detect-architecture)
(ede-linux--get-architecture):
* lisp/cedet/semantic/complete.el (semantic-collector-calculate-cache)
(semantic-displayer-abstract, semantic-displayer-point-position):
* lisp/cedet/semantic/format.el (semantic-format-face-alist)
(semantic-format-tag-short-doc):
* lisp/cedet/semantic/fw.el (semantic-find-file-noselect):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-work-idle-time)
(semantic-idle-breadcrumbs-display-function)
(semantic-idle-breadcrumbs-format-tag-list-function):
* lisp/cedet/semantic/lex.el (semantic-lex-map-types)
(define-lex, define-lex-block-type-analyzer):
* lisp/cedet/semantic/senator.el (senator-search-default-tag-filter):
* lisp/cedet/semantic/symref.el (semantic-symref-result)
(semantic-symref-hit-to-tag-via-db):
* lisp/cedet/semantic/symref.el (semantic-symref-tool-baseclass):
* lisp/cedet/semantic/tag.el (semantic-tag-new-variable)
(semantic-tag-new-include, semantic-tag-new-package)
(semantic-tag-set-faux, semantic-create-tag-proxy)
(semantic-tag-function-parent)
(semantic-tag-components-with-overlays):
* lisp/cedet/srecode/cpp.el (srecode-cpp-namespaces)
(srecode-semantic-handle-:c, srecode-semantic-apply-tag-to-dict):
* lisp/cedet/srecode/dictionary.el (srecode-create-dictionary)
(srecode-dictionary-add-entries, srecode-dictionary-lookup-name)
(srecode-create-dictionaries-from-tags):
* lisp/cmuscheme.el (scheme-compile-region):
* lisp/color.el (color-lab-to-lch):
* lisp/doc-view.el (doc-view-image-width)
(doc-view-set-up-single-converter):
* lisp/dynamic-setting.el (font-setting-change-default-font)
(dynamic-setting-handle-config-changed-event):
* lisp/elec-pair.el (electric-pair-text-pairs)
(electric-pair-skip-whitespace-function)
(electric-pair-string-bound-function):
* lisp/emacs-lisp/avl-tree.el (avl-tree--del-balance)
(avl-tree-member, avl-tree-mapcar, avl-tree-iter):
* lisp/emacs-lisp/bytecomp.el (byte-compile-generate-call-tree):
* lisp/emacs-lisp/checkdoc.el (checkdoc-autofix-flag)
(checkdoc-spellcheck-documentation-flag, checkdoc-ispell)
(checkdoc-ispell-current-buffer, checkdoc-ispell-interactive)
(checkdoc-ispell-message-interactive)
(checkdoc-ispell-message-text, checkdoc-ispell-start)
(checkdoc-ispell-continue, checkdoc-ispell-comments)
(checkdoc-ispell-defun):
* lisp/emacs-lisp/cl-generic.el (cl--generic-search-method):
* lisp/emacs-lisp/eieio-custom.el (eieio-read-customization-group):
* lisp/emacs-lisp/lisp.el (forward-sexp, up-list):
* lisp/emacs-lisp/package-x.el (package--archive-contents-from-file):
* lisp/emacs-lisp/package.el (package-desc)
(package--make-autoloads-and-stuff, package-hidden-regexps):
* lisp/emacs-lisp/tcover-ses.el (ses-exercise-startup):
* lisp/emacs-lisp/testcover.el (testcover-nohits)
(testcover-1value):
* lisp/epg.el (epg-receive-keys, epg-start-edit-key):
* lisp/erc/erc-backend.el (erc-server-processing-p)
(erc-split-line-length, erc-server-coding-system)
(erc-server-send, erc-message):
* lisp/erc/erc-button.el (erc-button-face, erc-button-alist)
(erc-browse-emacswiki):
* lisp/erc/erc-ezbounce.el (erc-ezbounce, erc-ezb-get-login):
* lisp/erc/erc-fill.el (erc-fill-variable-maximum-indentation):
* lisp/erc/erc-log.el (erc-current-logfile):
* lisp/erc/erc-match.el (erc-log-match-format)
(erc-text-matched-hook):
* lisp/erc/erc-netsplit.el (erc-netsplit, erc-netsplit-debug):
* lisp/erc/erc-networks.el (erc-server-alist)
(erc-networks-alist, erc-current-network):
* lisp/erc/erc-ring.el (erc-input-ring-index):
* lisp/erc/erc-speedbar.el (erc-speedbar)
(erc-speedbar-update-channel):
* lisp/erc/erc-stamp.el (erc-timestamp-only-if-changed-flag):
* lisp/erc/erc-track.el (erc-track-position-in-mode-line)
(erc-track-remove-from-mode-line, erc-modified-channels-update)
(erc-track-last-non-erc-buffer, erc-track-sort-by-importance)
(erc-track-get-active-buffer):
* lisp/erc/erc.el (erc-get-channel-user-list)
(erc-echo-notice-hook, erc-echo-notice-always-hook)
(erc-wash-quit-reason, erc-format-@nick):
* lisp/ffap.el (ffap-latex-mode):
* lisp/files.el (abort-if-file-too-large)
(dir-locals--get-sort-score, buffer-stale--default-function):
* lisp/filesets.el (filesets-tree-max-level, filesets-data)
(filesets-update-pre010505):
* lisp/gnus/gnus-agent.el (gnus-agent-flush-cache):
* lisp/gnus/gnus-art.el (gnus-article-encrypt-protocol)
(gnus-button-prefer-mid-or-mail):
* lisp/gnus/gnus-cus.el (gnus-group-parameters):
* lisp/gnus/gnus-demon.el (gnus-demon-handlers)
(gnus-demon-run-callback):
* lisp/gnus/gnus-dired.el (gnus-dired-print):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event-from-buffer):
* lisp/gnus/gnus-range.el (gnus-range-normalize):
* lisp/gnus/gnus-spec.el (gnus-pad-form):
* lisp/gnus/gnus-srvr.el (gnus-server-agent, gnus-server-cloud)
(gnus-server-opened, gnus-server-closed, gnus-server-denied)
(gnus-server-offline):
* lisp/gnus/gnus-sum.el (gnus-refer-thread-use-nnir)
(gnus-refer-thread-limit-to-thread)
(gnus-summary-limit-include-thread, gnus-summary-refer-thread)
(gnus-summary-find-matching):
* lisp/gnus/gnus-util.el (gnus-rescale-image):
* lisp/gnus/gnus.el (gnus-summary-line-format, gnus-no-server):
* lisp/gnus/mail-source.el (mail-source-incoming-file-prefix):
* lisp/gnus/message.el (message-cite-reply-position)
(message-cite-style-outlook, message-cite-style-thunderbird)
(message-cite-style-gmail, message--send-mail-maybe-partially):
* lisp/gnus/mm-extern.el (mm-inline-external-body):
* lisp/gnus/mm-partial.el (mm-inline-partial):
* lisp/gnus/mml-sec.el (mml-secure-message-sign)
(mml-secure-message-sign-encrypt, mml-secure-message-encrypt):
* lisp/gnus/mml2015.el (mml2015-epg-key-image)
(mml2015-epg-key-image-to-string):
* lisp/gnus/nndiary.el (nndiary-reminders, nndiary-get-new-mail):
* lisp/gnus/nnheader.el (nnheader-directory-files-is-safe):
* lisp/gnus/nnir.el (nnir-search-history)
(nnir-imap-search-other, nnir-artlist-length)
(nnir-artlist-article, nnir-artitem-group, nnir-artitem-number)
(nnir-artitem-rsv, nnir-article-group, nnir-article-number)
(nnir-article-rsv, nnir-article-ids, nnir-categorize)
(nnir-retrieve-headers-override-function)
(nnir-imap-default-search-key, nnir-hyrex-additional-switches)
(gnus-group-make-nnir-group, nnir-run-namazu, nnir-read-parms)
(nnir-read-parm, nnir-read-server-parm, nnir-search-thread):
* lisp/gnus/nnmairix.el (nnmairix-default-group)
(nnmairix-propagate-marks):
* lisp/gnus/smime.el (smime-keys, smime-crl-check)
(smime-verify-buffer, smime-noverify-buffer):
* lisp/gnus/spam-report.el (spam-report-url-ping-mm-url):
* lisp/gnus/spam.el (spam-spamassassin-positive-spam-flag-header)
(spam-spamassassin-spam-status-header, spam-sa-learn-rebuild)
(spam-classifications, spam-check-stat, spam-spamassassin-score):
* lisp/help.el (describe-minor-mode-from-symbol):
* lisp/hippie-exp.el (hippie-expand-ignore-buffers):
* lisp/htmlfontify.el (hfy-optimizations, hfy-face-resolve-face)
(hfy-begin-span):
* lisp/ibuf-ext.el (ibuffer-update-saved-filters-format)
(ibuffer-saved-filters, ibuffer-old-saved-filters-warning)
(ibuffer-filtering-qualifiers, ibuffer-repair-saved-filters)
(eval, ibuffer-unary-operand, file-extension, directory):
* lisp/image-dired.el (image-dired-cmd-pngcrush-options):
* lisp/image-mode.el (image-toggle-display):
* lisp/international/ccl.el (ccl-compile-read-multibyte-character)
(ccl-compile-write-multibyte-character):
* lisp/international/kkc.el (kkc-save-init-file):
* lisp/international/latin1-disp.el (latin1-display):
* lisp/international/ogonek.el (ogonek-name-encoding-alist)
(ogonek-information, ogonek-lookup-encoding)
(ogonek-deprefixify-region):
* lisp/isearch.el (isearch-filter-predicate)
(isearch--momentary-message):
* lisp/jsonrpc.el (jsonrpc-connection-send)
(jsonrpc-process-connection, jsonrpc-shutdown)
(jsonrpc--async-request-1):
* lisp/language/tibet-util.el (tibetan-char-p):
* lisp/mail/feedmail.el (feedmail-queue-use-send-time-for-date)
(feedmail-last-chance-hook, feedmail-before-fcc-hook)
(feedmail-send-it-immediately-wrapper, feedmail-find-eoh):
* lisp/mail/hashcash.el (hashcash-generate-payment)
(hashcash-generate-payment-async, hashcash-insert-payment)
(hashcash-verify-payment):
* lisp/mail/rmail.el (rmail-movemail-variant-in-use)
(rmail-get-attr-value):
* lisp/mail/rmailmm.el (rmail-mime-prefer-html, rmail-mime):
* lisp/mail/rmailsum.el (rmail-summary-show-message):
* lisp/mail/supercite.el (sc-raw-mode-toggle):
* lisp/man.el (Man-start-calling):
* lisp/mh-e/mh-acros.el (mh-do-at-event-location)
(mh-iterate-on-messages-in-region, mh-iterate-on-range):
* lisp/mh-e/mh-alias.el (mh-alias-system-aliases)
(mh-alias-reload, mh-alias-ali)
(mh-alias-canonicalize-suggestion, mh-alias-add-alias-to-file)
(mh-alias-add-alias):
* lisp/mouse.el (mouse-save-then-kill):
* lisp/net/browse-url.el (browse-url-default-macosx-browser):
* lisp/net/eudc.el (eudc-set, eudc-variable-protocol-value)
(eudc-variable-server-value, eudc-update-variable)
(eudc-expand-inline):
* lisp/net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result):
* lisp/net/eudcb-ldap.el (eudc-ldap-get-field-list):
* lisp/net/pop3.el (pop3-list):
* lisp/net/soap-client.el (soap-namespace-put)
(soap-xs-parse-sequence, soap-parse-envelope):
* lisp/net/soap-inspect.el (soap-inspect-xs-complex-type):
* lisp/nxml/rng-xsd.el (rng-xsd-date-to-days):
* lisp/org/ob-C.el (org-babel-prep-session:C)
(org-babel-load-session:C):
* lisp/org/ob-J.el (org-babel-execute:J):
* lisp/org/ob-asymptote.el (org-babel-prep-session:asymptote):
* lisp/org/ob-awk.el (org-babel-execute:awk):
* lisp/org/ob-core.el (org-babel-process-file-name):
* lisp/org/ob-ebnf.el (org-babel-execute:ebnf):
* lisp/org/ob-forth.el (org-babel-execute:forth):
* lisp/org/ob-fortran.el (org-babel-execute:fortran)
(org-babel-prep-session:fortran, org-babel-load-session:fortran):
* lisp/org/ob-groovy.el (org-babel-execute:groovy):
* lisp/org/ob-io.el (org-babel-execute:io):
* lisp/org/ob-js.el (org-babel-execute:js):
* lisp/org/ob-lilypond.el (org-babel-default-header-args:lilypond)
(org-babel-lilypond-compile-post-tangle)
(org-babel-lilypond-display-pdf-post-tangle)
(org-babel-lilypond-tangle)
(org-babel-lilypond-execute-tangled-ly)
(org-babel-lilypond-compile-lilyfile)
(org-babel-lilypond-check-for-compile-error)
(org-babel-lilypond-process-compile-error)
(org-babel-lilypond-mark-error-line)
(org-babel-lilypond-parse-error-line)
(org-babel-lilypond-attempt-to-open-pdf)
(org-babel-lilypond-attempt-to-play-midi)
(org-babel-lilypond-switch-extension)
(org-babel-lilypond-set-header-args):
* lisp/org/ob-lua.el (org-babel-prep-session:lua):
* lisp/org/ob-picolisp.el (org-babel-execute:picolisp):
* lisp/org/ob-processing.el (org-babel-prep-session:processing):
* lisp/org/ob-python.el (org-babel-prep-session:python):
* lisp/org/ob-scheme.el (org-babel-scheme-capture-current-message)
(org-babel-scheme-execute-with-geiser, org-babel-execute:scheme):
* lisp/org/ob-shen.el (org-babel-execute:shen):
* lisp/org/org-agenda.el (org-agenda-entry-types)
(org-agenda-move-date-from-past-immediately-to-today)
(org-agenda-time-grid, org-agenda-sorting-strategy)
(org-agenda-filter-by-category, org-agenda-forward-block):
* lisp/org/org-colview.el (org-columns--overlay-text):
* lisp/org/org-faces.el (org-verbatim, org-cycle-level-faces):
* lisp/org/org-indent.el (org-indent-set-line-properties):
* lisp/org/org-macs.el (org-get-limited-outline-regexp):
* lisp/org/org-mobile.el (org-mobile-files):
* lisp/org/org.el (org-use-fast-todo-selection)
(org-extend-today-until, org-use-property-inheritance)
(org-refresh-effort-properties, org-open-at-point-global)
(org-track-ordered-property-with-tag, org-shiftright):
* lisp/org/ox-html.el (org-html-checkbox-type):
* lisp/org/ox-man.el (org-man-source-highlight)
(org-man-verse-block):
* lisp/org/ox-publish.el (org-publish-sitemap-default):
* lisp/outline.el (outline-head-from-level):
* lisp/progmodes/dcl-mode.el (dcl-back-to-indentation-1)
(dcl-calc-command-indent, dcl-indent-to):
* lisp/progmodes/flymake.el (flymake-make-diagnostic)
(flymake--overlays, flymake-diagnostic-functions)
(flymake-diagnostic-types-alist, flymake--backend-state)
(flymake-is-running, flymake--collect, flymake-mode):
* lisp/progmodes/gdb-mi.el (gdb-threads-list, gdb, gdb-non-stop)
(gdb-buffers, gdb-gud-context-call, gdb-jsonify-buffer):
* lisp/progmodes/grep.el (grep-error-screen-columns):
* lisp/progmodes/gud.el (gud-prev-expr):
* lisp/progmodes/ps-mode.el (ps-mode, ps-mode-target-column)
(ps-run-goto-error):
* lisp/progmodes/python.el (python-eldoc-get-doc)
(python-eldoc-function-timeout-permanent, python-eldoc-function):
* lisp/shadowfile.el (shadow-make-group):
* lisp/speedbar.el (speedbar-obj-do-check):
* lisp/textmodes/flyspell.el (flyspell-auto-correct-previous-hook):
* lisp/textmodes/reftex-cite.el (reftex-bib-or-thebib):
* lisp/textmodes/reftex-index.el (reftex-index-goto-entry)
(reftex-index-kill, reftex-index-undo):
* lisp/textmodes/reftex-parse.el (reftex-context-substring):
* lisp/textmodes/reftex.el (reftex-TeX-master-file):
* lisp/textmodes/rst.el (rst-next-hdr, rst-toc)
(rst-uncomment-region, rst-font-lock-extend-region-internal):
* lisp/thumbs.el (thumbs-mode):
* lisp/vc/ediff-util.el (ediff-restore-diff):
* lisp/vc/pcvs-defs.el (cvs-cvsroot, cvs-force-dir-tag):
* lisp/vc/vc-hg.el (vc-hg--ignore-patterns-valid-p):
* lisp/wid-edit.el (widget-field-value-set, string):
* lisp/x-dnd.el (x-dnd-version-from-flags)
(x-dnd-more-than-3-from-flags): Assorted docfixes.
2019-09-21 00:27:53 +02:00
|
|
|
The optional NEW-WINDOW argument is not used."
|
2003-04-12 22:21:18 +00:00
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
|
|
|
(start-process (concat "open " url) nil "open" url))
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
;; --- Netscape ---
|
|
|
|
|
|
|
|
(defun browse-url-process-environment ()
|
2001-11-19 19:12:31 +00:00
|
|
|
"Set DISPLAY in the environment to the X display the browser will use.
|
|
|
|
This is either the value of variable `browse-url-browser-display' if
|
2000-03-20 13:12:14 +00:00
|
|
|
non-nil, or the same display as Emacs if different from the current
|
|
|
|
environment, otherwise just use the current environment."
|
2001-11-19 19:12:31 +00:00
|
|
|
(let ((display (or browse-url-browser-display (browse-url-emacs-display))))
|
2000-03-20 13:12:14 +00:00
|
|
|
(if display
|
|
|
|
(cons (concat "DISPLAY=" display) process-environment)
|
|
|
|
process-environment)))
|
|
|
|
|
|
|
|
(defun browse-url-emacs-display ()
|
|
|
|
"Return the X display Emacs is running on.
|
|
|
|
This is nil if the display is the same as the DISPLAY environment variable.
|
|
|
|
|
|
|
|
Actually Emacs could be using several displays; this just returns the
|
|
|
|
one showing the selected frame."
|
|
|
|
(let ((display (cdr-safe (assq 'display (frame-parameters)))))
|
|
|
|
(and (not (equal display (getenv "DISPLAY")))
|
|
|
|
display)))
|
|
|
|
|
2001-11-19 19:12:31 +00:00
|
|
|
(defun browse-url-default-browser (url &rest args)
|
|
|
|
"Find a suitable browser and ask it to load URL.
|
|
|
|
Default to the URL around or before point.
|
|
|
|
|
|
|
|
When called interactively, if variable `browse-url-new-window-flag' is
|
|
|
|
non-nil, load the document in a new window, if possible, otherwise use
|
|
|
|
a random existing one. A non-nil interactive prefix argument reverses
|
|
|
|
the effect of `browse-url-new-window-flag'.
|
|
|
|
|
2015-12-26 20:47:42 +02:00
|
|
|
When called non-interactively, optional second argument ARGS is used
|
|
|
|
instead of `browse-url-new-window-flag'."
|
2001-11-19 19:12:31 +00:00
|
|
|
(apply
|
2007-09-17 15:59:55 +00:00
|
|
|
(cond
|
2011-07-13 15:49:55 +02:00
|
|
|
((memq system-type '(windows-nt ms-dos cygwin))
|
|
|
|
'browse-url-default-windows-browser)
|
|
|
|
((memq system-type '(darwin))
|
|
|
|
'browse-url-default-macosx-browser)
|
2010-08-17 10:01:10 +02:00
|
|
|
((browse-url-can-use-xdg-open) 'browse-url-xdg-open)
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
;;; ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz)
|
2007-09-17 15:59:55 +00:00
|
|
|
((executable-find browse-url-mozilla-program) 'browse-url-mozilla)
|
|
|
|
((executable-find browse-url-firefox-program) 'browse-url-firefox)
|
2011-10-19 12:03:39 +03:00
|
|
|
((executable-find browse-url-chromium-program) 'browse-url-chromium)
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
;;; ((executable-find browse-url-galeon-program) 'browse-url-galeon)
|
2007-09-17 15:59:55 +00:00
|
|
|
((executable-find browse-url-kde-program) 'browse-url-kde)
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
;;; ((executable-find browse-url-netscape-program) 'browse-url-netscape)
|
|
|
|
;;; ((executable-find browse-url-mosaic-program) 'browse-url-mosaic)
|
2015-03-17 05:27:23 +05:30
|
|
|
((executable-find browse-url-conkeror-program) 'browse-url-conkeror)
|
2016-01-30 11:52:42 -08:00
|
|
|
((executable-find browse-url-chrome-program) 'browse-url-chrome)
|
2007-10-29 13:56:39 +00:00
|
|
|
((executable-find browse-url-xterm-program) 'browse-url-text-xterm)
|
2007-09-17 15:59:55 +00:00
|
|
|
((locate-library "w3") 'browse-url-w3)
|
|
|
|
(t
|
2013-09-10 23:52:26 +02:00
|
|
|
(lambda (&rest _ignore) (error "No usable browser found"))))
|
2007-09-17 15:59:55 +00:00
|
|
|
url args))
|
2001-11-19 19:12:31 +00:00
|
|
|
|
2010-08-17 10:01:10 +02:00
|
|
|
(defun browse-url-can-use-xdg-open ()
|
2012-02-08 22:14:22 -05:00
|
|
|
"Return non-nil if the \"xdg-open\" program can be used.
|
2017-03-09 19:01:19 -08:00
|
|
|
xdg-open is a desktop utility that calls your preferred web browser."
|
|
|
|
;; The exact set of situations where xdg-open works is complicated,
|
|
|
|
;; and it would be a pain to duplicate xdg-open's situation-specific
|
|
|
|
;; code here, as the code is a moving target. So assume that
|
|
|
|
;; xdg-open will work if there is a graphical display; this should
|
|
|
|
;; be good enough for platforms Emacs is likely to be running on.
|
|
|
|
(and (or (getenv "DISPLAY") (getenv "WAYLAND_DISPLAY"))
|
|
|
|
(executable-find "xdg-open")))
|
2010-08-17 10:01:10 +02:00
|
|
|
|
|
|
|
;;;###autoload
|
2012-02-08 22:14:22 -05:00
|
|
|
(defun browse-url-xdg-open (url &optional ignored)
|
|
|
|
"Pass the specified URL to the \"xdg-open\" command.
|
|
|
|
xdg-open is a desktop utility that calls your preferred web browser.
|
|
|
|
The optional argument IGNORED is not used."
|
2010-08-17 10:01:10 +02:00
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
2011-06-22 18:44:53 +02:00
|
|
|
(call-process "xdg-open" nil 0 nil url))
|
2010-08-17 10:01:10 +02:00
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-netscape (url &optional new-window)
|
|
|
|
"Ask the Netscape WWW browser to load URL.
|
|
|
|
Default to the URL around or before point. The strings in variable
|
|
|
|
`browse-url-netscape-arguments' are also passed to Netscape.
|
|
|
|
|
2001-04-18 12:48:36 +00:00
|
|
|
When called interactively, if variable `browse-url-new-window-flag' is
|
2000-03-20 13:12:14 +00:00
|
|
|
non-nil, load the document in a new Netscape window, otherwise use a
|
|
|
|
random existing one. A non-nil interactive prefix argument reverses
|
2001-04-18 12:48:36 +00:00
|
|
|
the effect of `browse-url-new-window-flag'.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
2005-02-22 14:11:48 +00:00
|
|
|
If `browse-url-netscape-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.
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
When called non-interactively, optional second argument NEW-WINDOW is
|
2001-04-18 12:48:36 +00:00
|
|
|
used instead of `browse-url-new-window-flag'."
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(declare (obsolete nil "25.1"))
|
2000-10-07 17:58:33 +00:00
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
2007-09-07 04:37:01 +00:00
|
|
|
(setq url (browse-url-encode-url url))
|
2000-03-20 13:12:14 +00:00
|
|
|
(let* ((process-environment (browse-url-process-environment))
|
2005-02-22 14:11:48 +00:00
|
|
|
(process
|
|
|
|
(apply 'start-process
|
|
|
|
(concat "netscape " url) nil
|
|
|
|
browse-url-netscape-program
|
|
|
|
(append
|
|
|
|
browse-url-netscape-arguments
|
|
|
|
(if (eq window-system 'w32)
|
|
|
|
(list url)
|
|
|
|
(append
|
|
|
|
(if new-window '("-noraise"))
|
|
|
|
(list "-remote"
|
|
|
|
(concat "openURL(" url
|
|
|
|
(if (browse-url-maybe-new-window
|
|
|
|
new-window)
|
|
|
|
(if browse-url-netscape-new-window-is-tab
|
|
|
|
",new-tab"
|
|
|
|
",new-window"))
|
|
|
|
")"))))))))
|
2000-03-20 13:12:14 +00:00
|
|
|
(set-process-sentinel process
|
2000-08-15 11:17:17 +00:00
|
|
|
`(lambda (process change)
|
|
|
|
(browse-url-netscape-sentinel process ,url)))))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
(defun browse-url-netscape-sentinel (process url)
|
|
|
|
"Handle a change to the process communicating with Netscape."
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(declare (obsolete nil "25.1"))
|
2000-03-20 13:12:14 +00:00
|
|
|
(or (eq (process-exit-status process) 0)
|
|
|
|
(let* ((process-environment (browse-url-process-environment)))
|
|
|
|
;; Netscape not running - start it
|
2004-04-27 14:03:10 +00:00
|
|
|
(message "Starting %s..." browse-url-netscape-program)
|
2000-03-20 13:12:14 +00:00
|
|
|
(apply 'start-process (concat "netscape" url) nil
|
|
|
|
browse-url-netscape-program
|
|
|
|
(append browse-url-netscape-startup-arguments (list url))))))
|
|
|
|
|
|
|
|
(defun browse-url-netscape-reload ()
|
|
|
|
"Ask Netscape to reload its current document.
|
|
|
|
How depends on `browse-url-netscape-version'."
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(declare (obsolete nil "25.1"))
|
2000-03-20 13:12:14 +00:00
|
|
|
(interactive)
|
|
|
|
;; Backwards incompatibility reported by
|
|
|
|
;; <peter.kruse@psychologie.uni-regensburg.de>.
|
|
|
|
(browse-url-netscape-send (if (>= browse-url-netscape-version 4)
|
|
|
|
"xfeDoCommand(reload)"
|
2007-09-17 15:59:55 +00:00
|
|
|
"reload")))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
(defun browse-url-netscape-send (command)
|
|
|
|
"Send a remote control command to Netscape."
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(declare (obsolete nil "25.1"))
|
2000-03-20 13:12:14 +00:00
|
|
|
(let* ((process-environment (browse-url-process-environment)))
|
|
|
|
(apply 'start-process "netscape" nil
|
|
|
|
browse-url-netscape-program
|
|
|
|
(append browse-url-netscape-arguments
|
|
|
|
(list "-remote" command)))))
|
|
|
|
|
2001-11-19 19:12:31 +00:00
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-mozilla (url &optional new-window)
|
|
|
|
"Ask the Mozilla WWW browser to load URL.
|
|
|
|
Default to the URL around or before point. The strings in variable
|
|
|
|
`browse-url-mozilla-arguments' are also passed to Mozilla.
|
|
|
|
|
|
|
|
When called interactively, if variable `browse-url-new-window-flag' is
|
|
|
|
non-nil, load the document in a new Mozilla window, otherwise use a
|
|
|
|
random existing one. A non-nil interactive prefix argument reverses
|
|
|
|
the effect of `browse-url-new-window-flag'.
|
|
|
|
|
2002-10-11 17:17:10 +00:00
|
|
|
If `browse-url-mozilla-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.
|
|
|
|
|
2001-11-19 19:12:31 +00:00
|
|
|
When called non-interactively, optional second argument NEW-WINDOW is
|
|
|
|
used instead of `browse-url-new-window-flag'."
|
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
2007-09-07 04:37:01 +00:00
|
|
|
(setq url (browse-url-encode-url url))
|
2001-11-19 19:12:31 +00:00
|
|
|
(let* ((process-environment (browse-url-process-environment))
|
2002-10-11 17:17:10 +00:00
|
|
|
(process
|
|
|
|
(apply 'start-process
|
|
|
|
(concat "mozilla " url) nil
|
|
|
|
browse-url-mozilla-program
|
|
|
|
(append
|
|
|
|
browse-url-mozilla-arguments
|
|
|
|
(list "-remote"
|
|
|
|
(concat "openURL("
|
|
|
|
url
|
|
|
|
(if (browse-url-maybe-new-window
|
|
|
|
new-window)
|
|
|
|
(if browse-url-mozilla-new-window-is-tab
|
2003-05-28 11:24:00 +00:00
|
|
|
",new-tab"
|
|
|
|
",new-window"))
|
2002-10-11 17:17:10 +00:00
|
|
|
")"))))))
|
2001-11-19 19:12:31 +00:00
|
|
|
(set-process-sentinel process
|
|
|
|
`(lambda (process change)
|
|
|
|
(browse-url-mozilla-sentinel process ,url)))))
|
|
|
|
|
|
|
|
(defun browse-url-mozilla-sentinel (process url)
|
|
|
|
"Handle a change to the process communicating with Mozilla."
|
|
|
|
(or (eq (process-exit-status process) 0)
|
|
|
|
(let* ((process-environment (browse-url-process-environment)))
|
|
|
|
;; Mozilla is not running - start it
|
2004-04-27 14:03:10 +00:00
|
|
|
(message "Starting %s..." browse-url-mozilla-program)
|
2001-11-19 19:12:31 +00:00
|
|
|
(apply 'start-process (concat "mozilla " url) nil
|
|
|
|
browse-url-mozilla-program
|
|
|
|
(append browse-url-mozilla-startup-arguments (list url))))))
|
2005-06-18 10:36:11 +00:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-firefox (url &optional new-window)
|
|
|
|
"Ask the Firefox WWW browser to load URL.
|
2015-02-24 18:02:11 -05:00
|
|
|
Defaults to the URL around or before point. Passes the strings
|
|
|
|
in the variable `browse-url-firefox-arguments' to Firefox.
|
2005-06-18 10:36:11 +00:00
|
|
|
|
2015-02-24 18:02:11 -05:00
|
|
|
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'.
|
2005-06-18 10:36:11 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2015-02-24 18:02:11 -05:00
|
|
|
Non-interactively, this uses the optional second argument NEW-WINDOW
|
2015-03-06 17:18:45 +01:00
|
|
|
instead of `browse-url-new-window-flag'."
|
2005-06-18 10:36:11 +00:00
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
2007-09-07 04:37:01 +00:00
|
|
|
(setq url (browse-url-encode-url url))
|
2015-02-24 18:02:11 -05:00
|
|
|
(let* ((process-environment (browse-url-process-environment)))
|
|
|
|
(apply 'start-process
|
|
|
|
(concat "firefox " url) nil
|
|
|
|
browse-url-firefox-program
|
|
|
|
(append
|
|
|
|
browse-url-firefox-arguments
|
2015-03-06 17:18:45 +01:00
|
|
|
(if (browse-url-maybe-new-window new-window)
|
|
|
|
(if browse-url-firefox-new-window-is-tab
|
|
|
|
'("-new-tab")
|
|
|
|
'("-new-window")))
|
2015-02-24 18:02:11 -05:00
|
|
|
(list url)))))
|
2001-11-19 19:12:31 +00:00
|
|
|
|
2011-10-19 12:03:39 +03:00
|
|
|
;;;###autoload
|
2013-09-10 23:52:26 +02:00
|
|
|
(defun browse-url-chromium (url &optional _new-window)
|
2011-10-19 12:03:39 +03:00
|
|
|
"Ask the Chromium WWW browser to load URL.
|
|
|
|
Default to the URL around or before point. The strings in
|
|
|
|
variable `browse-url-chromium-arguments' are also passed to
|
2015-12-26 20:47:42 +02:00
|
|
|
Chromium.
|
|
|
|
The optional argument NEW-WINDOW is not used."
|
2011-10-19 12:03:39 +03:00
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
|
|
|
(setq url (browse-url-encode-url url))
|
|
|
|
(let* ((process-environment (browse-url-process-environment)))
|
|
|
|
(apply 'start-process
|
|
|
|
(concat "chromium " url) nil
|
|
|
|
browse-url-chromium-program
|
|
|
|
(append
|
|
|
|
browse-url-chromium-arguments
|
|
|
|
(list url)))))
|
|
|
|
|
2016-01-24 14:37:38 -05:00
|
|
|
(defun browse-url-chrome (url &optional _new-window)
|
|
|
|
"Ask the Google Chrome WWW browser to load URL.
|
|
|
|
Default to the URL around or before point. The strings in
|
|
|
|
variable `browse-url-chrome-arguments' are also passed to
|
|
|
|
Google Chrome.
|
|
|
|
The optional argument NEW-WINDOW is not used."
|
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
|
|
|
(setq url (browse-url-encode-url url))
|
|
|
|
(let* ((process-environment (browse-url-process-environment)))
|
|
|
|
(apply 'start-process
|
|
|
|
(concat "google-chrome " url) nil
|
|
|
|
browse-url-chrome-program
|
|
|
|
(append
|
|
|
|
browse-url-chrome-arguments
|
|
|
|
(list url)))))
|
|
|
|
|
2001-11-19 19:12:31 +00:00
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-galeon (url &optional new-window)
|
|
|
|
"Ask the Galeon WWW browser to load URL.
|
|
|
|
Default to the URL around or before point. The strings in variable
|
|
|
|
`browse-url-galeon-arguments' are also passed to Galeon.
|
|
|
|
|
|
|
|
When called interactively, if variable `browse-url-new-window-flag' is
|
|
|
|
non-nil, load the document in a new Galeon window, otherwise use a
|
|
|
|
random existing one. A non-nil interactive prefix argument reverses
|
|
|
|
the effect of `browse-url-new-window-flag'.
|
|
|
|
|
2002-03-08 09:56:30 +00:00
|
|
|
If `browse-url-galeon-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.
|
|
|
|
|
2001-11-19 19:12:31 +00:00
|
|
|
When called non-interactively, optional second argument NEW-WINDOW is
|
|
|
|
used instead of `browse-url-new-window-flag'."
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(declare (obsolete nil "25.1"))
|
2001-11-19 19:12:31 +00:00
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
2007-09-08 09:53:34 +00:00
|
|
|
(setq url (browse-url-encode-url url))
|
2001-11-19 19:12:31 +00:00
|
|
|
(let* ((process-environment (browse-url-process-environment))
|
|
|
|
(process (apply 'start-process
|
2003-07-07 20:54:56 +00:00
|
|
|
(concat "galeon " url)
|
|
|
|
nil
|
2001-11-19 19:12:31 +00:00
|
|
|
browse-url-galeon-program
|
|
|
|
(append
|
|
|
|
browse-url-galeon-arguments
|
2001-11-25 00:04:41 +00:00
|
|
|
(if (browse-url-maybe-new-window new-window)
|
|
|
|
(if browse-url-galeon-new-window-is-tab
|
|
|
|
'("--new-tab")
|
2002-03-08 09:56:30 +00:00
|
|
|
'("--new-window" "--noraise"))
|
|
|
|
'("--existing"))
|
|
|
|
(list url)))))
|
2001-11-19 19:12:31 +00:00
|
|
|
(set-process-sentinel process
|
|
|
|
`(lambda (process change)
|
|
|
|
(browse-url-galeon-sentinel process ,url)))))
|
|
|
|
|
|
|
|
(defun browse-url-galeon-sentinel (process url)
|
|
|
|
"Handle a change to the process communicating with Galeon."
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(declare (obsolete nil "25.1"))
|
2001-11-19 19:12:31 +00:00
|
|
|
(or (eq (process-exit-status process) 0)
|
|
|
|
(let* ((process-environment (browse-url-process-environment)))
|
|
|
|
;; Galeon is not running - start it
|
2004-04-27 14:03:10 +00:00
|
|
|
(message "Starting %s..." browse-url-galeon-program)
|
2001-11-19 19:12:31 +00:00
|
|
|
(apply 'start-process (concat "galeon " url) nil
|
|
|
|
browse-url-galeon-program
|
|
|
|
(append browse-url-galeon-startup-arguments (list url))))))
|
|
|
|
|
2003-07-07 20:54:56 +00:00
|
|
|
(defun browse-url-epiphany (url &optional new-window)
|
|
|
|
"Ask the Epiphany WWW browser to load URL.
|
|
|
|
Default to the URL around or before point. The strings in variable
|
|
|
|
`browse-url-galeon-arguments' are also passed to Epiphany.
|
|
|
|
|
|
|
|
When called interactively, if variable `browse-url-new-window-flag' is
|
|
|
|
non-nil, load the document in a new Epiphany window, otherwise use a
|
|
|
|
random existing one. A non-nil interactive prefix argument reverses
|
|
|
|
the effect of `browse-url-new-window-flag'.
|
|
|
|
|
2003-08-01 00:32:34 +00:00
|
|
|
If `browse-url-epiphany-new-window-is-tab' is non-nil, then whenever a
|
2003-07-07 20:54:56 +00:00
|
|
|
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'."
|
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
2007-09-07 04:37:01 +00:00
|
|
|
(setq url (browse-url-encode-url url))
|
2003-07-07 20:54:56 +00:00
|
|
|
(let* ((process-environment (browse-url-process-environment))
|
|
|
|
(process (apply 'start-process
|
|
|
|
(concat "epiphany " url)
|
|
|
|
nil
|
|
|
|
browse-url-epiphany-program
|
|
|
|
(append
|
|
|
|
browse-url-epiphany-arguments
|
|
|
|
(if (browse-url-maybe-new-window new-window)
|
|
|
|
(if browse-url-epiphany-new-window-is-tab
|
|
|
|
'("--new-tab")
|
|
|
|
'("--new-window" "--noraise"))
|
|
|
|
'("--existing"))
|
|
|
|
(list url)))))
|
|
|
|
(set-process-sentinel process
|
|
|
|
`(lambda (process change)
|
|
|
|
(browse-url-epiphany-sentinel process ,url)))))
|
|
|
|
|
|
|
|
(defun browse-url-epiphany-sentinel (process url)
|
|
|
|
"Handle a change to the process communicating with Epiphany."
|
|
|
|
(or (eq (process-exit-status process) 0)
|
|
|
|
(let* ((process-environment (browse-url-process-environment)))
|
|
|
|
;; Epiphany is not running - start it
|
2004-04-27 14:03:10 +00:00
|
|
|
(message "Starting %s..." browse-url-epiphany-program)
|
2003-07-07 20:54:56 +00:00
|
|
|
(apply 'start-process (concat "epiphany " url) nil
|
|
|
|
browse-url-epiphany-program
|
|
|
|
(append browse-url-epiphany-startup-arguments (list url))))))
|
|
|
|
|
2007-10-26 22:24:14 +00:00
|
|
|
(defvar url-handler-regexp)
|
|
|
|
|
2007-08-22 18:52:59 +00:00
|
|
|
;;;###autoload
|
2018-03-01 22:22:05 +01:00
|
|
|
(defun browse-url-emacs (url &optional same-window)
|
2018-03-19 11:17:20 +02:00
|
|
|
"Ask Emacs to load URL into a buffer and show it in another window.
|
|
|
|
Optional argument SAME-WINDOW non-nil means show the URL in the
|
|
|
|
currently selected window instead."
|
2007-08-22 18:52:59 +00:00
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
|
|
|
(require 'url-handlers)
|
|
|
|
(let ((file-name-handler-alist
|
|
|
|
(cons (cons url-handler-regexp 'url-file-handler)
|
|
|
|
file-name-handler-alist)))
|
2018-03-01 22:22:05 +01:00
|
|
|
(if same-window (find-file url) (find-file-other-window url))))
|
2007-08-22 18:52:59 +00:00
|
|
|
|
2000-10-07 18:05:28 +00:00
|
|
|
;;;###autoload
|
2000-10-07 17:58:33 +00:00
|
|
|
(defun browse-url-gnome-moz (url &optional new-window)
|
|
|
|
"Ask Mozilla/Netscape to load URL via the GNOME program `gnome-moz-remote'.
|
|
|
|
Default to the URL around or before point. The strings in variable
|
|
|
|
`browse-url-gnome-moz-arguments' are also passed.
|
|
|
|
|
2001-04-18 12:48:36 +00:00
|
|
|
When called interactively, if variable `browse-url-new-window-flag' is
|
2000-10-07 17:58:33 +00:00
|
|
|
non-nil, load the document in a new browser window, otherwise use an
|
|
|
|
existing one. A non-nil interactive prefix argument reverses the
|
2001-04-18 12:48:36 +00:00
|
|
|
effect of `browse-url-new-window-flag'.
|
2000-10-07 17:58:33 +00:00
|
|
|
|
|
|
|
When called non-interactively, optional second argument NEW-WINDOW is
|
2001-04-18 12:48:36 +00:00
|
|
|
used instead of `browse-url-new-window-flag'."
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(declare (obsolete nil "25.1"))
|
2003-01-31 15:24:20 +00:00
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
2000-10-07 17:58:33 +00:00
|
|
|
(apply 'start-process (concat "gnome-moz-remote " url)
|
|
|
|
nil
|
2003-04-12 22:21:18 +00:00
|
|
|
browse-url-gnome-moz-program
|
2000-10-07 17:58:33 +00:00
|
|
|
(append
|
|
|
|
browse-url-gnome-moz-arguments
|
|
|
|
(if (browse-url-maybe-new-window new-window)
|
2007-09-17 15:59:55 +00:00
|
|
|
'("--newwin"))
|
2000-10-07 17:58:33 +00:00
|
|
|
(list "--raise" url))))
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
;; --- Mosaic ---
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-mosaic (url &optional new-window)
|
|
|
|
"Ask the XMosaic WWW browser to load URL.
|
|
|
|
|
|
|
|
Default to the URL around or before point. The strings in variable
|
|
|
|
`browse-url-mosaic-arguments' are also passed to Mosaic and the
|
|
|
|
program is invoked according to the variable
|
|
|
|
`browse-url-mosaic-program'.
|
|
|
|
|
2001-04-18 12:48:36 +00:00
|
|
|
When called interactively, if variable `browse-url-new-window-flag' is
|
2000-03-20 13:12:14 +00:00
|
|
|
non-nil, load the document in a new Mosaic window, otherwise use a
|
|
|
|
random existing one. A non-nil interactive prefix argument reverses
|
2001-04-18 12:48:36 +00:00
|
|
|
the effect of `browse-url-new-window-flag'.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
When called non-interactively, optional second argument NEW-WINDOW is
|
2001-04-18 12:48:36 +00:00
|
|
|
used instead of `browse-url-new-window-flag'."
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(declare (obsolete nil "25.1"))
|
2000-03-20 13:12:14 +00:00
|
|
|
(interactive (browse-url-interactive-arg "Mosaic URL: "))
|
2002-03-18 04:24:09 +00:00
|
|
|
(let ((pidfile (expand-file-name browse-url-mosaic-pidfile))
|
2000-03-20 13:12:14 +00:00
|
|
|
pid)
|
|
|
|
(if (file-readable-p pidfile)
|
2014-05-08 14:10:36 -04:00
|
|
|
(with-temp-buffer
|
|
|
|
(insert-file-contents pidfile)
|
|
|
|
(setq pid (read (current-buffer)))))
|
|
|
|
(if (and (integerp pid) (zerop (signal-process pid 0))) ; Mosaic running
|
|
|
|
(progn
|
|
|
|
(with-temp-buffer
|
|
|
|
(insert (if (browse-url-maybe-new-window new-window)
|
|
|
|
"newwin\n"
|
|
|
|
"goto\n")
|
|
|
|
url "\n")
|
2014-05-14 10:15:15 -07:00
|
|
|
(with-file-modes ?\700
|
|
|
|
(if (file-exists-p
|
|
|
|
(setq pidfile (format "/tmp/Mosaic.%d" pid)))
|
|
|
|
(delete-file pidfile))
|
2017-09-13 15:52:52 -07:00
|
|
|
;; https://debbugs.gnu.org/17428. Use O_EXCL.
|
2014-05-14 10:15:15 -07:00
|
|
|
(write-region nil nil pidfile nil 'silent nil 'excl)))
|
2000-03-20 13:12:14 +00:00
|
|
|
;; Send signal SIGUSR to Mosaic
|
2005-06-21 13:45:53 +00:00
|
|
|
(message "Signaling Mosaic...")
|
2003-04-12 22:21:18 +00:00
|
|
|
(signal-process pid 'SIGUSR1)
|
2000-03-20 13:12:14 +00:00
|
|
|
;; Or you could try:
|
|
|
|
;; (call-process "kill" nil 0 nil "-USR1" (int-to-string pid))
|
2014-05-08 14:10:36 -04:00
|
|
|
(message "Signaling Mosaic...done"))
|
2000-03-20 13:12:14 +00:00
|
|
|
;; Mosaic not running - start it
|
2004-04-27 14:03:10 +00:00
|
|
|
(message "Starting %s..." browse-url-mosaic-program)
|
2000-03-20 13:12:14 +00:00
|
|
|
(apply 'start-process "xmosaic" nil browse-url-mosaic-program
|
|
|
|
(append browse-url-mosaic-arguments (list url)))
|
2004-04-27 14:03:10 +00:00
|
|
|
(message "Starting %s...done" browse-url-mosaic-program))))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;; --- Mosaic using CCI ---
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-cci (url &optional new-window)
|
|
|
|
"Ask the XMosaic WWW browser to load URL.
|
|
|
|
Default to the URL around or before point.
|
|
|
|
|
|
|
|
This function only works for XMosaic version 2.5 or later. You must
|
|
|
|
select `CCI' from XMosaic's File menu, set the CCI Port Address to the
|
|
|
|
value of variable `browse-url-CCI-port', and enable `Accept requests'.
|
|
|
|
|
2001-04-18 12:48:36 +00:00
|
|
|
When called interactively, if variable `browse-url-new-window-flag' is
|
2000-03-20 13:12:14 +00:00
|
|
|
non-nil, load the document in a new browser window, otherwise use a
|
|
|
|
random existing one. A non-nil interactive prefix argument reverses
|
2001-04-18 12:48:36 +00:00
|
|
|
the effect of `browse-url-new-window-flag'.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
When called non-interactively, optional second argument NEW-WINDOW is
|
2001-04-18 12:48:36 +00:00
|
|
|
used instead of `browse-url-new-window-flag'."
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(declare (obsolete nil "25.1"))
|
2000-03-20 13:12:14 +00:00
|
|
|
(interactive (browse-url-interactive-arg "Mosaic URL: "))
|
|
|
|
(open-network-stream "browse-url" " *browse-url*"
|
|
|
|
browse-url-CCI-host browse-url-CCI-port)
|
|
|
|
;; Todo: start browser if fails
|
|
|
|
(process-send-string "browse-url"
|
|
|
|
(concat "get url (" url ") output "
|
2000-03-22 23:06:18 +00:00
|
|
|
(if (browse-url-maybe-new-window new-window)
|
2000-03-20 13:12:14 +00:00
|
|
|
"new"
|
|
|
|
"current")
|
|
|
|
"\r\n"))
|
|
|
|
(process-send-string "browse-url" "disconnect\r\n")
|
|
|
|
(delete-process "browse-url"))
|
|
|
|
|
2015-03-17 05:27:23 +05:30
|
|
|
;; --- Conkeror ---
|
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-conkeror (url &optional new-window)
|
|
|
|
"Ask the Conkeror WWW browser to load URL.
|
2015-03-17 17:09:34 -07:00
|
|
|
Default to the URL around or before point. Also pass the strings
|
|
|
|
in the variable `browse-url-conkeror-arguments' to Conkeror.
|
2015-03-17 05:27:23 +05:30
|
|
|
|
2015-03-17 17:09:34 -07:00
|
|
|
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'.
|
2015-03-17 05:27:23 +05:30
|
|
|
|
2015-03-17 17:09:34 -07:00
|
|
|
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.
|
2015-03-17 05:27:23 +05:30
|
|
|
|
2015-03-17 17:09:34 -07:00
|
|
|
When called non-interactively, use optional second argument
|
|
|
|
NEW-WINDOW instead of `browse-url-new-window-flag'."
|
2015-03-17 05:27:23 +05:30
|
|
|
(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))))))
|
2000-03-20 13:12:14 +00:00
|
|
|
;; --- W3 ---
|
|
|
|
|
2007-11-29 04:26:50 +00:00
|
|
|
;; External.
|
|
|
|
(declare-function w3-fetch-other-window "ext:w3m" (&optional url))
|
|
|
|
(declare-function w3-fetch "ext:w3m" (&optional url target))
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-w3 (url &optional new-window)
|
|
|
|
"Ask the w3 WWW browser to load URL.
|
|
|
|
Default to the URL around or before point.
|
|
|
|
|
2001-04-18 12:48:36 +00:00
|
|
|
When called interactively, if variable `browse-url-new-window-flag' is
|
2000-03-20 13:12:14 +00:00
|
|
|
non-nil, load the document in a new window. A non-nil interactive
|
2001-04-18 12:48:36 +00:00
|
|
|
prefix argument reverses the effect of `browse-url-new-window-flag'.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
When called non-interactively, optional second argument NEW-WINDOW is
|
2001-04-18 12:48:36 +00:00
|
|
|
used instead of `browse-url-new-window-flag'."
|
2000-03-20 13:12:14 +00:00
|
|
|
(interactive (browse-url-interactive-arg "W3 URL: "))
|
2007-09-17 15:59:55 +00:00
|
|
|
(require 'w3) ; w3-fetch-other-window not autoloaded
|
2000-03-22 23:06:18 +00:00
|
|
|
(if (browse-url-maybe-new-window new-window)
|
2000-03-20 13:12:14 +00:00
|
|
|
(w3-fetch-other-window url)
|
|
|
|
(w3-fetch url)))
|
|
|
|
|
|
|
|
;;;###autoload
|
2013-09-10 23:52:26 +02:00
|
|
|
(defun browse-url-w3-gnudoit (url &optional _new-window)
|
2000-03-20 13:12:14 +00:00
|
|
|
;; new-window ignored
|
|
|
|
"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."
|
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.
2015-03-24 23:26:48 -07:00
|
|
|
(declare (obsolete nil "25.1"))
|
2000-03-20 13:12:14 +00:00
|
|
|
(interactive (browse-url-interactive-arg "W3 URL: "))
|
2007-09-17 15:59:55 +00:00
|
|
|
(apply 'start-process (concat "gnudoit:" url) nil
|
|
|
|
browse-url-gnudoit-program
|
|
|
|
(append browse-url-gnudoit-args
|
|
|
|
(list (concat "(w3-fetch \"" url "\")")
|
|
|
|
"(raise-frame)"))))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;; --- Lynx in an xterm ---
|
|
|
|
|
|
|
|
;;;###autoload
|
2013-09-10 23:52:26 +02:00
|
|
|
(defun browse-url-text-xterm (url &optional _new-window)
|
2000-03-20 13:12:14 +00:00
|
|
|
;; new-window ignored
|
2007-10-29 13:56:39 +00:00
|
|
|
"Ask a text browser to load URL.
|
2008-07-08 14:45:36 +00:00
|
|
|
URL defaults to the URL around or before point.
|
2007-10-29 13:56:39 +00:00
|
|
|
This runs the text browser specified by `browse-url-text-browser'.
|
2000-03-20 13:12:14 +00:00
|
|
|
in an Xterm window using the Xterm program named by `browse-url-xterm-program'
|
2015-12-26 20:47:42 +02:00
|
|
|
with possible additional arguments `browse-url-xterm-args'.
|
|
|
|
The optional argument NEW-WINDOW is not used."
|
2007-10-29 13:56:39 +00:00
|
|
|
(interactive (browse-url-interactive-arg "Text browser URL: "))
|
|
|
|
(apply #'start-process `(,(concat browse-url-text-browser url)
|
|
|
|
nil ,browse-url-xterm-program
|
2008-03-13 13:29:11 +00:00
|
|
|
,@browse-url-xterm-args "-e" ,browse-url-text-browser
|
2007-09-17 15:59:55 +00:00
|
|
|
,url)))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
;; --- Lynx in an Emacs "term" window ---
|
|
|
|
|
2010-10-08 17:52:12 -07:00
|
|
|
(declare-function term-char-mode "term" ())
|
|
|
|
(declare-function term-send-down "term" ())
|
|
|
|
(declare-function term-send-string "term" (proc str))
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
;;;###autoload
|
2007-10-29 13:56:39 +00:00
|
|
|
(defun browse-url-text-emacs (url &optional new-buffer)
|
|
|
|
"Ask a text browser to load URL.
|
2008-07-08 14:45:36 +00:00
|
|
|
URL defaults to the URL around or before point.
|
2007-10-29 13:56:39 +00:00
|
|
|
This runs the text browser specified by `browse-url-text-browser'.
|
|
|
|
With a prefix argument, it runs a new browser process in a new buffer.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
2001-04-18 12:48:36 +00:00
|
|
|
When called interactively, if variable `browse-url-new-window-flag' is
|
2007-10-29 13:56:39 +00:00
|
|
|
non-nil, load the document in a new browser process in a new term window,
|
2000-03-20 13:12:14 +00:00
|
|
|
otherwise use any existing one. A non-nil interactive prefix argument
|
2001-04-18 12:48:36 +00:00
|
|
|
reverses the effect of `browse-url-new-window-flag'.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
When called non-interactively, optional second argument NEW-WINDOW is
|
2001-04-18 12:48:36 +00:00
|
|
|
used instead of `browse-url-new-window-flag'."
|
2007-10-29 13:56:39 +00:00
|
|
|
(interactive (browse-url-interactive-arg "Text browser URL: "))
|
2007-09-17 15:59:55 +00:00
|
|
|
(let* ((system-uses-terminfo t) ; Lynx uses terminfo
|
2000-03-20 13:12:14 +00:00
|
|
|
;; (term-term-name "vt100") ; ??
|
2007-10-29 13:56:39 +00:00
|
|
|
(buf (get-buffer "*text browser*"))
|
2000-03-20 13:12:14 +00:00
|
|
|
(proc (and buf (get-buffer-process buf)))
|
2007-10-29 13:56:39 +00:00
|
|
|
(n browse-url-text-input-attempts))
|
2010-10-08 17:52:12 -07:00
|
|
|
(require 'term)
|
2000-03-22 23:06:18 +00:00
|
|
|
(if (and (browse-url-maybe-new-window new-buffer) buf)
|
2015-03-17 17:09:34 -07:00
|
|
|
;; Rename away the OLD buffer. This isn't very polite, but
|
2000-03-20 13:12:14 +00:00
|
|
|
;; term insists on working in a buffer named *lynx* and would
|
|
|
|
;; choke on *lynx*<1>
|
|
|
|
(progn (set-buffer buf)
|
|
|
|
(rename-uniquely)))
|
2000-03-22 23:06:18 +00:00
|
|
|
(if (or (browse-url-maybe-new-window new-buffer)
|
2000-03-20 13:12:14 +00:00
|
|
|
(not buf)
|
|
|
|
(not proc)
|
|
|
|
(not (memq (process-status proc) '(run stop))))
|
2007-10-29 13:56:39 +00:00
|
|
|
;; start a new text browser
|
2000-03-20 13:12:14 +00:00
|
|
|
(progn
|
|
|
|
(setq buf
|
|
|
|
(apply #'make-term
|
2007-10-29 13:56:39 +00:00
|
|
|
`(,browse-url-text-browser
|
|
|
|
,browse-url-text-browser
|
|
|
|
nil ,@browse-url-text-emacs-args
|
2000-03-22 23:06:18 +00:00
|
|
|
,url)))
|
2000-03-20 13:12:14 +00:00
|
|
|
(switch-to-buffer buf)
|
|
|
|
(term-char-mode)
|
|
|
|
(set-process-sentinel
|
|
|
|
(get-buffer-process buf)
|
|
|
|
;; Don't leave around a dead one (especially because of its
|
|
|
|
;; munged keymap.)
|
2013-09-10 23:52:26 +02:00
|
|
|
(lambda (process _event)
|
2000-03-20 13:12:14 +00:00
|
|
|
(if (not (memq (process-status process) '(run stop)))
|
|
|
|
(let ((buf (process-buffer process)))
|
|
|
|
(if buf (kill-buffer buf)))))))
|
2007-10-29 13:56:39 +00:00
|
|
|
;; Send the url to the text browser in the old buffer
|
2000-03-20 13:12:14 +00:00
|
|
|
(let ((win (get-buffer-window buf t)))
|
|
|
|
(if win
|
|
|
|
(select-window win)
|
|
|
|
(switch-to-buffer buf)))
|
|
|
|
(if (eq (following-char) ?_)
|
2007-10-29 13:56:39 +00:00
|
|
|
(cond ((eq browse-url-text-input-field 'warn)
|
2001-07-16 12:23:00 +00:00
|
|
|
(error "Please move out of the input field first"))
|
2007-10-29 13:56:39 +00:00
|
|
|
((eq browse-url-text-input-field 'avoid)
|
2000-03-20 13:12:14 +00:00
|
|
|
(while (and (eq (following-char) ?_) (> n 0))
|
2007-09-17 15:59:55 +00:00
|
|
|
(term-send-down) ; down arrow
|
2007-10-29 13:56:39 +00:00
|
|
|
(sit-for browse-url-text-input-delay))
|
2000-03-20 13:12:14 +00:00
|
|
|
(if (eq (following-char) ?_)
|
2001-07-16 12:23:00 +00:00
|
|
|
(error "Cannot move out of the input field, sorry")))))
|
2007-09-17 15:59:55 +00:00
|
|
|
(term-send-string proc (concat "g" ; goto
|
2000-03-20 13:12:14 +00:00
|
|
|
"\C-u" ; kill default url
|
|
|
|
url
|
|
|
|
"\r")))))
|
|
|
|
|
|
|
|
;; --- mailto ---
|
|
|
|
|
2004-03-07 19:59:15 +00:00
|
|
|
(autoload 'rfc2368-parse-mailto-url "rfc2368")
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
;;;###autoload
|
|
|
|
(defun browse-url-mail (url &optional new-window)
|
2004-03-07 19:59:15 +00:00
|
|
|
"Open a new mail message buffer within Emacs for the RFC 2368 URL.
|
2000-03-20 13:12:14 +00:00
|
|
|
Default to using the mailto: URL around or before point as the
|
|
|
|
recipient's address. Supplying a non-nil interactive prefix argument
|
|
|
|
will cause the mail to be composed in another window rather than the
|
|
|
|
current one.
|
|
|
|
|
2001-04-18 12:48:36 +00:00
|
|
|
When called interactively, if variable `browse-url-new-window-flag' is
|
2000-03-20 13:12:14 +00:00
|
|
|
non-nil use `compose-mail-other-window', otherwise `compose-mail'. A
|
|
|
|
non-nil interactive prefix argument reverses the effect of
|
2001-04-18 12:48:36 +00:00
|
|
|
`browse-url-new-window-flag'.
|
2000-03-20 13:12:14 +00:00
|
|
|
|
|
|
|
When called non-interactively, optional second argument NEW-WINDOW is
|
2001-04-18 12:48:36 +00:00
|
|
|
used instead of `browse-url-new-window-flag'."
|
2000-03-20 13:12:14 +00:00
|
|
|
(interactive (browse-url-interactive-arg "Mailto URL: "))
|
|
|
|
(save-excursion
|
2004-03-07 19:59:15 +00:00
|
|
|
(let* ((alist (rfc2368-parse-mailto-url url))
|
|
|
|
(to (assoc "To" alist))
|
|
|
|
(subject (assoc "Subject" alist))
|
|
|
|
(body (assoc "Body" alist))
|
2010-11-10 00:02:44 +00:00
|
|
|
(rest (delq to (delq subject (delq body alist))))
|
2004-03-07 19:59:15 +00:00
|
|
|
(to (cdr to))
|
|
|
|
(subject (cdr subject))
|
|
|
|
(body (cdr body))
|
|
|
|
(mail-citation-hook (unless body mail-citation-hook)))
|
2000-03-22 23:06:18 +00:00
|
|
|
(if (browse-url-maybe-new-window new-window)
|
2004-03-07 19:59:15 +00:00
|
|
|
(compose-mail-other-window to subject rest nil
|
2010-11-10 00:02:44 +00:00
|
|
|
(list 'insert-buffer (current-buffer)))
|
2004-03-07 19:59:15 +00:00
|
|
|
(compose-mail to subject rest nil nil
|
2010-11-10 00:02:44 +00:00
|
|
|
(list 'insert-buffer (current-buffer))))
|
|
|
|
(when body
|
|
|
|
(goto-char (point-min))
|
|
|
|
(unless (or (search-forward (concat "\n" mail-header-separator "\n")
|
|
|
|
nil 'move)
|
|
|
|
(bolp))
|
|
|
|
(insert "\n"))
|
|
|
|
(goto-char (prog1
|
|
|
|
(point)
|
|
|
|
(insert (replace-regexp-in-string "\r\n" "\n" body))
|
|
|
|
(unless (bolp)
|
|
|
|
(insert "\n"))))))))
|
2000-03-20 13:12:14 +00:00
|
|
|
|
2016-10-21 11:23:39 -04:00
|
|
|
;; --- man ---
|
|
|
|
|
|
|
|
(defvar manual-program)
|
|
|
|
|
|
|
|
(defun browse-url-man (url &optional _new-window)
|
|
|
|
"Open a man page."
|
|
|
|
(interactive (browse-url-interactive-arg "Man page URL: "))
|
|
|
|
(require 'man)
|
|
|
|
(setq url (replace-regexp-in-string "\\`man:" "" url))
|
|
|
|
(cond
|
|
|
|
((executable-find manual-program) (man url))
|
|
|
|
(t (woman (replace-regexp-in-string "([[:alnum:]]+)" "" url)))))
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
;; --- Random browser ---
|
|
|
|
|
|
|
|
;;;###autoload
|
2013-09-10 23:52:26 +02:00
|
|
|
(defun browse-url-generic (url &optional _new-window)
|
2000-03-20 13:12:14 +00:00
|
|
|
;; new-window ignored
|
|
|
|
"Ask the WWW browser defined by `browse-url-generic-program' to load URL.
|
|
|
|
Default to the URL around or before point. A fresh copy of the
|
|
|
|
browser is started up in a new process with possible additional arguments
|
|
|
|
`browse-url-generic-args'. This is appropriate for browsers which
|
|
|
|
don't offer a form of remote control."
|
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
|
|
|
(if (not browse-url-generic-program)
|
2007-09-17 15:59:55 +00:00
|
|
|
(error "No browser defined (`browse-url-generic-program')"))
|
2004-04-02 14:33:08 +00:00
|
|
|
(apply 'call-process browse-url-generic-program nil
|
|
|
|
0 nil
|
2000-03-20 13:12:14 +00:00
|
|
|
(append browse-url-generic-args (list url))))
|
|
|
|
|
2001-05-18 11:27:38 +00:00
|
|
|
;;;###autoload
|
2013-09-10 23:52:26 +02:00
|
|
|
(defun browse-url-kde (url &optional _new-window)
|
2001-05-18 11:27:38 +00:00
|
|
|
"Ask the KDE WWW browser to load URL.
|
2015-12-26 20:47:42 +02:00
|
|
|
Default to the URL around or before point.
|
|
|
|
The optional argument NEW-WINDOW is not used."
|
2001-05-18 11:27:38 +00:00
|
|
|
(interactive (browse-url-interactive-arg "KDE URL: "))
|
|
|
|
(message "Sending URL to KDE...")
|
2003-04-12 22:21:18 +00:00
|
|
|
(apply #'start-process (concat "KDE " url) nil browse-url-kde-program
|
2007-09-17 15:59:55 +00:00
|
|
|
(append browse-url-kde-args (list url))))
|
2001-05-18 11:27:38 +00:00
|
|
|
|
2007-09-19 11:26:57 +00:00
|
|
|
(defun browse-url-elinks-new-window (url)
|
|
|
|
"Ask the Elinks WWW browser to load URL in a new window."
|
2008-07-08 14:45:36 +00:00
|
|
|
(let ((process-environment (browse-url-process-environment)))
|
2007-09-19 11:26:57 +00:00
|
|
|
(apply #'start-process
|
|
|
|
(append (list (concat "elinks:" url)
|
|
|
|
nil)
|
|
|
|
browse-url-elinks-wrapper
|
|
|
|
(list "elinks" url)))))
|
|
|
|
|
2007-09-07 04:37:01 +00:00
|
|
|
;;;###autoload
|
2007-09-19 11:26:57 +00:00
|
|
|
(defun browse-url-elinks (url &optional new-window)
|
2007-09-07 04:37:01 +00:00
|
|
|
"Ask the Elinks WWW browser to load URL.
|
|
|
|
Default to the URL around the point.
|
|
|
|
|
|
|
|
The document is loaded in a new tab of a running Elinks or, if
|
|
|
|
none yet running, a newly started instance.
|
|
|
|
|
|
|
|
The Elinks command will be prepended by the program+arguments
|
2007-09-19 11:26:57 +00:00
|
|
|
from `browse-url-elinks-wrapper'."
|
2007-09-07 04:37:01 +00:00
|
|
|
(interactive (browse-url-interactive-arg "URL: "))
|
|
|
|
(setq url (browse-url-encode-url url))
|
2007-09-19 11:26:57 +00:00
|
|
|
(if new-window
|
|
|
|
(browse-url-elinks-new-window url)
|
|
|
|
(let ((process-environment (browse-url-process-environment))
|
|
|
|
(elinks-ping-process (start-process "elinks-ping" nil
|
|
|
|
"elinks" "-remote" "ping()")))
|
|
|
|
(set-process-sentinel elinks-ping-process
|
|
|
|
`(lambda (process change)
|
|
|
|
(browse-url-elinks-sentinel process ,url))))))
|
2007-09-07 04:37:01 +00:00
|
|
|
|
|
|
|
(defun browse-url-elinks-sentinel (process url)
|
|
|
|
"Determines if Elinks is running or a new one has to be started."
|
More CL cleanups and reduction of use of cl.el.
* woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el:
* vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el:
* textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el:
* strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el:
* progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el:
* play/tetris.el, play/snake.el, play/pong.el, play/landmark.el:
* play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el:
* net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el:
* image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el:
* eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el:
* eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el:
* eshell/em-cmpl.el, eshell/em-banner.el:
* url/url.el, url/url-queue.el, url/url-parse.el, url/url-http.el:
* url/url-future.el, url/url-dav.el, url/url-cookie.el:
* calendar/parse-time.el, test/eshell.el: Use cl-lib.
* wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el:
* vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el:
* textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el:
* term/ns-win.el, term.el, shell.el, ps-samp.el:
* progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el:
* progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el:
* play/gamegrid.el, play/bubbles.el, novice.el, notifications.el:
* net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el:
* net/ldap.el, net/eudc.el, net/browse-url.el, man.el:
* mail/mailheader.el, mail/feedmail.el:
* url/url-util.el, url/url-privacy.el, url/url-nfs.el, url/url-misc.el:
* url/url-methods.el, url/url-gw.el, url/url-file.el, url/url-expand.el:
Dont use CL.
* ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time.
* eshell/esh-opt.el (eshell-eval-using-options): Quote code with
`lambda' rather than with `quote'.
(eshell-do-opt): Adjust accordingly.
(eshell-process-option): Simplify.
* eshell/esh-var.el:
* eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options.
* emacs-pcase.el (pcase--dontcare-upats, pcase--let*)
(pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern
to `pcase--dontcare'.
* emacs-cl.el (labels): Mark obsolete.
(cl--letf, letf): Move to cl-lib.
(cl--letf*, letf*): Remove.
* emacs-cl-lib.el (cl-nth-value): Use defalias.
* emacs-cl-macs.el (cl-dolist, cl-dotimes): Add indent rule.
(cl-progv): Rewrite.
(cl--letf, cl-letf): Move from cl.el.
(cl-letf*): New macro.
* emacs-cl-extra.el (cl--progv-before, cl--progv-after): Remove.
2012-07-11 19:13:41 -04:00
|
|
|
;; Try to determine if an instance is running or if we have to
|
|
|
|
;; create a new one.
|
|
|
|
(pcase (process-exit-status process)
|
|
|
|
(5
|
|
|
|
;; No instance, start a new one.
|
|
|
|
(browse-url-elinks-new-window url))
|
|
|
|
(0
|
|
|
|
;; Found an instance, open URL in new tab.
|
|
|
|
(let ((process-environment (browse-url-process-environment)))
|
|
|
|
(start-process (concat "elinks:" url) nil
|
|
|
|
"elinks" "-remote"
|
|
|
|
(concat "openURL(\"" url "\",new-tab)"))))
|
|
|
|
(exit-status
|
|
|
|
(error "Unrecognized exit-code %d of process `elinks'"
|
|
|
|
exit-status))))
|
2007-09-07 04:37:01 +00:00
|
|
|
|
2019-07-28 15:55:31 +02:00
|
|
|
;;; Adding buttons to a buffer to call `browse-url' when you hit them.
|
|
|
|
|
|
|
|
(defvar browse-url-button-map
|
|
|
|
(let ((map (make-sparse-keymap)))
|
|
|
|
(define-key map "\r" 'browse-url-button-open)
|
|
|
|
(define-key map [mouse-2] 'browse-url-button-open)
|
|
|
|
(define-key map "w" 'browse-url-button-copy)
|
|
|
|
map)
|
|
|
|
"The keymap used for browse-url buttons.")
|
|
|
|
|
|
|
|
(defface browse-url-button
|
|
|
|
'((t :inherit link))
|
|
|
|
"Face for browse-url buttons (i.e., links)."
|
|
|
|
:version "27.1")
|
|
|
|
|
|
|
|
(defun browse-url-add-buttons ()
|
|
|
|
"Add clickable buttons to the text following point in the current buffer.
|
|
|
|
Everything that matches `browse-url-button-regexp' will be made
|
|
|
|
clickable and will use `browse-url' to open the URLs in question."
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
(save-excursion
|
|
|
|
(while (re-search-forward browse-url-button-regexp nil t)
|
|
|
|
(add-text-properties (match-beginning 0)
|
|
|
|
(match-end 0)
|
|
|
|
`(help-echo "Open the URL under point"
|
|
|
|
keymap ,browse-url-button-map
|
|
|
|
face browse-url-button
|
|
|
|
button t
|
2019-07-30 16:06:51 +02:00
|
|
|
category browse-url
|
2019-07-28 15:55:31 +02:00
|
|
|
browse-url-data ,(match-string 0)))))))
|
|
|
|
|
|
|
|
(defun browse-url-button-open (&optional external mouse-event)
|
|
|
|
"Follow the link under point using `browse-url'.
|
|
|
|
If EXTERNAL (the prefix if used interactively), open with the
|
|
|
|
external browser instead of the default one."
|
|
|
|
(interactive (list current-prefix-arg last-nonmenu-event))
|
|
|
|
(mouse-set-point mouse-event)
|
|
|
|
(let ((url (get-text-property (point) 'browse-url-data)))
|
|
|
|
(unless url
|
|
|
|
(error "No URL under point"))
|
|
|
|
(if external
|
2019-07-29 00:07:34 +02:00
|
|
|
(funcall browse-url-secondary-browser-function url)
|
2019-07-28 15:55:31 +02:00
|
|
|
(browse-url url))))
|
|
|
|
|
2019-07-30 16:06:00 +02:00
|
|
|
(defun browse-url-button-open-url (url)
|
|
|
|
"Open URL using `browse-url'.
|
|
|
|
If `current-prefix-arg' is non-nil, use
|
|
|
|
`browse-url-secondary-browser-function' instead."
|
|
|
|
(if current-prefix-arg
|
|
|
|
(funcall browse-url-secondary-browser-function url)
|
|
|
|
(browse-url url)))
|
|
|
|
|
2019-07-28 15:55:31 +02:00
|
|
|
(defun browse-url-button-copy ()
|
2019-08-02 16:39:53 +03:00
|
|
|
"Copy the URL under point."
|
2019-07-28 15:55:31 +02:00
|
|
|
(interactive)
|
|
|
|
(let ((url (get-text-property (point) 'browse-url-data)))
|
|
|
|
(unless url
|
|
|
|
(error "No URL under point"))
|
|
|
|
(kill-new url)
|
|
|
|
(message "Copied %s" url)))
|
|
|
|
|
2000-03-20 13:12:14 +00:00
|
|
|
(provide 'browse-url)
|
|
|
|
|
|
|
|
;;; browse-url.el ends here
|